summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-11-12 12:57:17 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-11-12 13:21:31 +0000
commit17e2befe2a18fcb29a17bd51d16e4ba935d9f7ef (patch)
tree8daa5784ce0f5c853ad995e9e991798a07ee6a2a
parente6a845ad88d0638a43c526f0de4115d9546b00a2 (diff)
Don't install QtFooTestsConfig.cmake if no modules were built
When configuring qtx11extras on macOS, we ended up installing the file, which made Coin think that at least one module was built, and thus it tried to build tests as well. Don't install the file if no modules were built, thus preventing from trying to build tests in Coin. Amends de3a806def4b9a754825a2233c9d4952a9b2d0eb Change-Id: I920a0b40a6ded12140f251352da53b68eef6560d Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--cmake/QtPostProcess.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/QtPostProcess.cmake b/cmake/QtPostProcess.cmake
index c6b4e8c4dd..b063562937 100644
--- a/cmake/QtPostProcess.cmake
+++ b/cmake/QtPostProcess.cmake
@@ -358,6 +358,12 @@ function(qt_internal_create_config_file_for_standalone_tests)
list(JOIN QT_REPO_KNOWN_MODULES " " QT_REPO_KNOWN_MODULES_STRING)
string(STRIP "${QT_REPO_KNOWN_MODULES_STRING}" QT_REPO_KNOWN_MODULES_STRING)
+ # Skip generating and installing file if no modules were built. This make sure not to install
+ # anything when build qtx11extras on macOS for example.
+ if(NOT QT_REPO_KNOWN_MODULES_STRING)
+ return()
+ endif()
+
# Ceate a Config file that calls find_package on the modules that were built as part
# of the current repo. This is used for standalone tests.
configure_file(