diff --git a/.prev_configure.cmake b/.prev_configure.cmake index 1ee218646b..3390c85588 100644 --- a/.prev_configure.cmake +++ b/.prev_configure.cmake @@ -621,18 +621,19 @@ if(CMAKE_INTERPROCEDURAL_OPTIMIZATION) set(__qt_ltcg_detected TRUE) else() foreach(config ${CMAKE_BUILD_TYPE} ${CMAKE_CONFIGURATION_TYPES}) - if(CMAKE_INTERPROCEDURAL_OPTIMIZATION_${config}) + string(TOUPPER "${config}" __qt_uc_config) + if(CMAKE_INTERPROCEDURAL_OPTIMIZATION_${__qt_uc_config}) set(__qt_ltcg_detected TRUE) break() endif() endforeach() + unset(__qt_uc_config) endif() qt_feature("ltcg" LABEL "Using LTCG" AUTODETECT ON CONDITION __qt_ltcg_detected ) -unset(__qt_ltcg_detected) qt_feature_config("ltcg" QMAKE_PRIVATE_CONFIG) qt_feature("enable_gdb_index" LABEL "Generating GDB index" diff --git a/configure.cmake b/configure.cmake index 984fe4b78a..0aceaaf905 100644 --- a/configure.cmake +++ b/configure.cmake @@ -634,18 +634,19 @@ if(CMAKE_INTERPROCEDURAL_OPTIMIZATION) set(__qt_ltcg_detected TRUE) else() foreach(config ${CMAKE_BUILD_TYPE} ${CMAKE_CONFIGURATION_TYPES}) - if(CMAKE_INTERPROCEDURAL_OPTIMIZATION_${config}) + string(TOUPPER "${config}" __qt_uc_config) + if(CMAKE_INTERPROCEDURAL_OPTIMIZATION_${__qt_uc_config}) set(__qt_ltcg_detected TRUE) break() endif() endforeach() + unset(__qt_uc_config) endif() qt_feature("ltcg" LABEL "Using LTCG" AUTODETECT ON CONDITION __qt_ltcg_detected ) -unset(__qt_ltcg_detected) qt_feature_config("ltcg" QMAKE_PRIVATE_CONFIG) qt_feature("enable_gdb_index" LABEL "Generating GDB index" diff --git a/util/cmake/configurejson2cmake.py b/util/cmake/configurejson2cmake.py index d81121b98f..29afd777e7 100755 --- a/util/cmake/configurejson2cmake.py +++ b/util/cmake/configurejson2cmake.py @@ -920,14 +920,15 @@ if(CMAKE_INTERPROCEDURAL_OPTIMIZATION) set(__qt_ltcg_detected TRUE) else() foreach(config ${CMAKE_BUILD_TYPE} ${CMAKE_CONFIGURATION_TYPES}) - if(CMAKE_INTERPROCEDURAL_OPTIMIZATION_${config}) + string(TOUPPER "${config}" __qt_uc_config) + if(CMAKE_INTERPROCEDURAL_OPTIMIZATION_${__qt_uc_config}) set(__qt_ltcg_detected TRUE) break() endif() endforeach() + unset(__qt_uc_config) endif()""", - "condition": "__qt_ltcg_detected", - "cmakeEpilogue": "unset(__qt_ltcg_detected)" + "condition": "__qt_ltcg_detected" }, "msvc_mp": None, "simulator_and_device": {"condition": "UIKIT AND NOT QT_UIKIT_SDK"},