From 5bf9ad7d82699e13800524fc07fea8d2cee720f5 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Wed, 22 Feb 2023 13:22:08 -0800 Subject: [PATCH] msvc: enable compiler checks added in vs 17.5 --- CMakeLists.txt | 2 +- Source/VSProps/Base.props | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2530c1a0ef..4fd3972ad2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -326,7 +326,7 @@ if(MSVC) # Note: In msbuild build, this gets set by msbuild by default add_compile_options(/Zc:inline) # Fix various other non-conformant behaviors - add_compile_options(/Zc:__cplusplus,enumTypes,externConstexpr,preprocessor,throwingNew) + add_compile_options(/Zc:__cplusplus,enumTypes,externConstexpr,preprocessor,templateScope,throwingNew) # Enforce strict volatile semantics as per ISO C++ add_compile_options(/volatile:iso) diff --git a/Source/VSProps/Base.props b/Source/VSProps/Base.props index 92808650d1..9fc87b6713 100644 --- a/Source/VSProps/Base.props +++ b/Source/VSProps/Base.props @@ -33,8 +33,7 @@ true - - /Zc:__cplusplus,enumTypes,externConstexpr,preprocessor,throwingNew /volatile:iso %(AdditionalOptions) + /Zc:__cplusplus,enumTypes,externConstexpr,preprocessor,templateScope,throwingNew /volatile:iso %(AdditionalOptions) /Zo %(AdditionalOptions) @@ -74,8 +73,7 @@ true MultiThreadedDLL false - - /Gw %(AdditionalOptions) + /Gw /Zc:checkGwOdr %(AdditionalOptions) true