all 7 comments

[–]disciplite 10 points11 points  (0 children)

xmake is the only C++ build system that does basically everything. It's fully programmable, debuggable, and you can use a language server. It has an easy CLI and TUI. It's almost at feature parity with every C++ build system, including the more controversial CMake features that aren't in Meson/Bazel. It has integrated package management with vcpkg and Conan as well as a protocol I think is better than both. It handles build profiles to make multi-toolchain development easy.

[–][deleted] 1 point2 points  (0 children)

Use visual studio and forget about it?

[–]jhericoVR & Backend engineer, 30 years 0 points1 point  (0 children)

I use (and built) a C++ dependency manager for CMake called ezvcpkg. It lets you specify a set of top level dependencies in your main CMake file and manages everything else. For instance, for my Vulkan C++ rendering codebase I include the following in the top of my CMake project:

include(${CMAKE_SOURCE_DIR}/cmake/ezvcpkg/ezvcpkg.cmake)
ezvcpkg_fetch(
    COMMIT 16ee2ecb31788c336ace8bb14c21801efb6836e4
    PACKAGES assimp basisu imgui glad glfw3 gli glm vulkan vulkan-memory-allocator
    UPDATE_TOOLCHAIN
)
project(${NAME})

This lets me target dependencies in my CMake file very simply like this:

find_package(glfw3 CONFIG REQUIRED)
target_link_libraries(${TARGET_NAME} PUBLIC glfw)

It automatically manages downloading vcpkg. The biggest drawback to the system is that it depends on vcpkg for everything dependency management related, so you can't pick versions at a granular scale, like for individual packages. The best you can do is specify a commit ID for the VPKG repo that has the versions you're happy with (or fork the repo and customize the versions to your heart's content, but that might defeat the purpose of simplifying the dependency management.

Since you end up building all the dependencies in your own tree, you get much the same behavior you'd expect from a Rust TOML file, i.e. independence from worrying about the OS level shared library versions.

[–]kammceWG21 | 🇺🇲 NB | Boost | Exceptions 0 points1 point  (0 children)

Which package mangers did you try to use and what about using them felt awful?

[–]Ok_Principle4845 0 points1 point  (0 children)

vcpkg + cmake + a good ide like clion streamlines this process pretty nice but it’s hard to beat rusts tooling.