diff options
author | Brad King <brad.king@kitware.com> | 2020-11-17 18:10:21 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-11-17 18:10:32 (GMT) |
commit | c9764c902dad40de397b6431ca7172fbdf02ca31 (patch) | |
tree | 7d9b4fd6a7429aa56cba43d32b383cc5fb185f2d | |
parent | c22f434c8304e6142d3fea54e932846afe4af59a (diff) | |
parent | c862e154182ef60eb5e5d543de328f69873d9584 (diff) | |
download | CMake-c9764c902dad40de397b6431ca7172fbdf02ca31.zip CMake-c9764c902dad40de397b6431ca7172fbdf02ca31.tar.gz CMake-c9764c902dad40de397b6431ca7172fbdf02ca31.tar.bz2 |
Merge topic 'msvc-14.28' into release-3.19
c862e15418 Suppress MSVC 14.28 C5105 warning triggered by Windows SDK
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5512
-rw-r--r-- | CompileFlags.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CompileFlags.cmake b/CompileFlags.cmake index 1c5f1be..e6fb20b 100644 --- a/CompileFlags.cmake +++ b/CompileFlags.cmake @@ -26,6 +26,12 @@ if(MSVC) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stack:10000000") endif() +# MSVC 14.28 enables C5105, but the Windows SDK 10.0.18362.0 triggers it. +if(CMAKE_C_COMPILER_ID STREQUAL "MSVC" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 19.28) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd5105") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd5105") +endif() + if(_CLANG_MSVC_WINDOWS AND "x${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Xlinker -stack:20000000") endif() |