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:
authorhowetuft <howetuft>2022-03-07 17:42:47 +0300
committerFabian Schempp <fabianschempp@googlemail.com>2022-04-11 01:31:59 +0300
commitdeee28d8a9c940798c8e48c77bea101222c3d01b (patch)
treea8c2bd6a4a59070a4718e64b11cf726b020fb2df
parent2367b9bcb998448c55f6b9735a764b3e9a278c26 (diff)
Add CMake option to control CUDA host compiler
This revision allows to specify CUDA host compiler (nvcc's -ccbin command line option) when configuring the build. It addresses the case where the C/C++ compiler to be used in CUDA toolchain should be different from the default C/C++ compiler, for instance in case of compilers versions conflicts or multiple installed compilers. The new CMake option is named `CUDA_HOST_COMPILER` and can be used as follows: `cmake -DCUDA_HOST_COMPILER=<path-to-host-compiler>` If the option is not specified, the build configuration behaves as previously. Differential Revision: https://developer.blender.org/D14248
-rw-r--r--intern/cycles/kernel/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt
index cfd503a621d..d660289ed17 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -407,6 +407,11 @@ if(WITH_CYCLES_CUDA_BINARIES)
-o ${CMAKE_CURRENT_BINARY_DIR}/${cuda_file}
-Wno-deprecated-gpu-targets)
+ if(CUDA_HOST_COMPILER)
+ set(cuda_flags ${cuda_flags}
+ -ccbin="${CUDA_HOST_COMPILER}")
+ endif()
+
if(WITH_NANOVDB)
set(cuda_flags ${cuda_flags}
-D WITH_NANOVDB