Skip to content

Commit

Permalink
Export Kokkos_ENABLE_<OPTION> that are relevant
Browse files Browse the repository at this point in the history
  • Loading branch information
dalg24 committed May 19, 2023
1 parent c935774 commit 3f565bb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmake/KokkosConfigCommon.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@ SET(Kokkos_CXX_COMPILER "@CMAKE_CXX_COMPILER@")
SET(Kokkos_CXX_COMPILER_ID "@KOKKOS_CXX_COMPILER_ID@")
SET(Kokkos_CXX_STANDARD @KOKKOS_CXX_STANDARD@)

# These are needed by KokkosKernels
# Export Kokkos_ENABLE_<BACKEND> for each backend that was enabled.
# NOTE: "Devices" is a little bit of a misnomer here. These are really
# backends, e.g. Kokkos_ENABLE_OPENMP, Kokkos_ENABLE_CUDA, Kokkos_ENABLE_HIP,
# or Kokkos_ENABLE_SYCL.
FOREACH(DEV ${Kokkos_DEVICES})
SET(Kokkos_ENABLE_${DEV} ON)
ENDFOREACH()
# Export relevant Kokkos_ENABLE<OPTION> variables, e.g.
# Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE, Kokkos_ENABLE_DEBUG, etc.
FOREACH(OPT ${Kokkos_OPTIONS})
SET(Kokkos_ENABLE_${OPT} ON)
ENDFOREACH()

IF(Kokkos_ENABLE_CUDA)
SET(Kokkos_CUDA_ARCHITECTURES @KOKKOS_CUDA_ARCHITECTURES@)
Expand Down

0 comments on commit 3f565bb

Please sign in to comment.