CMake updated to use /Zc:inline and /Zc:lambda (#91)

This commit is contained in:
Chuck Walbourn 2022-12-15 10:28:49 -08:00 committed by GitHub
parent a8aa9087ea
commit cd5cb6144c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -269,7 +269,7 @@ elseif(MINGW)
endforeach()
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_options(${t} PRIVATE /sdl /permissive- /JMC- /Zc:__cplusplus)
target_compile_options(${t} PRIVATE /sdl /permissive- /JMC- /Zc:__cplusplus /Zc:inline)
endforeach()
if(ENABLE_CODE_ANALYSIS)
@ -296,6 +296,12 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
endforeach()
endif()
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.28)
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_options(${t} PRIVATE /Zc:lambda)
endforeach()
endif()
if(UVATLAS_USE_OPENMP)
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_options(${t} PRIVATE /openmp /Zc:twoPhase-)