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 /build_files | |
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 'build_files')
-rw-r--r-- | build_files/cmake/macros.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index cacc741966f..a8e17c3b5ef 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -478,7 +478,11 @@ function(setup_liblinks # We put CLEW and CUEW here because OPENSUBDIV_LIBRARIES dpeends on them.. if(WITH_CYCLES OR WITH_COMPOSITOR OR WITH_OPENSUBDIV) target_link_libraries(${target} "extern_clew") - target_link_libraries(${target} "extern_cuew") + if(WITH_CUDA_DYNLOAD) + target_link_libraries(${target} "extern_cuew") + else() + target_link_libraries(${target} ${CUDA_CUDA_LIBRARY}) + endif() endif() #system libraries with no dependencies such as platform link libs or opengl should go last |