diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 14 |
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))); |