diff options
author | Brad King <brad.king@kitware.com> | 2020-11-17 16:41:52 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-11-17 16:50:50 (GMT) |
commit | c862e154182ef60eb5e5d543de328f69873d9584 (patch) | |
tree | 7d9b4fd6a7429aa56cba43d32b383cc5fb185f2d /CompileFlags.cmake | |
parent | c22f434c8304e6142d3fea54e932846afe4af59a (diff) | |
download | CMake-c862e154182ef60eb5e5d543de328f69873d9584.zip CMake-c862e154182ef60eb5e5d543de328f69873d9584.tar.gz CMake-c862e154182ef60eb5e5d543de328f69873d9584.tar.bz2 |
Suppress MSVC 14.28 C5105 warning triggered by Windows SDK
Issue: #21446
Diffstat (limited to 'CompileFlags.cmake')
-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() |