Details
-
Bug
-
Resolution: Done
-
P2: Important
-
0.1
-
None
-
qbs from git head=85a752b05203efa7f997bdf7dc07f8bdb7d896b9, Qt 4.7.4, compiling with msvc 2010 on Win 7.
Description
Attached are 2 qbp files. Neither one compiles. It looks like qbs has trouble with more than one Properties block that define similar properties, even when all but one have a condition that is false. As far as I can see there shouldn't be a problem with this setup, since you're allowed multiple Groups, Depends, etc.
In Prop1.qbp, a Properties with condition:false manages to cause a prior cpp.defines property to fail to evaluate - comment out the Properties at line 15 and everything works fine and defines the expected macros.
D:\workitems\qbs-bugs>qbs -f Prop1.qbp D:\workitems\qbs-bugs\Prop1.qbp:7 Error: Undefined property 'base'
Prop2.qbp is similar but with line 7 removed - which allows qbs to get further, but manages to remove everything from "cpp.defines" (including built-ins like UNICODE).
D:\workitems\qbs-bugs>qbs -f Prop2.qbp Found project file D:\workitems\qbs-bugs\Prop2.qbp loading project took: 93 ms build graph took: 31 ms for debug: - [hpp, application] Prop2 as debug Scanning for file dependencies... compiling main.cpp C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe/nologo /c /Zm200 /Zc:wchar_t- /EHsc /Zi /MDd /FoD:\wor kitems\qbs-bugs\build\debug\.obj\Prop2\main.obj D:\workitems\qbs-bugs\main.cpp D:\workitems\qbs-bugs\main.cpp(2) : fatal error C1189: #error : "Missing ConditionalMacros!" ERROR: Process failed with exit code 2. ERROR: The following products could not be built: Prop2. Build failed.
The macros missing from the cl.exe invocation above are: /DUNICODE /DWIN32 /DConditionalMacros
(I would have expected Prop2 to fail to compile because I had to remove the definition of UnconditionalMacros in order for the compile to get that far, but it's failing before that becomes a problem)