From 254a533cc0331f17fa24063aca103d8bbe446df4 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Mon, 13 Jun 2022 13:13:29 -0500 Subject: [PATCH] CMake: use full compiler/linker flags for trilinos sanity checks --- cmake/configure/configure_20_trilinos.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.39.5