Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
1.10.0
-
None
Description
Is it illogical to nest a Properties file inside a Group? I expected it to merge. This prevents including required qt headers. I'm trying to organize properties together with a relevant Group in a directory to manage a large project and 3rd party code. I also found that only one Properties is allowed in its own qbs file, rather than listing several mutually exclusive with conditions for different platforms, ie. mac/linux/windows. Anyway, if I cannot nest, then the only work-around I found is listing each Properties in the toplevel Product flatly, which defeats our organization and exposes deep directory trees, instead of just including a root Group for a huge directory tree.
This example shows how the nested Properties obliterates the outer c++ includes. Toggling the properties in app.qbs and hello.qbs reproduces the problem.
// app.qbs // qbs build --log-level trace --file app.qbs import qbs import "hello.qbs" as Hello import "properties.qbs" as GoodProperties QtGuiApplication { name: "myapp" Depends { name: "cpp" } Depends { name: "Qt"; submodules: [ "widgets" ] } Hello {} //GoodProperties {} }
// hello.qbs import qbs import "properties.qbs" as BadProperties Group { name: "hello" files: "hello.cpp" BadProperties {} }
// properties.qbs Properties { condition: true //cpp.includePaths: base.concat( "/troubleToo" ) cpp.includePaths: [ "/trouble" ] }
Here are the good and bad compile commands generated. Notice the missing Qt Headers paths.
Good /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -g -O0 -Wall -Wextra -target x86_64-apple-macosx10.10-macho -F/Users/rziemlinski/3ps/qt/5.9.2/dist/lib -F/Users/rziemlinski/3ps/qt/5.9.2/dist/lib -F/Users/rziemlinski/3ps/qt/5.9.2/dist/lib -pipe -fexceptions -fvisibility=default -fPIC -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -I/trouble -I/Users/rziemlinski/3ps/qt/5.9.2/dist/lib/QtCore.framework/Headers -I/Users/rziemlinski/3ps/qt/5.9.2/dist/mkspecs/macx-clang -I/Users/rziemlinski/tmp/qbsHello/default/myapp.94e7d341/qt.headers -I/Users/rziemlinski/3ps/qt/5.9.2/dist/lib/QtGui.framework/Headers -I/Users/rziemlinski/3ps/qt/5.9.2/dist/lib/QtWidgets.framework/Headers -std=c++0x -stdlib=libc++ -o /Users/rziemlinski/tmp/qbsHello/default/myapp.94e7d341/3a52ce780950d4d9/hello.cpp.o -c /Users/rziemlinski/tmp/qbsHello/hello.cpp Bad /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -g -O0 -Wall -Wextra -target x86_64-apple-macosx10.10-macho -F/Users/rziemlinski/3ps/qt/5.9.2/dist/lib -F/Users/rziemlinski/3ps/qt/5.9.2/dist/lib -F/Users/rziemlinski/3ps/qt/5.9.2/dist/lib -pipe -fexceptions -fvisibility=default -fPIC -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -I/trouble -std=c++0x -stdlib=libc++ -o /Users/rziemlinski/tmp/qbsHello/default/myapp.94e7d341/3a52ce780950d4d9/hello.cpp.o -c /Users/rziemlinski/tmp/qbsHello/hello.cpp ERROR: /Users/rziemlinski/tmp/qbsHello/hello.cpp:2:10: fatal error: 'QApplication' file not found