]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Bugfix: Use DEAL_II_(CXX|LINKER)_FLAGS in checks
authorMatthias Maier <tamiko@43-1.org>
Thu, 4 Oct 2018 15:53:41 +0000 (10:53 -0500)
committerMatthias Maier <tamiko@43-1.org>
Thu, 4 Oct 2018 16:08:43 +0000 (11:08 -0500)
cmake/configure/configure_1_lapack.cmake
cmake/modules/FindMPI.cmake
cmake/modules/FindSCALAPACK.cmake

index 8da6696b173f4fc50ef2942be3ca6e142368de0b..d9f682eebdee7481c540443524e4fdad5d2637fc 100644 (file)
@@ -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")
 
index 917a2dd8525f3615626e46295d33fa8452677b53..32522408ac4f7b8b5302e3b8fcfcf6ef67234c39 100644 (file)
@@ -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 <mpi.h>
index 0b8a37e54638997440170e972c93a7a0ca780eb0..441daed13fa559186e61971801b00db02292a587 100644 (file)
@@ -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 <mpi.h>

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.