3 ms·
cmake cons (IMHO): - the archaic custom scripting language (that's its main problem) - there are many ways to do the same thing, resulting in each (non-trivia
by flohofwoe 9y ago
cmake cons (IMHO):
- the archaic custom scripting language (that's its main problem)
- there are many ways to do the same thing, resulting in each (non-trivial) build script looking different
- for the above reason, importing dependencies written by somebody else is non-trivial, and its often better to rewrite the cmake scripts completely
- it lacks some 'integration features' found in more modern systems like Rust's cargo: (1) proper dependency/package management (2) run targets (3) switching between build configurations should be easier (not just release/debug, also different build target platforms)
cmake pros (also IMHO):
- can generate IDE project files (that's what most new build systems completely ignore)
- very good cross-compilation support
- describing a simple build is reasonably simple
- broad support for build tools and IDEs
- ihnorton 9y agoMicrosoft (both vscode and studio) seems to be moving toward ide adaptation — parsing output from other compilers, supporting compilation databases and folder-only (non solution) projects. Perhaps this, combined with Clang viability for MSVC ABI, will reduce the impetus for cross-platform projects to use cmake just to support Windows. Of course, there’s added inertia in favor of cmake due to LLVM, Boost, and others moving over. Not to mention that Microsoft now also supports the “cmake server” concept (there will be some deep irony if after 20 years of “we need cmake to support Microsoft” the argument for the next N years becomes “we should use cmake because Microsoft supports it”).
- dcuthbertson 9y agoAnother disadvantage of cmake, when generating VS solution and project files, is that they are not standalone - just like when it generates makefiles [1]. It makes it nearly impossible to reason about your build dependencies from the VS IDE. [1] https://github.com/qznc/annoying-build-systems#cmake https://github.com/qznc/annoying-build-systems#cmake