mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Add CMake version guard around setting C++ standard
It seems like CMake 3.1.3 introduced the C/C++ standard properties, while the minimum version of this CMake file is 2.8.12. So we do what FAudio does, which is print a warning if the CMake version is too old and otherwise use it if we have the feature.
This commit is contained in:
parent
575698e715
commit
4c199efbac
1 changed files with 6 additions and 3 deletions
|
@ -28,9 +28,12 @@ if(MAKEANDPLAY)
|
||||||
add_definitions(-DMAKEANDPLAY)
|
add_definitions(-DMAKEANDPLAY)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Set C++ standard to C++98/C++03
|
if(${CMAKE_VERSION} VERSION_LESS "3.1.3")
|
||||||
|
message(WARNING "Your CMake version is too old; set -std=c++98 yourself!")
|
||||||
|
else()
|
||||||
set(CMAKE_CXX_STANDARD 98)
|
set(CMAKE_CXX_STANDARD 98)
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF) # prevent mixing stdlib implementations (dangerous!)
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Architecture Flags
|
# Architecture Flags
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
|
Loading…
Reference in a new issue