diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c0a0b4bd27f..f5b80efef85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -744,6 +744,15 @@ if(WITH_AUDASPACE) endif() endif() +# Auto-enable CUDA dynload if toolkit is not found. +if(NOT WITH_CUDA_DYNLOAD) + find_package(CUDA) + if (NOT CUDA_FOUND) + message("CUDA toolkit not found, using dynamic runtime loading of libraries instead") + set(WITH_CUDA_DYNLOAD ON) + endif() +endif() + #----------------------------------------------------------------------------- # Check for valid directories # ... a partial checkout may cause this. |