Hacker News new | ask | show | jobs
by mc4ndr3 1554 days ago
cmake does provide support for conan and other C/C++ ecosystem tools via plugins. It works okay.

I'm not sure adding a layer of Lua helps the situation.

cmake isn't perfect, but the best we have for now. The C++ community has unfortunately been loathe to select a language-wide build tool cum package manager. It's like the early days of Go with all the warring Go dependency systems.

1 comments

I didn't buy into the package manager aspect of it, but it's my favorite build tool out of CMake/Bazel/Meson/DDS.

One area where it really shines is if you have a cross-language project. Say you are building a shared/static library in C/C++/Rust/D whatever, and you want to use it in some other language.

In XMake you can set up a build file that can compile the native library in one language, include it in the other language, and then compile that, in like ~10 lines.

Also, it has support for generating CMakeLists.txt automatically, for people that don't want to use XMake. I always commit this to my XMake projects.

> In XMake you can set up a build file that can compile the native library in one language, include it in the other language, and then compile that, in like ~10 lines.

Keep in mind that in CMake, that is done by listing the language in program(some program LANGUAGES CXX OBJC ETC) and afterwards you pass the source file list to add-library or add_executable, and CMake takes it from there.