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 34a112e383
Change-Id: If97a1d8c19ad5e7f690283997ff80dd9588cd521
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
43d2b60a29
commit
2ed9aeb687
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user