Skip to content

Commit

Permalink
ci: CUDA is not mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
For-Chance committed Sep 26, 2024
1 parent 2c4fa9c commit 0295d2b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions cmake/3rd.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,12 @@ if (NOT GLEW_FOUND)
"Following http://glew.sourceforge.net to install.")
endif ()

find_package(CUDAToolkit 11.7 REQUIRED)
if (NOT CUDAToolkit_FOUND)
message(FATAL_ERROR "CUDAToolkit not found.\n"
"Following https://developer.nvidia.com/cuda-downloads to install.")
find_package(CUDAToolkit 11.7 QUIET)
if (CUDAToolkit_FOUND)
message(STATUS "CUDAToolkit found.")
set(CUDA_ENABLED TRUE)
else ()
message(WARNING "CUDAToolkit not found. CUDA features will be disabled.\n"
"Follow https://developer.nvidia.com/cuda-downloads to install.")
set(CUDA_ENABLED FALSE)
endif ()

0 comments on commit 0295d2b

Please sign in to comment.