Also, being old, I don't know why anybody would want to introduce Node style dependency hell into any C++ project when "configure" exists. https://thoughtbot.com/blog/the-magic-behind-configure-make-...
More properly, autotools exists. There are reasons CMake has largely taken over from autotools, despite the considerable problems CMake has. I imagine CMake's far superior Windows support might be the main reason.
CMake supports pkg-config, for what that's worth.
> In addition, there is another problem, that is, we need to additionally call the vcpkg install [packages] command to install this package. > > Each of these links requires an additional exploration process for users, and it is impossible to achieve real one-click compilation.
And personally I don't think that this "real one-click compilation" should be a goal. On the contrary, I think the current process is pretty much exactly how it should work - first you install your dependencies via your package manager, then you can inspect/vet/whatever them if you want, and then you let your build system build.
[1] https://cmake.org/cmake/help/latest/module/ExternalProject.h... [2] https://cmake.org/cmake/help/latest/module/FetchContent.html
And in CMake support for Conan is literally a single line of code: conan_basic_setup()
https://docs.conan.io/en/latest/getting_started.html
On top of all this, it's really mind-boggling how a build system's main selling point is doing something a build system has no business doing.
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.
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.
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.
The only real downside I've encountered is that it if you want to do something very specific, it can be frustrating to find out how. The documentation can be somewhat unclear or lacking at times (I don't blame the author, their native language isn't English), and there is so little content out there that Google always corrects "xmake" to "cmake" in your searches.
That's quite the odd statement. CMake is extremely easy to use, just works, and handles everything at all that everyone needs, from building cross-platform projects comprised of multiple programming languages, tests, dependencies, and even packaging.
In your opinion, what makes xmake worth the trouble?
Let's even put up a concrete example. Say I have a cmake project. It handles dependencies with a mix of ExternalProject_Add(), Conan, and even a stashed folder of vended third-party binaries. Also, it handles tests, and packaging, and it runs in a CICD pipeline that does it all on a couple of target platforms. Why would anyone switch that project to xmake?
One of the best build systems I've ever used. The author replied to my question within a day on the Discord.
It's an underrated build system. Easiest thing, and has support for just about every language under the sun baked in, even obscure ones.
One of my favorite features particular to C++ is that you can configure dependencies to use local libraries, vcpkg, or Conan specifically.
Before anyone knocks it, highly suggest giving it a try on your next personal project.
This was the only substantiated claim you made in your whole post, but it refers to stuff that most standard build systems already do, specially cmake.
In fact, it's even trivial to hack together a plain old Makefile to add a target that invokes vcpkg or conan to fill in dependencies.
What exactly do you believe makes xmake worth the trouble?
it needs some big sponsorship to be mainstream, a very promising project, best wishes.
Except I personally do not mind this kind of churn. Bring it on, the more the merrier! Having choice is good, and one day someone will strike a gold nugget, no doubt.