Add a minimal MSVC version
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
c7903678a0
commit
6f1407ff52
|
@ -32,6 +32,7 @@ set(CMAKE_CXX_FLAGS "-Wall")
|
|||
set(CMAKE_CXX_FLAGS_RELEASE "-Os")
|
||||
set(MINIMAL_GNU "11.0")
|
||||
set(MINIMAL_CLANG "13.0")
|
||||
set(MINIMAL_MSVC "19.25")
|
||||
set(IS_GNU (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU))
|
||||
set(IS_CLANG (${CMAKE_CXX_COMPILER_ID} STREQUAL Clang))
|
||||
|
||||
|
@ -87,6 +88,9 @@ elseif(${IS_CLANG})
|
|||
endif()
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fstrict-vtable-pointers")
|
||||
elseif(MSVC)
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${MINIMAL_MSVC})
|
||||
message(FATAL_ERROR "MSVC ${MINIMAL_MSVC} or higher is required")
|
||||
endif()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /Zc:__cplusplus /Zc:preprocessor /Zc:throwingNew /Zc:inline")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue