Fixed merge

This commit is contained in:
Christophe Riccio
2013-08-27 10:16:33 +02:00
5 changed files with 59 additions and 84 deletions

View File

@@ -11,48 +11,33 @@ if(NOT GLM_TEST_ENABLE)
message(FATAL_ERROR "GLM is a header only library, no need to build it. Set the option GLM_TEST_ENABLE with ON to build and run the test bench")
endif()
option(GLM_USE_INTEL "Use Intel Compiler" OFF)
if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") AND UNIX))
option(GLM_TEST_ENABLE_CXX_98 "Enable C++ 98" OFF)
option(GLM_TEST_ENABLE_CXX_0X "Enable C++ 0x" OFF)
option(GLM_TEST_ENABLE_CXX_11 "Enable C++ 11" OFF)
option(GLM_TEST_ENABLE_CXX_1Y "Enable C++ 1y" OFF)
option(GLM_TEST_ENABLE_CXX_PEDANTIC "Pedantic" ON)
option(GLM_TEST_ENABLE_CXX_11 "Enable C++ 11" OFF)
if(GLM_TEST_ENABLE_CXX_11)
if(GLM_USE_INTEL)
add_definitions(/Qstd=c++0x)
if(GLM_TEST_ENABLE_CXX_PEDANTIC)
add_definitions(-pedantic)
endif()
if(CMAKE_COMPILER_IS_GNUCXX)
if(GLM_TEST_ENABLE_CXX_1Y)
add_definitions(-std=c++1y)
elseif(GLM_TEST_ENABLE_CXX_11)
add_definitions(-std=c++11)
elseif(GLM_TEST_ENABLE_CXX_0X)
add_definitions(-std=c++0x)
endif()
elseif(NOT GLM_TEST_ENABLE_CXX_11)
if(CMAKE_COMPILER_IS_GNUCXX)
elseif(GLM_TEST_ENABLE_CXX_98)
add_definitions(-std=c++98)
endif()
endif()
option(GLM_TEST_ENABLE_LANG_EXTENSIONS "Enable language extensions" OFF)
if(GLM_TEST_ENABLE_LANG_EXTENSIONS)
if(GLM_USE_INTEL)
add_definitions(/Qintel-extensions)
add_definitions(-intel-extensions)
endif()
if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") OR (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") AND WIN32))
option(GLM_TEST_ENABLE_MS_EXTENSIONS "Enable MS extensions" OFF)
if(CMAKE_COMPILER_IS_GNUCXX)
#Doesn't seem to work...
#add_definitions(-fms-extensions)
#add_definitions(-D_MSC_EXTENSIONS)
endif()
elseif(NOT GLM_TEST_ENABLE_LANG_EXTENSIONS)
if(GLM_USE_INTEL)
add_definitions(/Qintel-extensions-)
add_definitions(-no-intel-extensions)
endif()
if(CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-pedantic)
endif()
if(MSVC)
add_definitions(/Za)
if(NOT GLM_TEST_ENABLE_MS_EXTENSIONS)
add_definitions(/Za)
endif()
endif()