From c800a6240353eb54bd7a2ad06c455ac9374c2476 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 2 Dec 2019 13:21:23 +0100 Subject: 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 Reviewed-by: Alexandru Croitor --- cmake/QtFeature.cmake | 4 ++++ 1 file changed, 4 insertions(+) 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) -- cgit v1.2.3