4 ms·
It's indeed going to be very, very, hard to retrofit a package manager into C++. You could structure something around CMake. One immediate issue is compilatio
by shin_lao 8y ago
It's indeed going to be very, very, hard to retrofit a package manager into C++.
You could structure something around CMake.
One immediate issue is compilation flags and platforms management. You may need to use some custom flags, for example, you need to compile against a specific architecture. You want those flags to be passed to all libraries uniformly.
But the horrible problem is quickly the compatibility matrix.
In other words, if you are making available, let's say you are using alib v1 and blib v2, you need to check the two libraries compile, link, and work together nicely. So when you upgrade one of the libraries, you need to check that compatibility again.
It's an important problem because if you're working on production software, you need to be able to build all versions and maintain them. And maybe you will have to upgrade only one library. You can't always be "current" everywhere.
So very quickly, using a package manager becomes more painful than having the libraries management manually with a couple of custom scripts.
I'll be happily be proven wrong by a package manager (and we tried a lot).
- brobdingnagians 8y agocget appears to be structured around CMake, looks like a pretty simple, minimalistic effort that would afford some convenience https://cget.readthedocs.io/en/latest/src/intro.html https://cget.readthedocs.io/en/latest/src/intro.html
- dcuthbertson 8y agoI can't say I'd be a fan of a CMake based package manager. While CMake has been a great tool under Linux environments (I've used it for C/C++ builds, and in mixed C & Go build environments), I've also experienced horrors when CMake is used to generate Visual Studio solution and project files. I mostly work in Windows development. CMake scripts created by a professional build engineer caused a lot of havoc. It injected itself into the project files in such an insidious fashion, that it was nearly impossible to tell if dependencies were correct. It completely broke Intellisense, making code navigation an exercise in frustration. I was not happy, and wound up ripping out the scripts and creating new solution and project files that actually supported the needs of the developers. (Edited to remove typos and improve grammar)
- je42 8y agoHunter does this. it is built on top of CMake