Commit: a966852362bbeffab9e8b297da2d75bf53e69051
Author: Sergey Sharybin
Date:   Wed Feb 14 10:31:04 2018 +0100
Branches: master
https://developer.blender.org/rBa966852362bbeffab9e8b297da2d75bf53e69051

CMake: Expose Cycles devices support as CMake option

Handy to disable GPU based devices when it's needed to run Valgrind.

===================================================================

M       CMakeLists.txt
M       intern/cycles/CMakeLists.txt

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f5b80efef85..5b2bd2fd460 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -420,6 +420,13 @@ mark_as_advanced(WITH_CYCLES_LOGGING)
 mark_as_advanced(WITH_CYCLES_DEBUG)
 mark_as_advanced(WITH_CYCLES_NATIVE_ONLY)
 
+option(WITH_CYCLES_DEVICE_CUDA                         "Enable Cycles CUDA 
compute support" ON)
+option(WITH_CYCLES_DEVICE_OPENCL                       "Enable Cycles OpenCL 
compute support" ON)
+option(WITH_CYCLES_NETWORK                             "Enable Cycles compute 
over network support (EXPERIMENTAL and unfinished)" OFF)
+mark_as_advanced(WITH_CYCLES_DEVICE_CUDA)
+mark_as_advanced(WITH_CYCLES_DEVICE_OPENCL)
+mark_as_advanced(WITH_CYCLES_NETWORK)
+
 option(WITH_CUDA_DYNLOAD "Dynamically load CUDA libraries at runtime" ON)
 mark_as_advanced(WITH_CUDA_DYNLOAD)
 
diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt
index e7b934ec74f..9df1e91e239 100644
--- a/intern/cycles/CMakeLists.txt
+++ b/intern/cycles/CMakeLists.txt
@@ -167,8 +167,13 @@ if(WITH_CYCLES_OPENSUBDIV)
        )
 endif()
 
-set(WITH_CYCLES_DEVICE_OPENCL TRUE)
-set(WITH_CYCLES_DEVICE_CUDA TRUE)
+if(WITH_CYCLES_STANDALONE)
+       set(WITH_CYCLES_DEVICE_OPENCL TRUE)
+       set(WITH_CYCLES_DEVICE_CUDA TRUE)
+       # Experimental and unfinished.
+       set(WITH_CYCLES_NETWORK FALSE)
+endif()
+# TODO(sergey): Consider removing it, only causes confusion in interface.
 set(WITH_CYCLES_DEVICE_MULTI TRUE)
 
 if(CYCLES_STANDALONE_REPOSITORY)

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to