I'm using CMake for several years now and found that - in the cases where I'm struggling with CMake - I'm still not completely sure about the concept behind
CMake (not taking into account
CDash also shipped with CMake).
CMake aims to give C++ compile portability like the compile once and run everywhere of Java, Python and C#
Starting from there and the basic concepts of CMake page, I came to thinking about CMake in terms of the following three major high-level programming concepts:
- CMake is an abstraction layer for the build and operating systems it's supporting
- CMake is a high level programming language for build procedure descriptions
- CMake assists you in cross-platform development by making code parts configurable
I'm fully aware of the complexity of CMake's task, but I hope you can help me nonetheless with:
- As being an abstraction layer it can't/shouldn't expose all functionality of the underlying layer. So why are there so many holes to explore in CMake?
- For the cases where I really need a bypass (something I can only accomplish in the native language) why does CMake not provide some generic way of "inline native code" as other high level programming languages do?
- E.g. like the
asmmacro/command in C++
- E.g. like the
- Is it OK in CMake to add another layer of abstraction to CMake itself (to hide the complexity of CMake to the users of my build environments)?
- I think yes. And since I understand it's a high level programming language, why not?
Thanks in advance for your insights and help with this.