Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
1.12.2
-
None
Description
Quick summary:
- The problem only shows up if the Qt dependency is there. If there is only a cpp dependency the problem cannot be reproduced.
- The problem only shows up if the build dir is empty and you try to build two configurations
- If there is already one configuration in the build folder the problem only shows up when the first config specified in the command line is the one that does not yet exist
Assume there is a valid qt setup of qbs named, e.g. "qt597".
Also given is the following simple qbs project:
— qbs-test.qbs
import qbs CppApplication { Depends{ name: "Qt.core" } targetName: qbs.buildVariant === "debug" ? "test_debug" : "test" files: ["main.cpp"] }
— main.cpp
int main( int, char** ) { return 0; }
Now
- open a command prompt and cd into the project folder
- run qbs in the following ways (beware build-directory usage, it is not required but makes clean up easier between test cases)
(1) single-debug
Make sure the test folder is gone or empty.
> qbs config:debug profile:qt597 --build-directory ./test
OK: debug build inside ./test/debug
(2) single-release
Make sure the test folder is gone or empty.
> qbs config:release profile:qt597 --build-directory ./test
OK: release build inside ./test/release
(3) debug and release
*Make sure the test folder is gone or empty.*
> qbs config:debug config:release profile:qt597 --build-directory ./test
FAIL: only release folder inside test that only contains release.bg
output:
Build graph does not yet exist for configuration 'release'. Starting from scratch. Resolving project for configuration release Build graph does not yet exist for configuration 'debug'. Starting from scratch. Resolving project for configuration debug ERROR: .../qbs-test/qbs-test.qbs:3:1 Error while handling product 'qbs-test': .../qbs-test/qbs-test.qbs:4:2 Dependency 'Qt.core' not found for product 'qbs-test'. Please create a Qt profile using the qbs-setup-qt tool if you haven't already done so. Setting up build graph for configuration release ERROR: Execution canceled.
NOTE: if you exchange config:debug and config:release test contains debug instead.
(4) first single, then both
NOTE: for this test case it's not important if the first build is debug or release unless it's a single config:xxx parameter
*Make sure the test folder is gone or empty.*
> qbs config:debug profile:qt597 --build-directory ./test
OK: debug build inside ./test/debug
> qbs config:debug config:release profile:qt597 --build-directory ./test
OK!!!: debug and release build in ./test
BUT if you would execute
> qbs config:release config:debug profile:qt597 --build-directory ./test
instead, you would get the same error as above.
So first debug, then debug release works, but first release then debug release does not work (always start with empty build dir)
(5)
When i specify the profile first, it just works:
> qbs profile:qt597 config:debug config:release --build-directory test
OK: debug and release build in ./test
Attachments
For Gerrit Dashboard: QBS-1425 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
251850,5 | Clarify the meaning and usage of the build configuration parameter | master | qbs/qbs | Status: MERGED | +2 | 0 |