summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-11-13 10:20:09 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-11-13 10:00:34 +0000
commit250ad9843ff14a42bdcc8937ac0bea12317fe622 (patch)
tree5b7a8e28d84c615bef2581edf992390729407810 /cmake
parente7f188b2d2f10941006be7b0e7197b3c1ebdefdb (diff)
Always build tests by default when building standalone tests
Amends 021c17c62f963a682c6a4b19f0c3d362c28a97ee Change-Id: I8181270ef7506eb5da4d3b43e105e100ed5581e4 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtSetup.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/QtSetup.cmake b/cmake/QtSetup.cmake
index f53388a27f..feb7c6b736 100644
--- a/cmake/QtSetup.cmake
+++ b/cmake/QtSetup.cmake
@@ -93,6 +93,10 @@ if(QT_BUILD_STANDALONE_TESTS)
# BuildInternals might have set it to OFF on initial configuration. So force it to ON when
# building standalone tests.
set(BUILD_TESTING ON CACHE BOOL "Build the testing tree." FORCE)
+
+ # Also force the tests to be built as part of the default build target.
+ set(QT_NO_MAKE_TESTS OFF CACHE BOOL
+ "Should examples be built as part of the default 'all' target." FORCE)
endif()
option(QT_NO_MAKE_TESTS "Should tests be built as part of the default 'all' target." OFF)