sse flags for intel c++ compiler
authorCampbell Barton <ideasman42@gmail.com>
Fri, 30 Sep 2011 16:37:46 +0000 (16:37 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 30 Sep 2011 16:37:46 +0000 (16:37 +0000)
CMakeLists.txt
build_files/cmake/macros.cmake

index 43ecdaa..c95509b 100644 (file)
@@ -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()
index e279249..35c84e8 100644 (file)
@@ -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})