aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-12-24 05:26:33 -0800
committerChris Robinson <[email protected]>2012-12-24 05:26:33 -0800
commit7d81d6b24ed5a76ee1016b124801e478fd729816 (patch)
tree44dbab7389af2a37a3e4d7898b06eae5362e2340
parent84944af1425c1fe535a3457b1d63e790db76cef3 (diff)
Look for /arch:SSE with MSVC for SSE
-rw-r--r--CMakeLists.txt14
1 files changed, 11 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 94f7c844..5d005432 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -239,9 +239,17 @@ ELSE()
ENDIF()
SET(SSE_SWITCH "")
-CHECK_C_COMPILER_FLAG(-msse HAVE_MSSE_SWITCH)
-IF(HAVE_MSSE_SWITCH)
- SET(SSE_SWITCH "-msse")
+IF(MSVC)
+ CHECK_C_COMPILER_FLAG(/arch:SSE HAVE_ARCHSSE_SWITCH)
+ IF(HAVE_ARCHSSE_SWITCH)
+ SET(SSE_SWITCH "/arch:SSE")
+ ENDIF()
+ENDIF()
+IF(NOT SSE_SWITCH)
+ CHECK_C_COMPILER_FLAG(-msse HAVE_MSSE_SWITCH)
+ IF(HAVE_MSSE_SWITCH)
+ SET(SSE_SWITCH "-msse")
+ ENDIF()
ENDIF()
CHECK_C_SOURCE_COMPILES("int foo(const char *str, ...) __attribute__((format(printf, 1, 2)));