Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
2.6.0
-
None
Description
I have a project with a custom modules in different flavors for different target platforms
// modules/buildconfig/BaseModule.qbs Module { condition: false // not to be used property string platform } // modules/buildconfig/platform1.qbs BaseModule { condition: { console.warn("Platform: " + platform) // debug print return platform === "platform1" } }
The actual platform is selected from command line as an override:
modules.buildconfig:platform1
It looks like the override is applied only very late in the process, but not when resolving module candidates. platform is always "undefined" in above scenario except for the final resolver pass. But that is too late. Qbs aborts with "Dependency "buildconfig" not found for product "xxx".
Only when I change the condition to:
platform === undefined || platform === "platform1"
the module is found. But that won't work with multiple module candidates.
The behavior is unexpected. Module overrides from command line should always be taken into account, just like profile settings.