Fixed C++11 activation on XCode for the CMake test suite ID

This commit is contained in:
Christophe Riccio 2013-09-10 19:58:02 +02:00
parent 5c84e480bf
commit 6d2170adb3
2 changed files with 15 additions and 7 deletions

View File

@ -23,13 +23,21 @@ if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}"
endif() endif()
if(GLM_TEST_ENABLE_CXX_1Y) if(GLM_TEST_ENABLE_CXX_1Y)
add_definitions(-std=c++1y) set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++1y")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
set(CMAKE_CXX_FLAGS "-std=c++1y")
elseif(GLM_TEST_ENABLE_CXX_11) elseif(GLM_TEST_ENABLE_CXX_11)
add_definitions(-std=c++11) set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
set(CMAKE_CXX_FLAGS "-std=c++11")
elseif(GLM_TEST_ENABLE_CXX_0X) elseif(GLM_TEST_ENABLE_CXX_0X)
add_definitions(-std=c++0x) set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++0x")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
set(CMAKE_CXX_FLAGS "-std=c++0x")
elseif(GLM_TEST_ENABLE_CXX_98) elseif(GLM_TEST_ENABLE_CXX_98)
add_definitions(-std=c++98) set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++98")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
set(CMAKE_CXX_FLAGS "-std=c++98")
endif() endif()
endif() endif()