4 ms·
Seven years ago I helped move a fairly complicated commercial codebase from automake to cmake. In the process, I wrote thousands of lines of complicated cmake
by bodyfour 11y ago
Seven years ago I helped move a fairly complicated commercial codebase from automake to cmake. In the process, I wrote thousands of lines of complicated cmake macros to interface with the packaging system, etc.
The end result was a love/hate relationship with cmake.
Clearly, the weakness is its hokey scripting language. The shame is that if they'd just started with something halfway reasonable like lua it would have been easier to build the tool and it would be far more powerful. Instead, they couldn't resist writing their own DSL where everything you need to do is possible but just barely. I've done so many zany hacks over the years to force it to do what I needed.
Granted, I did the major porting work to cmake 2.4. The newer versions are certainly better (no more duplicating the expression in IF()/ELSE()/ENDIF() statements!) but it's still pretty painful to write something non-trivial compared to any modern scripting language.
However, the results of cmake are fantastic. Once you've got your CMakeLists.txt's working you can largely forget about it -- it'll just work, completely cross platform. If you need to target both UNIX compilers and the Visual Studio world it's probably the best solution.