diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-08-22 11:09:45 +0200 |
---|---|---|
committer | Jörg Bornemann <joerg.bornemann@qt.io> | 2019-08-25 14:47:22 +0000 |
commit | 7cbe1ca33da54cf2b6c8494bad39b6570f798014 (patch) | |
tree | 95f7cc0ed0b26ec6cbc99e063a784440e9cca667 /mkspecs/features/create_cmake.prf | |
parent | fd785c3899d21dd05fd013336bbc63ce818dc2a6 (diff) |
CMake: Fix detection of debug_and_release for Windows builds
If Qt is configured with -release or -debug we must set CMAKE_DEBUG_TYPE
or CMAKE_RELEASE_TYPE, but not both.
This was broken by 82a2c7df which fixed the issue for iOS
simulator_and_device builds.
We have the following situation for both relevant CONFIG values:
debug_and_release build_all
iOS simulator_and_device unset set
Windows -release set unset
Windows -debug-and-release set set
Trivia: On Windows, when configuring with -release (or -debug) then
the *feature* debug_and_release is not set.
The *CONFIG* *value* however, is unconditionally set in
msvc-desktop.conf.
Fixes: QTBUG-77754
Change-Id: I326ecb024056bc189be5fa03ec6f59bc71226544
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'mkspecs/features/create_cmake.prf')
-rw-r--r-- | mkspecs/features/create_cmake.prf | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index 65c637244b..8100128441 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -138,8 +138,8 @@ CMAKE_RELEASE_TYPE = # the debug libraries at build time. equals(QMAKE_HOST.os, Windows): CMAKE_BIN_SUFFIX = ".exe" -debug_and_release|CONFIG(debug, debug|release): CMAKE_DEBUG_TYPE = debug -debug_and_release|CONFIG(release, debug|release): CMAKE_RELEASE_TYPE = release +if(debug_and_release:build_all)|CONFIG(debug, debug|release): CMAKE_DEBUG_TYPE = debug +if(debug_and_release:build_all)|CONFIG(release, debug|release): CMAKE_RELEASE_TYPE = release # CMAKE_DEBUG_AND_RELEASE is used to tell the _populate_$${CMAKE_MODULE_NAME}_target_properties # functions whether a Configuration specific generator expression needs to be added to the values |