blob: ab63fd128490457b810b6226d7139a179204fc91 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
diff --git a/intern/cycles/cmake/external_libs.cmake b/intern/cycles/cmake/external_libs.cmake
index d0f473a2939..90fcb40107a 100644
--- a/intern/cycles/cmake/external_libs.cmake
+++ b/intern/cycles/cmake/external_libs.cmake
@@ -41,6 +41,11 @@ if(WITH_CYCLES_CUDA_BINARIES OR NOT WITH_CUDA_DYNLOAD)
find_package(CUDA) # Try to auto locate CUDA toolkit
if(CUDA_FOUND)
message(STATUS "CUDA nvcc = ${CUDA_NVCC_EXECUTABLE}")
+ CUDA_SELECT_NVCC_ARCH_FLAGS(CUDA_ARCH_FLAGS Auto)
+ string(REGEX REPLACE " compute_[0-9]+" "" CYCLES_CUDA_BINARIES_ARCH "${CUDA_ARCH_FLAGS_readable}")
+ string(REGEX REPLACE " " ";" CYCLES_CUDA_BINARIES_ARCH "${CYCLES_CUDA_BINARIES_ARCH}")
+ message(STATUS "Enabling CUDA support (version: ${CUDA_VERSION_STRING},"
+ " archs: ${CYCLES_CUDA_BINARIES_ARCH})")
else()
message(STATUS "CUDA compiler not found, disabling WITH_CYCLES_CUDA_BINARIES")
set(WITH_CYCLES_CUDA_BINARIES OFF)
|