probably fixed situation for GCC older than 4.7

This commit is contained in:
filux 2015-09-18 20:10:02 +02:00
parent 6ac255095a
commit c84e7f5443
3 changed files with 13 additions and 5 deletions

View File

@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED( VERSION 2.6.2 )
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.2 )
PROJECT( MegaGlest )
#SET(CMAKE_VERBOSE_MAKEFILE ON)

View File

@ -7,8 +7,12 @@ SET(TARGET_NAME_MANPAGE "${TARGET_NAME}.6")
IF(BUILD_MEGAGLEST_MODEL_VIEWER)
MESSAGE(STATUS "Will try to build MegaGlest model viewer")
IF(UNIX AND NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
ADD_DEFINITIONS("-std=c++11")
IF(UNIX AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
IF("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS 4.7 OR NOT "${CMAKE_CXX_COMPILER_VERSION}")
ADD_DEFINITIONS("-std=gnu++0x")
ELSE()
ADD_DEFINITIONS("-std=c++11")
ENDIF()
# Required at least on bsd and macos, on linux most likely not but we probably want to see same output on
# linux too, e.g. deprecation warnings especially when newer than c++11 "standard" is on the way.
ENDIF()

View File

@ -7,8 +7,12 @@ SET(TARGET_NAME_MANPAGE "${TARGET_NAME}.6")
IF(BUILD_MEGAGLEST_MAP_EDITOR)
MESSAGE(STATUS "Will try to build MegaGlest map editor")
IF(UNIX AND NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
ADD_DEFINITIONS("-std=c++11")
IF(UNIX AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
IF("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS 4.7 OR NOT "${CMAKE_CXX_COMPILER_VERSION}")
ADD_DEFINITIONS("-std=gnu++0x")
ELSE()
ADD_DEFINITIONS("-std=c++11")
ENDIF()
# Required at least on bsd and macos, on linux most likely not but we probably want to see same output on
# linux too, e.g. deprecation warnings especially when newer than c++11 "standard" is on the way.
ENDIF()