Skip to content
Open
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
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ IF(NOT KOKKOSKERNELS_HAS_TRILINOS)
ENDIF()
ENDIF()
IF(NOT DEFINED ${PROJECT_NAME})
PROJECT(KokkosKernels CXX)
IF(${KokkosKernels_ENABLE_CUDA})
PROJECT(KokkosKernels CXX CUDA)
ELSE()
PROJECT(KokkosKernels CXX)
ENDIF()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to do something like

if (NOT Kokkos_COMPILE_LANGUAGE STREQUAL CXX)
  PROJECT(KokkosKernels CXX ${Kokkos_COMPILE_LANGUAGE})
else()
  PROJECT(KokkosKernels CXX)
endif()

This approach would need more refactoring because I don't think Kokkos is found at that point.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping

ENDIF()
ENDIF()

Expand Down
3 changes: 3 additions & 0 deletions cmake/kokkoskernels_tribits.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ ENDIF()
IF(PARSE_SOURCES)
LIST(REMOVE_DUPLICATES PARSE_SOURCES)
ENDIF()
FOREACH(source ${PARSE_SOURCES})
set_source_files_properties(${source} PROPERTIES LANGUAGE ${Kokkos_COMPILE_LANGUAGE})
ENDFOREACH()

ADD_LIBRARY(
${LIBRARY_NAME}
Expand Down