3 ms·
> The dependencies do change depending on the user. Different version of libraries will be in different locations, may require different build flags, etc, etc.
by enriquto 8y ago
> The dependencies do change depending on the user. Different version of libraries will be in different locations, may require different build flags, etc, etc. Likewise the build may support a range of compilers which require (sometimes completely) different compiler options for a successful build.
What you say is true, but it can be interpreted as either positive or negative features. I would say that code that depends on specific versions of a library or specific compiler options is bad code; and propagating bad code instead of fixing it is not a good idea. Cmake makes it very easy and convenient to ship bad code, as you explain. Thus, it is a force of evil! It allows, even encourages, the programmers to be sloppy without short-term visible consequences.
- rcxdude 8y agoI'm talking about trying to make a shared library versus a static library vs an executable, or include different directories. I'm not talking about depending on '-O2' for correctness. Likewise with different versions of a library in different locations. And even in the case of more obscure flags, the cause is usually bad or incompatible compilers or libraries, not 'bad code' on the part of the project. A build system needs to be able to deal with a large variety of situations, because ultimately the responsibility for making the project build is on the project and the build system, not the user and their environment.