CMake updated to use /Zc:inline and /Zc:lambda (#79)
This commit is contained in:
Родитель
8796b211fa
Коммит
e47ed68693
|
@ -235,7 +235,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)
|
||||
|
@ -262,6 +262,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()
|
||||
|
||||
set(WarningsEXE "/wd4061" "/wd4365" "/wd4514" "/wd4625" "/wd4626" "/wd4627" "/wd4668" "/wd4710" "/wd4751" "/wd4820" "/wd5026" "/wd5027" "/wd5039" "/wd5045" "/wd5219")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.34)
|
||||
list(APPEND WarningsEXE "/wd5262" "/wd5264")
|
||||
|
|
Загрузка…
Ссылка в новой задаче