From: René J.V. Bertin Date: Thu, 11 Jun 2015 20:08:19 +0000 (+0200) Subject: CMakeLists.txt: use check_c_source_runs instead of check_c_source_compiles X-Git-Tag: 1.9.9-b1~694^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b8418eabf6b373c9a79a6ba847a90e9b984f033;p=thirdparty%2Fzlib-ng.git CMakeLists.txt: use check_c_source_runs instead of check_c_source_compiles to try to avoid using intrinsics and an instruction set the compiler knows but the host CPU doesn't support. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b11798f0d..c2861e545 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 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 #include #include