Alexander Grund wrote:
CMake has 2 levels of things you specify because CMake is not a build system (as B2, make, ninja, ...) but a buildsystem generator.
In CMake parlance, "build system" (or "buildsystem" as they spell it because we're all German by heart) refers not to make/ninja, which are merely the engines that execute the build system. It refers to the collection of Makefiles that in the dark past had to be written by a human in order to implement the building of a specific project (and contained a bunch of arcane rules and hacks.) (That's why when the CMake documentation refers to the build system author, it has in mind the person writing the CMakeLists.txt file, and not the maintainer of make or ninja.) There's an interesting parallel to be made here with jam (the engine), which sits at the same level as make/ninja, and b2/Boost.Build, which is the collection of .jam files that implement the high-level building functionality. It's interesting how knowing b2 allows one to understand CMake better, and conversely, familiarity with CMake allows one to understand b2 better. For example, since CMake separates configure/generate/build phases, one realizes that b2 has these same phases, except they are executed at once, rather than in a clearly delineated way, or with separate invocations. The similarity between CMake and b2 is most visible when using the Ninja generator. Then * you describe your targets in a high-level way (in CMakeLists.txt or Jamfile) * the tool generates a low-level action/dependency graph (build.ninja, or an in-memory collection of jam targets) * the build engine (ninja or bjam) builds the project by executing the actions in the graph in dependency order.