diff options
author | Christian Stenger <[email protected]> | 2020-10-28 08:47:17 +0100 |
---|---|---|
committer | Christian Stenger <[email protected]> | 2020-10-28 13:12:54 +0000 |
commit | 050f6b083c4404d57914c9eb9ccc1d3e284e4e2a (patch) | |
tree | c9411663c6cbf42c3c277a108075736f1d2d693a | |
parent | ce413d81d0976317dbccfb172f66b9897c128fde (diff) |
Qbs: Fix linking tests when building release with tests
Change-Id: I5df34f06b5ca107b5e85cf6319d6d08aba244e5b
Reviewed-by: Christian Kandeler <[email protected]>
-rw-r--r-- | src/libs/tracing/tracing.qbs | 3 | ||||
-rw-r--r-- | src/plugins/cpptools/cpptools.qbs | 12 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/libs/tracing/tracing.qbs b/src/libs/tracing/tracing.qbs index 4705d9adc79..e037abb8281 100644 --- a/src/libs/tracing/tracing.qbs +++ b/src/libs/tracing/tracing.qbs @@ -9,6 +9,7 @@ Project { QtcLibrary { Depends { name: "Qt"; submodules: ["qml", "quick", "gui"] } + Depends { name: "Qt.testlib"; condition: project.withAutotests } Depends { name: "Utils" } Group { @@ -48,7 +49,7 @@ Project { Group { name: "Unit test utilities" - condition: qtc.testsEnabled + condition: project.withAutotests files: [ "runscenegraphtest.cpp", "runscenegraphtest.h" ] diff --git a/src/plugins/cpptools/cpptools.qbs b/src/plugins/cpptools/cpptools.qbs index 161ea3fd1d5..8740eddb360 100644 --- a/src/plugins/cpptools/cpptools.qbs +++ b/src/plugins/cpptools/cpptools.qbs @@ -8,6 +8,7 @@ Project { QtcPlugin { Depends { name: "Qt.widgets" } + Depends { name: "Qt.testlib"; condition: project.withAutotests } Depends { name: "CPlusPlus" } Depends { name: "Utils" } @@ -217,6 +218,15 @@ Project { ] Group { + name: "TestCase" + condition: qtc.testsEnabled || project.withAutotests + files: [ + "cpptoolstestcase.cpp", + "cpptoolstestcase.h", + ] + } + + Group { name: "Tests" condition: qtc.testsEnabled files: [ @@ -230,8 +240,6 @@ Project { "cppsourceprocessertesthelper.cpp", "cppsourceprocessertesthelper.h", "cppsourceprocessor_test.cpp", - "cpptoolstestcase.cpp", - "cpptoolstestcase.h", "modelmanagertesthelper.cpp", "modelmanagertesthelper.h", "symbolsearcher_test.cpp", |