1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 09:39:43 +01:00

Add MSVC version check

This commit is contained in:
NyakoFox 2024-03-10 20:55:40 -03:00 committed by Misa Elizabeth Kai
parent 4bba26280f
commit 3361e71036

View file

@ -295,8 +295,10 @@ if(MSVC)
string(REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") string(REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8") if(MSVC_VERSION GREATER 1900)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8")
endif()
else() else()
string(REGEX REPLACE "-std=[a-z0-9]+" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") string(REGEX REPLACE "-std=[a-z0-9]+" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")