Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes for CUDA support on Windows. #2084

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
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
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
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