From cde7434392e869230764c9d06eb8d402269b4596 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Thu, 4 Oct 2018 10:53:41 -0500 Subject: [PATCH] Bugfix: Use DEAL_II_(CXX|LINKER)_FLAGS in checks --- cmake/configure/configure_1_lapack.cmake | 5 +++-- cmake/modules/FindMPI.cmake | 4 ++-- cmake/modules/FindSCALAPACK.cmake | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cmake/configure/configure_1_lapack.cmake b/cmake/configure/configure_1_lapack.cmake index 629b1d867c..34668a1b6e 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 cbe43f7f13..d96eaee200 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 715bdbb689..76f9a97f11 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 -- 2.39.5