markfinal / BuildAMation

Build system and project generator for C/C++ desktop software development. Uses C# for build scripts. It is no longer under active development.
http://buildamation.com
BSD 3-Clause "New" or "Revised" License
14 stars 9 forks source link

Time to retire CompileAndLinkAgainst? #664

Open markfinal opened 4 years ago

markfinal commented 4 years ago

With the move towards an SDK structure, individual Modules that build libraries now don't export patches that set things up for compilation. Only link.

An illustration of this is the Zlib library (first to convert). Some old code still tried to use the lib, rather than the SDK, which on Windows failed, but on macOS and Linux worked, because the headers were found from the system, but the built library was linked against. In the long term, this is going to cause a lot of headaches with linker errors of mismatching headers to libs.

So, either retire CompileAndLinkAgainst, or require it to be more precise.

E.g. add some interfaces that Modules must implement in order to be 'compilagainst-able', i.e. must provide a patch for compilation.

markfinal commented 4 years ago

I'm wondering whether this is actually a Core option. Modules, by default, only have private patches. And you have to opt-in, with an interface, to identify Modules that have a patch for use in the dependency chain.