]> 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>
Fri, 5 Oct 2018 23:18:48 +0000 (18:18 -0500)
cmake/configure/configure_1_lapack.cmake
cmake/modules/FindMPI.cmake
cmake/modules/FindSCALAPACK.cmake

index 629b1d867c58ad4ebc6b08903e4054b73f3c7e5d..34668a1b6e66ea94c7424dd48be31125483a26f7 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 cbe43f7f133931f4d6f84b31c74a9149721dba77..d96eaee20088023e834ba9b430fafeccf87eb2ff 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 715bdbb689a49f1dbab914f13f357111a27a58a8..76f9a97f1199e3a68f82ac1c1f816b8b3d2198ff 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.