Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2020-04-11 21:59:21 +0300
committerRay Molenkamp <github@lazydodo.com>2020-04-11 21:59:21 +0300
commitaeb42cf8ab2f9c8a7066748ff4889bc8a387dc0d (patch)
tree38fe7448f6faadda0d9c6a64b66e2f317ca36842 /intern/cycles/kernel
parentddfec0851484fa735b60279743c892bf1952c538 (diff)
Cycles/Optix: Support building the optix kernels on demand.
CMake: `WITH_CYCLES_DEVICE_OPTIX` did not respect `WITH_CYCLES_CUDA_BINARIES` causing the optix kernel to be always build at build time. Code: `device_optix.cpp` did not count on the optix kernel not existing in the default location. For this to work, one should have before starting blender 1) working nvcc environment 2) Optix SDK installed and the OPTIX_ROOT_DIR environment variable pointing to it which is not set by default Differential Revision: https://developer.blender.org/D7400 Reviewed By: Brecht
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r--intern/cycles/kernel/CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt
index 3264b5afea2..ac3a85089c2 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -507,7 +507,7 @@ endif()
# OptiX PTX modules
-if(WITH_CYCLES_DEVICE_OPTIX)
+if(WITH_CYCLES_DEVICE_OPTIX AND WITH_CYCLES_CUDA_BINARIES)
foreach(input ${SRC_OPTIX_KERNELS})
get_filename_component(input_we ${input} NAME_WE)
@@ -677,7 +677,7 @@ source_group("svm" FILES ${SRC_SVM_HEADERS})
if(WITH_CYCLES_CUDA)
add_dependencies(cycles_kernel cycles_kernel_cuda)
endif()
-if(WITH_CYCLES_DEVICE_OPTIX)
+if(WITH_CYCLES_DEVICE_OPTIX AND WITH_CYCLES_CUDA_BINARIES)
add_dependencies(cycles_kernel cycles_kernel_optix)
endif()