diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-30 20:37:46 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-30 20:37:46 +0400 |
commit | 7ef5464236144da9bc73212477ecbf8dd48ceccc (patch) | |
tree | 52f4c76a4888bfd51cf2907e698ec1e9dbf5e590 | |
parent | cf3956f450127956f92e0efea6010c5e9eb2c490 (diff) |
sse flags for intel c++ compiler
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | build_files/cmake/macros.cmake | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 43ecdaa2650..c95509b0a08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1134,8 +1134,11 @@ if(WITH_RAYOPTIMIZATION) elseif(MSVC) set(_sse "/arch:SSE") set(_sse2 "/arch:SSE2") + elseif(CMAKE_C_COMPILER_ID MATCHES "Intel") + set(_sse) # icc only has sse2 + set(_sse2 "-xSSE2") else() - message(WARNING "SSE flags for this compiler not known") + message(WARNING "SSE flags for this compiler: '${CMAKE_C_COMPILER_ID}' not known") set(_sse) set(_sse2) endif() diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index e279249fdfe..35c84e8359b 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -328,6 +328,10 @@ macro(TEST_SSE_SUPPORT) set(CMAKE_REQUIRED_FLAGS "-msse -msse2") elseif(MSVC) set(CMAKE_REQUIRED_FLAGS "/arch:SSE2") # TODO, SSE 1 ? + elseif(CMAKE_C_COMPILER_ID MATCHES "Intel") + set(CMAKE_REQUIRED_FLAGS "-xSSE2") + else() + message(STATUS "Compiler: '${CMAKE_C_COMPILER_ID}' has no SSE flags defiend for it!") endif() if(NOT DEFINED ${SUPPORT_SSE_BUILD}) |