Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
3.0.0
-
None
Description
Project { property string file: "path/to/source.cc" StaticLibrary { name: "hal" Depends { name: "cpp" } files: project.file // The only way to prevent hal from being linked in app // Export { // Depends { name: "cpp" } // Parameters { // cpp.link: false // } // } } StaticLibrary { name: "middleware" Depends { name: "cpp" } Depends { name: "hal" } files: project.file } Application { name: "app" Depends { name: "cpp" } Depends { name: "hal"; cpp.link: false } Depends { name: "middleware" } files: project.file } }
Expected behavior:
- app does not link to lib hal
- scalar dependency parameters in "app" (final product) should always take precedence over dependency parameters further down the line
Actual behavior:
- app is linked to lib hal
- cpp.link doesn't have any effect when setting it to false in lib middleware either
- cpp.link has only an effect when explicitly setting it in lib hal's Export item like shown above or when removing middleware's dependency on hal and leaving app as the only consumer.
App in this case is a test application that mocks lib hal. In this special case, symbols of lib hal will be overridden anyway, so it's not dramatic. But symbols that are not overridden by app will silently link to lib hal which is not what I want. Anyway, the way it currently works is surprising and unexpected.