diff --git a/CMakeLists.txt b/CMakeLists.txt index ab92213fe4..eaef4b568e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() ENDIF() ENDIF() diff --git a/cmake/kokkoskernels_tribits.cmake b/cmake/kokkoskernels_tribits.cmake index 2d70f656ad..84a4615a92 100644 --- a/cmake/kokkoskernels_tribits.cmake +++ b/cmake/kokkoskernels_tribits.cmake @@ -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}