3 ms·
One of the above, depending on my current situation each of the above (and a few others you didn't mention) make the most sense. That is why the cmake for a pro
by bluGill 5y ago
One of the above, depending on my current situation each of the above (and a few others you didn't mention) make the most sense. That is why the cmake for a project shouldn't pull in dependencies, it should just build with whatever happens to be there or throw an error if something is missing.
Now there do exist "uber build systems" that are written in cmake. I'm fine with those existing (though I would probably not chose cmake to write it in, that is the author's choice). However when building a project you should not force a method to get dependencies on your users. The package management is a system level concern and you should not mess with it.
Note that I just put a lot of hate on systems like Cargo, pip, or hackage. Or google's pull everything into the one repository. Dependencies belong to tools like apt, rpm, yocto, ,snap, conan (when not building packages to install) - Microsoft/Apple are deficient for not providing them. Your program should just attempt to build with what it is given, not try to subvert my system - whatever it is. Yes I know it makes your life easier to not have to deal with more than one [possibly buggy] version of a dependency, but it makes my life worse.
- joshuamorton 5y ago> The package management is a system level concern and you should not mess with it. This makes anything approaching a hermetic/deterministic/reproducible build basically impossible. That's not good. How do I get consistent builds across systems if I have to hope that some (set of, if I'm building on multiple OSes) external dependencies give me the correct version of the package I'm looking for, especially since many of the tools you listed don't, for example, support multiple simultaneous versions of a particular package. I'm also confused by precisely what you mean by package management. Tools like pip cargo and bazel etc. Don't manage compiled binaries, but uncompiled sources. They deal with code dependencies, not dynamic library dependencies. Installing a source file via apt doesn't make a whole lot of sense.
- daemin 5y agoHave a script which downloads, installs, and builds dependencies. Have a script which generates build project/solution/script files for the actual build. These scripts can use whatever tools your organisation is most comfortable with, up to and including a mono repo.
- joshuamorton 5y agoYes. That seems reasonable. Gp suggested deferring such things to the os package manager (apt or pacman etc.) which doesn't, for example, handle keeping versions X and X+3 both available because I have different projects that depend on different versions.