mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Move -std=
flags to before -fno-rtti
/-fno-exceptions
This fixes the issue where the `-std=` flags keep getting cleared, apparently.
This commit is contained in:
parent
705864a32a
commit
24353a54bb
1 changed files with 20 additions and 20 deletions
|
@ -24,26 +24,6 @@ if(OFFICIAL_BUILD AND NOT MAKEANDPLAY)
|
|||
set(GOG ON)
|
||||
endif()
|
||||
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.1.3")
|
||||
message(WARNING "Your CMake version is too old; using workaround")
|
||||
|
||||
if(MSVC)
|
||||
# MSVC doesn't have /std:c99 or /std:c++98 switches!
|
||||
else()
|
||||
string(REGEX REPLACE "-std=[a-z0-9]+" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
|
||||
|
||||
string(REGEX REPLACE "-std=[a-z0-9+]+" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98")
|
||||
endif()
|
||||
else()
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_EXTENSIONS OFF)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 98)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
endif()
|
||||
|
||||
# Architecture Flags
|
||||
if(APPLE)
|
||||
# Wow, Apple is a huge jerk these days huh?
|
||||
|
@ -268,6 +248,26 @@ if(MSVC)
|
|||
target_compile_options(VVVVVV PRIVATE /wd4244)
|
||||
endif()
|
||||
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.1.3")
|
||||
message(WARNING "Your CMake version is too old; using workaround")
|
||||
|
||||
if(MSVC)
|
||||
# MSVC doesn't have /std:c99 or /std:c++98 switches!
|
||||
else()
|
||||
string(REGEX REPLACE "-std=[a-z0-9]+" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
|
||||
|
||||
string(REGEX REPLACE "-std=[a-z0-9+]+" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98")
|
||||
endif()
|
||||
else()
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_EXTENSIONS OFF)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 98)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# Disable exceptions
|
||||
string(REGEX REPLACE "/EH[a-z]+" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
|
|
Loading…
Reference in a new issue