mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 09:28:15 +03: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:
@@ -28,9 +28,12 @@ if(MAKEANDPLAY)
|
||||
add_definitions(-DMAKEANDPLAY)
|
||||
endif()
|
||||
|
||||
# Set C++ standard to C++98/C++03
|
||||
set(CMAKE_CXX_STANDARD 98)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF) # prevent mixing stdlib implementations (dangerous!)
|
||||
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_EXTENSIONS OFF)
|
||||
endif()
|
||||
|
||||
# Architecture Flags
|
||||
if(APPLE)
|
||||
|
||||
Reference in New Issue
Block a user