CMakeLists.txt: explicitly set the standard to C++98
Set the C++ standard to C++98 to avoid GCC 6 compilation failures.
This commit is contained in:
@@ -22,6 +22,16 @@ set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7)
|
|||||||
# only relevant for building shared libs but let's set it regardless
|
# only relevant for building shared libs but let's set it regardless
|
||||||
set(CMAKE_OSX_RPATH 1)
|
set(CMAKE_OSX_RPATH 1)
|
||||||
|
|
||||||
|
# Set the C++ standard to C++98 to avoid compilation errors on GCC 6 (which
|
||||||
|
# defaults to C++14).
|
||||||
|
if(CMAKE_VERSION VERSION_LESS "3.1")
|
||||||
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
set (CMAKE_CXX_FLAGS "--std=gnu++98 ${CMAKE_CXX_FLAGS}")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set (CMAKE_CXX_STANDARD 98)
|
||||||
|
endif()
|
||||||
|
|
||||||
project(SimGear)
|
project(SimGear)
|
||||||
|
|
||||||
# read 'version' file into a variable (stripping any newlines or spaces)
|
# read 'version' file into a variable (stripping any newlines or spaces)
|
||||||
|
|||||||
Reference in New Issue
Block a user