diff options
author | Yuhang Zhao <2546789017@qq.com> | 2020-11-03 11:47:25 +0800 |
---|---|---|
committer | Yuhang Zhao <2546789017@qq.com> | 2020-11-04 10:07:50 +0000 |
commit | f9e45287d820b8af2d40050288034c7ba8262d26 (patch) | |
tree | 690a18fb561ddb8a4eb69bac8e834adfc94a4c71 /cmake | |
parent | 319fa51fa434847766585f6ecfb926bd6b40e987 (diff) |
CMake: don't add the same parameter twice
Change-Id: Ic5001f296b56f1181f5e37718e090f931eca8b50
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtInternalTargets.cmake | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index 108571e759..84faba1413 100644 --- a/cmake/QtInternalTargets.cmake +++ b/cmake/QtInternalTargets.cmake @@ -122,13 +122,6 @@ endif() target_compile_definitions(PlatformCommonInternal INTERFACE $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>) -if(MSVC) - # To mimic mkspecs/common/msvc-desktop.conf add optimization flag for non-debug configs. - # In qmake, the flag is added to any user project built with qmake. In CMake land, to be on the - # safe side, only add when building Qt itself. - target_link_options(PlatformCommonInternal INTERFACE "$<$<NOT:$<CONFIG:Debug>>:/OPT:REF>") -endif() - function(qt_internal_apply_bitcode_flags target) # See mkspecs/features/uikit/bitcode.prf set(release_flags "-fembed-bitcode") @@ -201,8 +194,7 @@ if (MSVC) target_link_options(PlatformCommonInternal INTERFACE -DYNAMICBASE -NXCOMPAT - $<$<CONFIG:Release>:-OPT:REF> - $<$<CONFIG:RelWithDebInfo>:-OPT:REF> + $<$<NOT:$<CONFIG:Debug>>:-OPT:REF> ) endif() |