]> https://gitweb.dealii.org/ - dealii.git/commitdiff
configure trilinos: Ensure that we are linking against MPI for Tpetra configure check 9030/head
authorMatthias Maier <tamiko@43-1.org>
Sat, 9 Nov 2019 07:43:13 +0000 (01:43 -0600)
committerMatthias Maier <tamiko@43-1.org>
Sat, 9 Nov 2019 07:43:43 +0000 (01:43 -0600)
cmake/configure/configure_2_trilinos.cmake

index 2a85bc81eb86f37b5cf2f4e1195d21dd2fc4ffbc..4b937b6649f40369d192e06465dbaae5cd67cfb9 100644 (file)
@@ -177,21 +177,25 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
       ENDFOREACH()
     ENDIF()
 
-    IF(${DEAL_II_TRILINOS_WITH_TPETRA})
+    IF(DEAL_II_TRILINOS_WITH_TPETRA)
       #
       # Check if Tpetra is usable in fact.
       #
       LIST(APPEND CMAKE_REQUIRED_INCLUDES ${Trilinos_INCLUDE_DIRS})
       LIST(APPEND CMAKE_REQUIRED_INCLUDES ${MPI_CXX_INCLUDE_PATH})
       ADD_FLAGS(CMAKE_REQUIRED_FLAGS "${DEAL_II_CXX_VERSION_FLAG}")
+
       CHECK_SYMBOL_EXISTS(
         "KOKKOS_ENABLE_CUDA_LAMBDA"
         "Kokkos_Macros.hpp"
-        DEAL_II_KOKKOS_LAMBDA_EXISTS)
-      IF(${DEAL_II_KOKKOS_LAMBDA_EXISTS})
+        DEAL_II_KOKKOS_LAMBDA_EXISTS
+        )
+      IF(DEAL_II_KOKKOS_LAMBDA_EXISTS)
         ADD_FLAGS(CMAKE_REQUIRED_FLAGS "--expt-extended-lambda")
       ENDIF()
-      LIST(APPEND CMAKE_REQUIRED_LIBRARIES "${Trilinos_LIBRARIES}")
+
+      LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${Trilinos_LIBRARIES} ${MPI_LIBRARIES})
+
       CHECK_CXX_SOURCE_COMPILES(
         "
         #include <Tpetra_Vector.hpp>
@@ -210,7 +214,9 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
         "
         TRILINOS_TPETRA_IS_FUNCTIONAL
         )
+
       RESET_CMAKE_REQUIRED()
+
       IF(NOT TRILINOS_TPETRA_IS_FUNCTIONAL)
         MESSAGE(
           STATUS
@@ -229,7 +235,7 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
         NO_DEFAULT_PATH NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH
         NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH
         )
-      
+
       IF(EXISTS ${SACADO_CONFIG_H})
         #
         # Determine whether Trilinos was configured with C++11 support and

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.