Merge pull request #10550 from shuffle2/cpp-conform
msvc: enable conformant __cplusplus macro
This commit is contained in:
commit
c028f96280
|
@ -265,7 +265,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
|||
# Fix non-conformant lambda behavior (constexpr variables shouldn't need capturing)
|
||||
add_compile_options(/experimental:newLambdaProcessor)
|
||||
# Fix various other non-conformant behaviors
|
||||
add_compile_options(/Zc:externConstexpr,lambda,preprocessor)
|
||||
add_compile_options(/Zc:__cplusplus,externConstexpr,lambda,preprocessor)
|
||||
|
||||
# Temporarily disable warnings to enable /Zc:preprocessor compatibility with WinSDK headers.
|
||||
add_compile_options(
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
<!--Enable Standard Conformance-->
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<!--Enforce some behaviors as standards-conformant when they don't default as such.-->
|
||||
<AdditionalOptions>/Zc:externConstexpr,lambda,preprocessor,throwingNew /volatile:iso %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalOptions>/Zc:__cplusplus,externConstexpr,lambda,preprocessor,throwingNew /volatile:iso %(AdditionalOptions)</AdditionalOptions>
|
||||
<!--Enable detailed debug info-->
|
||||
<AdditionalOptions>/Zo %(AdditionalOptions)</AdditionalOptions>
|
||||
<!--Treat sources as utf-8-->
|
||||
|
|
Loading…
Reference in New Issue