summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-12-02 13:21:23 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-12-02 12:27:33 +0000
commitc800a6240353eb54bd7a2ad06c455ac9374c2476 (patch)
tree446ce6808791ab2c788841cae939c7edec863979
parent8dc49161bbb6aaae98522609c97803704f971569 (diff)
Cache qt_config_compile_test results
Inside qt_config_compile_test we use two different calls: check_cxx_source_compiles when given code, and try_compile when given a project. The former caches its results, while the latter does not, which means that the try_compile calls are re-executed on each reconfigure. Do what check_cxx_source_compiles does internally, and don't rerun the try_compile calls if the results were computed once. Change-Id: I2691ff08b7bb46c3fa60bbf5ed6278731c9b8e21 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--cmake/QtFeature.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/QtFeature.cmake b/cmake/QtFeature.cmake
index ef247f9c4c..9849390922 100644
--- a/cmake/QtFeature.cmake
+++ b/cmake/QtFeature.cmake
@@ -472,6 +472,10 @@ function(qt_feature_copy_global_config_features_to_core target)
endfunction()
function(qt_config_compile_test name)
+ if(DEFINED "TEST_${name}")
+ return()
+ endif()
+
cmake_parse_arguments(arg "" "LABEL;PROJECT_PATH;C_STANDARD;CXX_STANDARD" "LIBRARIES;CODE" ${ARGN})
if(arg_PROJECT_PATH)