[Bf-blender-cvs] [c341dd0585b] master: CMake: Fix cimpilation error when CUDA dynload is disabled but toolkit is not installed
Sergey Sharybin
noreply at git.blender.org
Wed Feb 14 10:35:09 CET 2018
Commit: c341dd0585b73a0526573c085e6d265b0daf6738
Author: Sergey Sharybin
Date: Wed Feb 14 10:20:26 2018 +0100
Branches: master
https://developer.blender.org/rBc341dd0585b73a0526573c085e6d265b0daf6738
CMake: Fix cimpilation error when CUDA dynload is disabled but toolkit is not installed
===================================================================
M CMakeLists.txt
===================================================================
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.
More information about the Bf-blender-cvs
mailing list