mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 01:49:02 +00:00
Rework Thrust CMake options
This commit is contained in:
parent
e6f63a807d
commit
fda475d5bf
@ -359,14 +359,10 @@ if(VTKm_ENABLE_KOKKOS AND NOT TARGET vtkm_kokkos)
|
||||
install(TARGETS vtkm_kokkos_hip EXPORT ${VTKm_EXPORT_NAME})
|
||||
|
||||
# Make sure rocthrust is available if requested
|
||||
# If it is not available, warn the user and continue with thrust disabled
|
||||
if(${VTKm_ENABLE_KOKKOS_THRUST})
|
||||
if(VTKm_ENABLE_KOKKOS_THRUST)
|
||||
find_package(rocthrust)
|
||||
if(${rocthrust_FOUND})
|
||||
message(STATUS "Kokkos HIP enabled with rocthrust support")
|
||||
else()
|
||||
set(VTKm_ENABLE_KOKKOS_THRUST OFF CACHE BOOL "Enable thrust within Kokkos algorithms" FORCE)
|
||||
message(WARNING "Kokkos HIP enabled, but rocthrust not found. Install rocthrust for improved performance.")
|
||||
if(NOT rocthrust_FOUND)
|
||||
message(FATAL_ERROR "rocthrust not found. Please set VTKm_ENABLE_KOKKOS_THRUST to OFF.")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
@ -90,7 +90,6 @@ endmacro ()
|
||||
# Configurable Options
|
||||
vtkm_option(VTKm_ENABLE_CUDA "Enable Cuda support" OFF)
|
||||
vtkm_option(VTKm_ENABLE_KOKKOS "Enable Kokkos support" OFF)
|
||||
vtkm_option(VTKm_ENABLE_KOKKOS_THRUST "Enable Kokkos thrust support (only valid with CUDA and HIP)" ON)
|
||||
vtkm_option(VTKm_ENABLE_OPENMP "Enable OpenMP support" OFF)
|
||||
vtkm_option(VTKm_ENABLE_TBB "Enable TBB support" OFF)
|
||||
vtkm_option(VTKm_ENABLE_RENDERING "Enable rendering library" ON)
|
||||
@ -113,6 +112,11 @@ cmake_dependent_option(VTKm_ENABLE_TESTING_LIBRARY "Enable VTKm Testing Library"
|
||||
OFF "NOT VTKm_ENABLE_TESTING;NOT VTKm_ENABLE_BENCHMARKS" ON)
|
||||
mark_as_advanced(VTKm_ENABLE_TESTING_LIBRARY)
|
||||
|
||||
# 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" OFF)
|
||||
|
||||
# We may want to make finer controls on whether libraries/modules get built.
|
||||
# VTK uses the concept of groups for its modules
|
||||
vtkm_option(VTKm_BUILD_ALL_LIBRARIES
|
||||
|
Loading…
Reference in New Issue
Block a user