r/cpp • • Sep 14 '23

Which package manager are you using?

It's 2023 and you should be using a package manager. Which one?

Sep 17 '23
466 conan
625 vcpkg
29 spack
82 CPM
1730 No package manager :(
248 Other (please specify)
38 Upvotes

187 comments sorted by

View all comments

83

u/Artikash Sep 14 '23

Does git submodule count as a package manager?

21

u/hak8or Sep 14 '23

I echo this, I also use git submodules and prefer them to others. Versioning should stay in version control, not mixed with the build system, in my opinion.

That way if I need to change the build system for some odd reason, the information of what version each package uses is unchanged in terms of git history.

3

u/prince-chrismc Sep 14 '23

This is why Conan supports multiple build systems with seamless integrations so you as a developer have choices.

You absolutely should check in your conanfile.txt and conan.lock into version control so they are tied.

The gain is the freedom to change your deps (add remove update) with no change to your build pipeline and local dev flow. The "oh you forgot to install" is totally unnecessary IMO