From: Matthias Maier Date: Sat, 9 Nov 2019 07:43:13 +0000 (-0600) Subject: configure trilinos: Ensure that we are linking against MPI for Tpetra configure check X-Git-Tag: v9.2.0-rc1~892^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd2f34f5a277e7372e6e75a1b7b1c72ba6e0fad0;p=dealii.git configure trilinos: Ensure that we are linking against MPI for Tpetra configure check --- diff --git a/cmake/configure/configure_2_trilinos.cmake b/cmake/configure/configure_2_trilinos.cmake index 2a85bc81eb..4b937b6649 100644 --- a/cmake/configure/configure_2_trilinos.cmake +++ b/cmake/configure/configure_2_trilinos.cmake @@ -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 @@ -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