From: Isuru Fernando Date: Fri, 19 Apr 2019 00:35:43 +0000 (-0500) Subject: CMake: Clear CMAKE_REQUIRED_FLAGS before calling FindLAPACK X-Git-Tag: v9.1.0-rc1~196^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7938%2Fhead;p=dealii.git CMake: Clear CMAKE_REQUIRED_FLAGS before calling FindLAPACK CMAKE_REQUIRED_FLAGS is populated by dealii with CXXFLAGS and this should be cleared before calling any function that calls try_compile on a C file. FindLAPACK calls FindTHREADS.cmake which uses try_compile on a C file. --- diff --git a/cmake/configure/configure_1_lapack.cmake b/cmake/configure/configure_1_lapack.cmake index 2eb4519a15..b773ccbb8d 100644 --- a/cmake/configure/configure_1_lapack.cmake +++ b/cmake/configure/configure_1_lapack.cmake @@ -18,6 +18,7 @@ # MACRO(FEATURE_LAPACK_FIND_EXTERNAL var) + CLEAR_CMAKE_REQUIRED() FIND_PACKAGE(LAPACK) #