Commit ee7d457c authored by Jan Möbius's avatar Jan Möbius

Moved C++11 to the end

git-svn-id: http://www.openvolumemesh.org/svnrepo/OpenVolumeMesh/trunk@269 66977474-1d4b-4f09-8fe9-267525286df2
parent f1687283
......@@ -121,7 +121,6 @@ if (UNIX)
list(APPEND ADDITIONAL_C_DEBUG_FLAGS "-D_GLIBCXX_DEBUG_PEDANTIC")
list(APPEND ADDITIONAL_C_RELWITHDEBINFO_FLAGS "-D_GLIBCXX_DEBUG" )
list(APPEND ADDITIONAL_C_RELWITHDEBINFO_FLAGS "-D_GLIBCXX_DEBUG_PEDANTIC")
endif()
################################################################################
# Process the additional flags:
......@@ -174,5 +173,31 @@ if (UNIX)
set (CMAKE_CFLAGS_RELEASE "-xO3")
set (CMAKE_CXX_FLAGS_RELEASE "-xO3")
endif ( CMAKE_SYSTEM MATCHES "SunOS*" )
################################################################################
# C++ 11 support
################################################################################
# On apple, if we have c++ 11 support, we enable it automatically here
if (APPLE)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
list(APPEND ADDITIONAL_CXX_DEBUG_FLAGS "-std=c++11" )
list(APPEND ADDITIONAL_CXX_RELEASE_FLAGS "-std=c++11" )
list(APPEND ADDITIONAL_CXX_RELWITHDEBINFO_FLAGS "-std=c++11" )
elseif(COMPILER_SUPPORTS_CXX0X)
list(APPEND ADDITIONAL_CXX_DEBUG_FLAGS "-std=c++0x" )
list(APPEND ADDITIONAL_CXX_RELEASE_FLAGS "-std=c++0x" )
list(APPEND ADDITIONAL_CXX_RELWITHDEBINFO_FLAGS "-std=c++0x" )
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Falling back to non C++11 mode. If you encounter errors, please use a different C++ compiler.")
endif()
endif()
endif ()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment