]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: use full compiler/linker flags for trilinos sanity checks 13969/head
authorMatthias Maier <tamiko@43-1.org>
Mon, 13 Jun 2022 18:13:29 +0000 (13:13 -0500)
committerMatthias Maier <tamiko@43-1.org>
Mon, 13 Jun 2022 18:13:29 +0000 (13:13 -0500)
cmake/configure/configure_20_trilinos.cmake

index 8a9a4a0796f5c3734be9766a8082633d68f5e25f..fb391179c5bc2013d313458255bda230b095327f 100644 (file)
@@ -220,9 +220,13 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
       LIST(APPEND CMAKE_REQUIRED_INCLUDES ${Trilinos_INCLUDE_DIRS})
       LIST(APPEND CMAKE_REQUIRED_INCLUDES ${MPI_CXX_INCLUDE_PATH})
 
-
       LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${Trilinos_LIBRARIES} ${MPI_LIBRARIES})
 
+      # For the case of Trilinos being compiled with openmp support the
+      # following Tpetra test needs -fopenmp to succeed. Make sure that we
+      # supply the correct compiler and linker flags:
+      ADD_FLAGS(CMAKE_REQUIRED_FLAGS "${DEAL_II_CXX_FLAGS} ${DEAL_II_LINKER_FLAGS}")
+
       CHECK_CXX_SOURCE_COMPILES(
         "
         #include <Tpetra_Vector.hpp>

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.