Skip to content

Commit

Permalink
cmake: add CMake language support for CUDA/HIP
Browse files Browse the repository at this point in the history
  • Loading branch information
rbberger committed Apr 10, 2024
1 parent 4f3220c commit 7392588
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ ELSE()
IF (NOT KOKKOSKERNELS_HAS_TRILINOS AND NOT KOKKOSKERNELS_HAS_PARENT)
# This is a standalone build
FIND_PACKAGE(Kokkos REQUIRED)
IF(Kokkos_COMPILE_LANGUAGE)
ENABLE_LANGUAGE(${Kokkos_COMPILE_LANGUAGE})
ENDIF()
IF(${Kokkos_VERSION} VERSION_GREATER_EQUAL "4.2.00")
MESSAGE(STATUS "Found Kokkos version ${Kokkos_VERSION} at ${Kokkos_DIR}")
IF((${Kokkos_VERSION} VERSION_GREATER "4.3.99"))
Expand Down
5 changes: 5 additions & 0 deletions cmake/kokkoskernels_tribits.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ ENDIF()
IF(PARSE_SOURCES)
LIST(REMOVE_DUPLICATES PARSE_SOURCES)
ENDIF()
IF(Kokkos_COMPILE_LANGUAGE)
FOREACH(source ${PARSE_SOURCES})
SET_SOURCE_FILES_PROPERTIES(${source} PROPERTIES LANGUAGE ${Kokkos_COMPILE_LANGUAGE})
ENDFOREACH()
ENDIF()

ADD_LIBRARY(
${LIBRARY_NAME}
Expand Down

0 comments on commit 7392588

Please sign in to comment.