aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-08-30 19:14:59 -0700
committerChris Robinson <[email protected]>2017-08-30 19:14:59 -0700
commit653edd4b02ce9ea7eaf49a51be0b27c18cd3db63 (patch)
tree4e9b3aaa22c5a1b8a9b23956b1d413bc9f3a2d37
parent0b0ae75ccf684f850f9112dbf17072b0c22da5f6 (diff)
Don't hide -msse and -mfpu=neon checks behind a not-msvc check
Apparently Clang gets reported as being MSVC on Windows, but still needs the GCC switches to enable SSE code generation.
-rw-r--r--CMakeLists.txt41
1 files changed, 20 insertions, 21 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e11b71a2..a44371c6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -419,27 +419,26 @@ SET(SSE2_SWITCH "")
SET(SSE3_SWITCH "")
SET(SSE4_1_SWITCH "")
SET(FPU_NEON_SWITCH "")
-IF(NOT MSVC)
- CHECK_C_COMPILER_FLAG(-msse HAVE_MSSE_SWITCH)
- IF(HAVE_MSSE_SWITCH)
- SET(SSE_SWITCH "-msse")
- ENDIF()
- CHECK_C_COMPILER_FLAG(-msse2 HAVE_MSSE2_SWITCH)
- IF(HAVE_MSSE2_SWITCH)
- SET(SSE2_SWITCH "-msse2")
- ENDIF()
- CHECK_C_COMPILER_FLAG(-msse3 HAVE_MSSE3_SWITCH)
- IF(HAVE_MSSE3_SWITCH)
- SET(SSE3_SWITCH "-msse3")
- ENDIF()
- CHECK_C_COMPILER_FLAG(-msse4.1 HAVE_MSSE4_1_SWITCH)
- IF(HAVE_MSSE4_1_SWITCH)
- SET(SSE4_1_SWITCH "-msse4.1")
- ENDIF()
- CHECK_C_COMPILER_FLAG(-mfpu=neon HAVE_MFPU_NEON_SWITCH)
- IF(HAVE_MFPU_NEON_SWITCH)
- SET(FPU_NEON_SWITCH "-mfpu=neon")
- ENDIF()
+
+CHECK_C_COMPILER_FLAG(-msse HAVE_MSSE_SWITCH)
+IF(HAVE_MSSE_SWITCH)
+ SET(SSE_SWITCH "-msse")
+ENDIF()
+CHECK_C_COMPILER_FLAG(-msse2 HAVE_MSSE2_SWITCH)
+IF(HAVE_MSSE2_SWITCH)
+ SET(SSE2_SWITCH "-msse2")
+ENDIF()
+CHECK_C_COMPILER_FLAG(-msse3 HAVE_MSSE3_SWITCH)
+IF(HAVE_MSSE3_SWITCH)
+ SET(SSE3_SWITCH "-msse3")
+ENDIF()
+CHECK_C_COMPILER_FLAG(-msse4.1 HAVE_MSSE4_1_SWITCH)
+IF(HAVE_MSSE4_1_SWITCH)
+ SET(SSE4_1_SWITCH "-msse4.1")
+ENDIF()
+CHECK_C_COMPILER_FLAG(-mfpu=neon HAVE_MFPU_NEON_SWITCH)
+IF(HAVE_MFPU_NEON_SWITCH)
+ SET(FPU_NEON_SWITCH "-mfpu=neon")
ENDIF()
CHECK_C_SOURCE_COMPILES("int foo(const char *str, ...) __attribute__((format(printf, 1, 2)));