mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Merge pull request #9273 from leoetlino/msvc-preprocessor-fix
CMake: Pass various /Zc flags to MSVC for consistency with Base.props
This commit is contained in:
@ -244,6 +244,13 @@ if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
|||||||
add_compile_options(/volatile:iso)
|
add_compile_options(/volatile:iso)
|
||||||
# Fix non-conformant lambda behavior (constexpr variables shouldn't need capturing)
|
# Fix non-conformant lambda behavior (constexpr variables shouldn't need capturing)
|
||||||
add_compile_options(/experimental:newLambdaProcessor)
|
add_compile_options(/experimental:newLambdaProcessor)
|
||||||
|
# Fix various other non-conformant behaviors
|
||||||
|
add_compile_options(/Zc:externConstexpr,lambda,preprocessor)
|
||||||
|
|
||||||
|
# Temporarily disable warnings to enable /Zc:preprocessor compatibility with WinSDK headers.
|
||||||
|
add_compile_options(
|
||||||
|
/wd5105 # macro expansion producing 'defined' has undefined behavior
|
||||||
|
)
|
||||||
|
|
||||||
string(APPEND CMAKE_EXE_LINKER_FLAGS " /NXCOMPAT")
|
string(APPEND CMAKE_EXE_LINKER_FLAGS " /NXCOMPAT")
|
||||||
else()
|
else()
|
||||||
|
Reference in New Issue
Block a user