3 ms·
I'm curious if you've ever worked with something like cargo or go build. CMake works well for what it does, but it doesn't do the right things if you've ever se
by jupp0r 8y ago
I'm curious if you've ever worked with something like cargo or go build. CMake works well for what it does, but it doesn't do the right things if you've ever seen more modern solutions to the same problem.
- bpicolo 8y ago> anything other than CMake I think OP is on the same page
- hoistbypetard 8y agoCould you expand on this a little? I've dabbled with go build, but it didn't make me want to run screaming away from CMake. Where do you think it's not doing the right thing? I really like that it can generate project files that let me use the most useful debuggers on whatever platform I'm targeting. I think some aspects of its scripting language are a challenge to work with, but that has felt like a small price to pay for being able to easily work/debug in VS on Windows, Xcode on Mac, etc.
- jupp0r 8y ago* lack of dependency management * no concept of versions to declare API compatibility * no easy way to hook into a central package repository * source files to build have to be named manually in CMakeLists.txt * header dependencies can easily be wrongly declared, which is never noticed * the language is hard to work with * it's quite slow for large projects (10s of thousands of compilation units) * cross-language builds are a pain (C++ + JS) I'm not saying this is all CMake's fault, I really like it for the reasons you outlined. At work, we are transitioning to Bazel to get rid of some of the pain points above, although it has different problems. Having worked on some larger Go and Rust projects, I find the integration of language and build tools to be fantastic to work with and wish the C++ community would come up with a practical solution (probably involving Modules TS) at some point.
- konschubert 8y agoI think you got GP wrong.
- weberc2 8y agoYeah, I've worked with both cargo and go build. I like both of these, but I disagree that CMake works well for what it does for a number of reasons (including most/all of your list in the reply to a sibling comment). :)