|
|
@@ -11,8 +11,14 @@ 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)
|
|
|
+
|
|
|
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)
|
|
|
+ endif()
|
|
|
+
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
|
|
add_definitions(-std=c++0x)
|
|
|
endif()
|
|
|
@@ -22,14 +28,25 @@ elseif(NOT GLM_TEST_ENABLE_CXX_11)
|
|
|
endif()
|
|
|
endif()
|
|
|
|
|
|
-option(GLM_TEST_ENABLE_MS_EXTENSIONS "Enable MS extensions" OFF)
|
|
|
-if(GLM_TEST_ENABLE_MS_EXTENSIONS)
|
|
|
+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_COMPILER_IS_GNUCXX)
|
|
|
#Doesn't seem to work...
|
|
|
#add_definitions(-fms-extensions)
|
|
|
#add_definitions(-D_MSC_EXTENSIONS)
|
|
|
endif()
|
|
|
-elseif(NOT GLM_TEST_ENABLE_MS_EXTENSIONS)
|
|
|
+
|
|
|
+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(-std=c++98)
|
|
|
add_definitions(-pedantic)
|
|
|
@@ -46,6 +63,8 @@ option(GLM_TEST_ENABLE_SIMD "Enable SIMD optimizations" OFF)
|
|
|
if(GLM_TEST_ENABLE_SIMD)
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
|
|
add_definitions(-msse2)
|
|
|
+ elseif(GLM_USE_INTEL)
|
|
|
+ add_definitions(/QxAVX)
|
|
|
elseif(MSVC10)
|
|
|
add_definitions(/arch:AVX)
|
|
|
elseif(MSVC)
|