Skip to content

cmake: VTKm_ENABLE_KOKKOS_THRUST disabled by default

Vicente Bolea requested to merge vbolea/vtk-m:fix-rocthrust-flag into master

Followup of !3160 (merged)

In !3160 (merged) we moved the definition of the option VTKm_ENABLE_KOKKOS_THRUST before we include the CMake/VTKmDeviceAdapters.cmake since we needed to test value of VTKm_ENABLE_KOKKOS_THRUST to find_package(rocthrust). While that solved the problem of rocthurst being "found" by find_package we also made the definition of VTKm_ENABLE_KOKKOS_THRUST to default to OFF since it depended on variables Kokkos_ENABLE_CUDA OR Kokkos_ENABLE_HIP which are defined at CMake/VTKmDeviceAdapters.cmake.

In short a classic chicken and egg problem. I attempt to solve this by moving the find_package(rocthrust) outside of the CMake/VTKmDeviceAdapters.cmake and arranging the order so that we perform the mentioned actions in the following order:

Edited by Vicente Bolea

Merge request reports