]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Detect Tpetra support correctly if Trilinos is compiled with CUDA support
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 20 Feb 2019 17:20:23 +0000 (18:20 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 20 Feb 2019 21:36:26 +0000 (22:36 +0100)
cmake/configure/configure_2_trilinos.cmake

index 9b3c86139577dc32e07db991cf62c0a2b3840abf..187fed9071705bafcca99d36ec908dab67a843da 100644 (file)
@@ -163,7 +163,15 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
       # 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})
+        ADD_FLAGS(CMAKE_REQUIRED_FLAGS "--expt-extended-lambda")
+      ENDIF()
       LIST(APPEND CMAKE_REQUIRED_LIBRARIES "${Trilinos_LIBRARIES}")
       CHECK_CXX_SOURCE_COMPILES(
         "

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.