Disable only CUDA when ROCm also selected

This commit is contained in:
Razvan Nane 2023-10-11 13:29:40 +02:00
parent 7673118f14
commit 7e8528b43a

View File

@ -313,11 +313,9 @@ macro (files_hook)
unset(HAVE_HDF5)
endif()
if(HAVE_ROCSPARSE AND HAVE_CUDA)
message(WARNING "WARNING! Using CUDA and HIP at the same time is not allowed. Please choose only one of them. Disabling both...\n")
message(WARNING "WARNING! Using CUDA and ROCm at the same time is not allowed. Please choose only one of them by setting CMAKE_DISABLE_FIND_PACKAGE_<rocsparse|CUDA>=<ON|OFF>. Disabling CUDA...\n")
set(CUDA_FOUND OFF)
set(rocsparse_FOUND OFF)
unset(HAVE_CUDA)
unset(HAVE_ROCSPARSE)
endif()
# read the list of components from this file (in the project directory);
# it should set various lists with the names of the files to include