From: Matthias Maier Date: Thu, 4 Oct 2018 15:53:41 +0000 (-0500) Subject: Bugfix: Use DEAL_II_(CXX|LINKER)_FLAGS in checks X-Git-Tag: v9.1.0-rc1~663^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a37fa3017cdbc32d51751e0eace4624f936a500;p=dealii.git Bugfix: Use DEAL_II_(CXX|LINKER)_FLAGS in checks --- diff --git a/cmake/configure/configure_1_lapack.cmake b/cmake/configure/configure_1_lapack.cmake index 8da6696b17..d9f682eebd 100644 --- a/cmake/configure/configure_1_lapack.cmake +++ b/cmake/configure/configure_1_lapack.cmake @@ -30,8 +30,9 @@ MACRO(FEATURE_LAPACK_FIND_EXTERNAL var) # Clear the test flags because the following test will use a C compiler # CLEAR_CMAKE_REQUIRED() - SET(CMAKE_REQUIRED_FLAGS "${LAPACK_LINKER_FLAGS}") - SET(CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES}) + SET(CMAKE_REQUIRED_LIBRARIES + ${DEAL_II_LINKER_FLAGS_SAVED} ${LAPACK_LINKER_FLAGS} ${LAPACK_LIBRARIES} + ) # Push -pthread as well: ENABLE_IF_SUPPORTED(CMAKE_REQUIRED_FLAGS "-pthread") diff --git a/cmake/modules/FindMPI.cmake b/cmake/modules/FindMPI.cmake index 917a2dd852..32522408ac 100644 --- a/cmake/modules/FindMPI.cmake +++ b/cmake/modules/FindMPI.cmake @@ -62,9 +62,9 @@ LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) # CLEAR_CMAKE_REQUIRED() -SET(CMAKE_REQUIRED_FLAGS ${MPI_CXX_COMPILE_FLAGS} ${MPI_CXX_LINK_FLAGS}) +SET(CMAKE_REQUIRED_FLAGS ${DEAL_II_CXX_FLAGS_SAVED} ${MPI_CXX_COMPILE_FLAGS} ${MPI_CXX_LINK_FLAGS}) SET(CMAKE_REQUIRED_INCLUDES ${MPI_CXX_INCLUDE_PATH}) -SET(CMAKE_REQUIRED_LIBRARIES ${MPI_LIBRARIES}) +SET(CMAKE_REQUIRED_LIBRARIES ${DEAL_II_LINKER_FLAGS_SAVED} ${MPI_LIBRARIES}) CHECK_CXX_SOURCE_COMPILES( " #include diff --git a/cmake/modules/FindSCALAPACK.cmake b/cmake/modules/FindSCALAPACK.cmake index 0b8a37e546..441daed13f 100644 --- a/cmake/modules/FindSCALAPACK.cmake +++ b/cmake/modules/FindSCALAPACK.cmake @@ -43,9 +43,9 @@ IF (SCALAPACK_LIBRARY) MESSAGE(STATUS "Check if BLACS is embedded in ScaLAPACK library") CLEAR_CMAKE_REQUIRED() - SET(CMAKE_REQUIRED_FLAGS ${MPI_CXX_COMPILE_FLAGS} ${MPI_CXX_LINK_FLAGS}) + SET(CMAKE_REQUIRED_FLAGS ${DEAL_II_CXX_FLAGS_SAVED} ${MPI_CXX_COMPILE_FLAGS} ${MPI_CXX_LINK_FLAGS}) SET(CMAKE_REQUIRED_INCLUDES ${MPI_CXX_INCLUDE_PATH}) - SET(CMAKE_REQUIRED_LIBRARIES ${MPI_LIBRARIES} ${SCALAPACK_LIBRARY} ${LAPACK_LIBRARIES}) + SET(CMAKE_REQUIRED_LIBRARIES ${DEAL_II_LINKER_FLAGS_SAVED} ${MPI_LIBRARIES} ${SCALAPACK_LIBRARY} ${LAPACK_LIBRARIES}) CHECK_CXX_SOURCE_COMPILES( " #include