Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,15 @@ 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})
IF(Kokkos_COMPILE_LANGUAGE STREQUAL CUDA)
SET(CMAKE_CUDA_ARCHITECTURES ${Kokkos_CUDA_ARCHITECTURES})
ENDIF()
IF(Kokkos_COMPILE_LANGUAGE STREQUAL HIP)
SET(CMAKE_HIP_ARCHITECTURES ${Kokkos_HIP_ARCHITECTURES})
ENDIF()
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
11 changes: 11 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 Expand Up @@ -151,6 +156,12 @@ IF (IS_ENABLED)
SOURCES ${PARSE_SOURCES}
TESTONLYLIBS ${PARSE_TESTONLYLIBS})
ELSE()
# Set the correct CMake language on all source files for this exe
IF(Kokkos_COMPILE_LANGUAGE)
FOREACH(source ${PARSE_SOURCES})
SET_SOURCE_FILES_PROPERTIES(${source} PROPERTIES LANGUAGE ${Kokkos_COMPILE_LANGUAGE})
ENDFOREACH()
ENDIF()
ADD_EXECUTABLE(${EXE_NAME} ${PARSE_SOURCES})
#AJP, BMK altered:
IF(KOKKOSKERNELS_ENABLE_TESTS_AND_PERFSUITE)
Expand Down