diff options
Diffstat (limited to 'cmake/os')
-rw-r--r-- | cmake/os/Windows.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/os/Windows.cmake b/cmake/os/Windows.cmake index 9c870944541..eb56f599eb4 100644 --- a/cmake/os/Windows.cmake +++ b/cmake/os/Windows.cmake @@ -196,11 +196,18 @@ IF(MSVC) IF(MYSQL_MAINTAINER_MODE MATCHES "ERR") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX") + FOREACH(type EXE SHARED MODULE) + FOREACH(cfg RELEASE DEBUG RELWITHDEBINFO) + SET(CMAKE_${type}_LINKER_FLAGS_${cfg} "${CMAKE_${type}_LINKER_FLAGS_${cfg}} /WX") + ENDFOREACH() + ENDFOREACH() ENDIF() IF(MSVC_VERSION LESS 1910) # Noisy warning C4800: 'type': forcing value to bool 'true' or 'false' (performance warning), # removed in VS2017 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800") + ELSE() + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /d2OptimizeHugeFunctions") ENDIF() ENDIF() |