-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
One of the more reasons why meta-build systems are required over msbuild - and that's only papered-over by using complex add-ons like NuGet - is the inability for a project to set transitive properties.
For instance, if I have a project called A that creates a static library a.lib in Release/A/Debug and puts its header files in source/include/a and then also have a project called B that depends upon A, it is generally required to add a.lib to B's library inputs, add Release/A/Debug to B's library locations, and add 'source/include/a' to B's include directories. This extends to libraries that A might depend on; at most we have ways for B to pull in all of A's dependencies (Use Dependent Libraries) or none of them, but not a selective list.
There is currently no direct way to express this in MSBuild. At best, A can offer some kind of a.props file, but adding A as a reference to B will not automatically pull in that props file. Worse, the props file includes are all by-path so if you end up renaming or moving A you'll break B in multiple ways, making such maintenance unnecessarily burdensome.
At the very least, a way for a project to specify a props file to be used by referencees would be handy, if not a more complete way of specifying private and public properties.
Essentially, this bug is asking for CMake's PUBLIC, PRIVATE, and INTERFACE attribute visibility in MSBuild itself.