From: Matthias Maier Date: Mon, 13 Jun 2022 18:13:29 +0000 (-0500) Subject: CMake: use full compiler/linker flags for trilinos sanity checks X-Git-Tag: v9.4.0-rc1~23^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13969%2Fhead;p=dealii.git CMake: use full compiler/linker flags for trilinos sanity checks --- diff --git a/cmake/configure/configure_20_trilinos.cmake b/cmake/configure/configure_20_trilinos.cmake index 8a9a4a0796..fb391179c5 100644 --- a/cmake/configure/configure_20_trilinos.cmake +++ b/cmake/configure/configure_20_trilinos.cmake @@ -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