Skip to content

Commit

Permalink
Merge pull request #14739 from masterleinad/strip_x_cuda
Browse files Browse the repository at this point in the history
Strip "-x cuda" from Trilinos flags without configured Cuda support
  • Loading branch information
marcfehling committed Jan 27, 2023
2 parents c545eda + 08ff394 commit eb3bf71
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmake/modules/FindDEAL_II_TRILINOS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@ if(TARGET Kokkos::kokkos)
add_flags(_kokkos_openmp_flags "${_entry}")
endif()
endforeach()

# Some Kokkos versions included in Trilinos before 13.2.0 add "-x cuda" when
# using clang++ as compiler even if Kokkos has not been configured with Cuda
# support. Simply strip that flag from what we are using in that case.
if(NOT Kokkos_ENABLE_CUDA)
string(REPLACE "-x cuda" "" KOKKOS_COMPILE_FLAGS "${KOKKOS_COMPILE_FLAGS}")
endif()
endif()

#
Expand All @@ -169,7 +176,6 @@ foreach(_library ${Trilinos_LIBRARIES})
)
endforeach()


process_feature(TRILINOS
LIBRARIES
REQUIRED ${_libraries}
Expand Down

0 comments on commit eb3bf71

Please sign in to comment.