]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
CMakeLists.txt: use check_c_source_runs instead of check_c_source_compiles
authorRené J.V. Bertin <rjvbertin@gmail.com>
Thu, 11 Jun 2015 20:08:19 +0000 (22:08 +0200)
committerMika Lindqvist <postmaster@raasu.org>
Mon, 13 Feb 2017 10:41:50 +0000 (12:41 +0200)
to try to avoid using intrinsics and an instruction set the compiler
knows but the host CPU doesn't support.

CMakeLists.txt

index b11798f0dd319916ffdb9b4e8f716d58746b9518..c2861e545c3eeeb8cd76e1a79ec96305827665b5 100644 (file)
@@ -17,6 +17,7 @@ include(CheckSymbolExists)
 include(CheckFunctionExists)
 include(CheckIncludeFile)
 include(CheckCSourceCompiles)
+include(CheckCSourceRuns)
 include(FeatureSummary)
 
 # make sure we use an appropriate BUILD_TYPE by default, "Release" to be exact
@@ -219,7 +220,7 @@ else()
     else()
         set(CMAKE_REQUIRED_FLAGS "${SSE2FLAG}")
     endif()
-    check_c_source_compiles(
+    check_c_source_runs(
         "#include <immintrin.h>
         int main(void)
         {
@@ -235,7 +236,7 @@ else()
         # use the generic SSE4 enabler option to check for the SSE4.2 instruction we require:
         set(CMAKE_REQUIRED_FLAGS "${SSE4FLAG}")
     endif()
-    check_c_source_compiles(
+    check_c_source_runs(
         "int main(void)
         {
             unsigned val = 0, h = 0;
@@ -250,7 +251,7 @@ else()
         # the PCLMUL instruction we use also requires an SSE4.1 instruction check for both
         set(CMAKE_REQUIRED_FLAGS "${SSE4FLAG} ${PCLMULFLAG}")
     endif()
-    check_c_source_compiles(
+    check_c_source_runs(
         "#include <immintrin.h>
         #include <smmintrin.h>
         #include <wmmintrin.h>