diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-01-30 14:21:34 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-01-30 20:45:17 +0000 |
commit | 2ed9aeb68755c92b810e20a37f484d32987d30a3 (patch) | |
tree | 91227febbf3eb7d4589c2fdad4b9b5bb75c201e8 /cmake/QtPostProcess.cmake | |
parent | 43d2b60a29df5397be4b4bead90f40346bf85dce (diff) |
Fix CMAKE_BUILD_TYPE to be force set
Otherwise CMake sets an up an empty default value itself, and then
the value in QtBuildInternalsExtra does not end up being used, and
then QtSetup ends up setting a Debug value.
Amends 34a112e383d4ce3f6fe7417c1873fd3b33176032
Change-Id: If97a1d8c19ad5e7f690283997ff80dd9588cd521
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'cmake/QtPostProcess.cmake')
-rw-r--r-- | cmake/QtPostProcess.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/QtPostProcess.cmake b/cmake/QtPostProcess.cmake index b16a466988..ab2cab447f 100644 --- a/cmake/QtPostProcess.cmake +++ b/cmake/QtPostProcess.cmake @@ -308,8 +308,12 @@ function(qt_generate_build_internals_extra_cmake_code) ${INSTALL_CMAKE_NAMESPACE}BuildInternals/QtBuildInternalsExtra.cmake) if(CMAKE_BUILD_TYPE) + # Need to force set, because CMake itself initializes a value for CMAKE_BUILD_TYPE + # at the start of project configuration (with an empty value), + # so we need to force override it. string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS - "set(CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\" CACHE STRING \"Choose the type of build.\")\n") + "set(CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\" CACHE STRING \"Choose the type of build.\" FORCE)\n") + endif() if(CMAKE_CONFIGURATION_TYPES) string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS |