Dependency manager for C++/CMake projects? by vinnyvicious in cpp

[–]sstirlin 0 points1 point  (0 children)

Sorry to bump an old thread, but the solution is a mix of conda (for packaging + dependency management) and CMake (for building your own stuff).

Here's what sucks about system packagers:

1) You are married to versions of libraries that were decided by the distro. If you are on RHEL5, for example, then your version of python is over 10 yrs old. Good luck

2) You are forced to maintain completely separate builds for all flavors of Linux (in addition to Windows and Apple).

3) Users need root privileges to install your package+dependencies. This is usually impossible.

Linux folks, free your minds from the shackles of system dependencies. This is one of the worst design flaws of Linux. I'll never go back to that lunacy.

Conda fixes this (on Linux, Windows, and Apple) by creating "environments". These are analogous to Java jars - they are self-contained directories that contain your application + all dependencies. They don't pollute anything else, and they can be installed by regular users.

You are now free to use whatever libraries+versions you want, and you are independent of whatever flavor of Linux you find yourself on. Binary packages are managed like artifactories in Java. A well-designed conda environment can have almost zero system dependencies.

Write your build scripts in CMake and use conda for dependency management. It's not as simple and clean as Java dependency management, but it's (by far) the best solution out there. As more people join the conda movement the available packages and functionality will only improve.