Merge topic 'fix-rocthrust-dep' into release-2.1

c9ec6ae6a kokkos: let link vtkm_cont to roc::rocthrust

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3160
This commit is contained in:
Vicente Bolea 2023-12-01 03:08:15 +00:00 committed by Kitware Robot
commit 763293a97e
3 changed files with 9 additions and 9 deletions

@ -360,10 +360,7 @@ if(VTKm_ENABLE_KOKKOS AND NOT TARGET vtkm_kokkos)
# Make sure rocthrust is available if requested
if(VTKm_ENABLE_KOKKOS_THRUST)
find_package(rocthrust)
if(NOT rocthrust_FOUND)
message(FATAL_ERROR "rocthrust not found. Please set VTKm_ENABLE_KOKKOS_THRUST to OFF.")
endif()
find_package(rocthrust REQUIRED CONFIG)
endif()
endif()

@ -191,6 +191,11 @@ vtkm_option(VTKm_OVERRIDE_CTEST_TIMEOUT "Disable default ctest timeout" OFF)
# VTKm_ENABLE_MPI=ON.
cmake_dependent_option(VTKm_ENABLE_GPU_MPI "Enable GPU AWARE MPI support" OFF "VTKm_ENABLE_MPI" OFF)
# By default: Set VTKm_ENABLE_KOKKOS_THRUST to ON if VTKm_ENABLE_KOKKOS is ON, otherwise
# disable it (or if the user explicitly turns this option OFF)
cmake_dependent_option(VTKm_ENABLE_KOKKOS_THRUST "Enable Kokkos thrust support (only valid with CUDA and HIP)"
ON "VTKm_ENABLE_KOKKOS;Kokkos_ENABLE_CUDA OR Kokkos_ENABLE_HIP" OFF)
mark_as_advanced(
VTKm_ENABLE_LOGGING
VTKm_NO_ASSERT
@ -232,11 +237,6 @@ include(VTKmBuildType)
# Include the vtk-m wrappers
include(VTKmWrappers)
# By default: Set VTKm_ENABLE_KOKKOS_THRUST to ON if VTKm_ENABLE_KOKKOS is ON, otherwise
# disable it (or if the user explicitly turns this option OFF)
cmake_dependent_option(VTKm_ENABLE_KOKKOS_THRUST "Enable Kokkos thrust support (only valid with CUDA and HIP)"
ON "VTKm_ENABLE_KOKKOS;Kokkos_ENABLE_CUDA OR Kokkos_ENABLE_HIP" OFF)
# Create vtkm_compiler_flags library. This is an interface library that
# holds all the C++ compiler flags that are needed for consumers and
# when building VTK-m.

@ -34,6 +34,9 @@ if (TARGET vtkm_kokkos)
elseif(TARGET vtkm_kokkos_hip)
set_source_files_properties(${sources} TARGET_DIRECTORY vtkm_cont PROPERTIES LANGUAGE HIP)
kokkos_compilation(SOURCE ${sources})
if (VTKm_ENABLE_KOKKOS_THRUST)
target_link_libraries(vtkm_cont INTERFACE roc::rocthrust)
endif()
endif()
else()