From: Richael Zhuang Date: Thu, 31 May 2018 08:19:55 +0000 (+0800) Subject: Reset CMAKE_REQUIRED_FLAGS X-Git-Tag: 1.9.9-b1~626 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20760abd3c29f6d91db63cf042a1992ebf83dc47;p=thirdparty%2Fzlib-ng.git Reset CMAKE_REQUIRED_FLAGS Reset CMAKE_REQUIRED_FLAGS after each check to avoid the following checks being influenced by the previous results. Change-Id: I2e34f6127ef1c617f4eea363a2cb80bc49b3bcab Signed-off-by: Richael Zhuang --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 863c9540c..499fa066b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -303,6 +303,8 @@ else() }" HAVE_SSE2_INTRIN ) + set(CMAKE_REQUIRED_FLAGS) + if(WITH_NATIVE_INSTRUCTIONS) set(CMAKE_REQUIRED_FLAGS "${NATIVEFLAG}") else() @@ -329,6 +331,8 @@ else() }" HAVE_SSE42CRC_INTRIN ) + set(CMAKE_REQUIRED_FLAGS) + if(WITH_NATIVE_INSTRUCTIONS) set(CMAKE_REQUIRED_FLAGS "${NATIVEFLAG}") else() @@ -352,6 +356,7 @@ else() else() set(HAVE_PCLMULQDQ_INTRIN NO) endif() + set(CMAKE_REQUIRED_FLAGS) endif() #Check whether -mfpu=neon is available