Browse Source

Add compile flags from conf.pri.windows file to cmake

adaptive-webui-19844
Chocobo1 4 years ago
parent
commit
a675b9305b
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 9
      cmake/Modules/MacroQbtCommonConfig.cmake

9
cmake/Modules/MacroQbtCommonConfig.cmake

@ -95,4 +95,13 @@ macro(qbt_common_config) @@ -95,4 +95,13 @@ macro(qbt_common_config)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
if (MSVC)
target_compile_options(qbt_common_cfg INTERFACE /guard:cf)
target_link_options(qbt_common_cfg INTERFACE /guard:cf
$<$<NOT:$<CONFIG:Debug>>:/OPT:REF /OPT:ICF>
# suppress linking warning due to /INCREMENTAL and /OPT:ICF being both ON
$<$<CONFIG:RelWithDebInfo>:/INCREMENTAL:NO>
)
endif()
endmacro(qbt_common_config)

Loading…
Cancel
Save