diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-14 10:24:09 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-14 10:27:22 +0300 |
commit | 2af7637f207c420af602f43e514b1b20e7cfc718 (patch) | |
tree | 10508ea78dd73df4625119d29d00d98a81d23030 /CMakeLists.txt | |
parent | d67535eea00b2d9f2b75e99d45f7f200bdc642d6 (diff) |
Cycles: Add option to directly link against CUDA libraries
The main purpose of such linking is to make Blender compatible with
NVidia's debuggers and profilers which are doing some LD_PRELOAD
magic to intercept some function calls. Such magic conflicts with
our CUDA wrangler magic and causes segmentation faults.
The option is disabled by default, so there's no affect on any of
artists.
In order to make Blender linked directly against CUDA library use
the WITH_CUDA_DYNLOAD CMake option (it's marked as advanced).
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d9d515d1e5..73d219e0e1c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -399,6 +399,9 @@ mark_as_advanced(WITH_CYCLES_LOGGING) mark_as_advanced(WITH_CYCLES_DEBUG) mark_as_advanced(WITH_CYCLES_WERROR) +option(WITH_CUDA_DYNLOAD "Dynamically load CUDA libraries at runtime" ON) +mark_as_advanced(WITH_CUDA_DYNLOAD) + # LLVM option(WITH_LLVM "Use LLVM" OFF) if(APPLE) @@ -2906,7 +2909,9 @@ if(WITH_BLENDER OR WITH_PLAYER) elseif(WITH_CYCLES_STANDALONE) add_subdirectory(intern/cycles) add_subdirectory(extern/clew) - add_subdirectory(extern/cuew) + if(WITH_CUDA_DYNLOAD) + add_subdirectory(extern/cuew) + endif() if(NOT WITH_SYSTEM_GLEW) add_subdirectory(extern/glew) endif() |