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

-4

u/[deleted] Sep 14 '23 edited Sep 14 '23

[removed] — view removed comment

7

u/Tartifletto Sep 14 '23

Static library doesn't embark their dependencies, so all the dependencies chain have to be installed from top to bottom project.

So even if you had a package manager, you need to configure path & include directory & all the shit required to link against the dependency correctly in all of your project.

You don't configure anything yourself, package manager drags transitive dependencies of your static dependencies, and you rely on CMake config file or pkgconf file of your direct dependencies to give you all this transitive includes, definitions, lib paths, lib name etc through abstraction like find_package, CMake targets or pkg_check_modules. With a package manager and a good build system, transitive dependencies are an internal detail.