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:
Diffstat (limited to 'intern/cycles/CMakeLists.txt')
-rw-r--r--intern/cycles/CMakeLists.txt20
1 files changed, 19 insertions, 1 deletions
diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt
index 543fb5b2cf8..3da1170ec77 100644
--- a/intern/cycles/CMakeLists.txt
+++ b/intern/cycles/CMakeLists.txt
@@ -242,6 +242,24 @@ if(CMAKE_COMPILER_IS_GNUCXX)
unset(_has_no_error_unused_macros)
endif()
+if(WITH_CYCLES_CUDA_BINARIES AND (NOT WITH_CYCLES_CUBIN_COMPILER))
+ if(MSVC)
+ set(MAX_MSVC 1800)
+ if(${CUDA_VERSION} EQUAL "8.0")
+ set(MAX_MSVC 1900)
+ elseif(${CUDA_VERSION} EQUAL "9.0")
+ set(MAX_MSVC 1910)
+ elseif(${CUDA_VERSION} EQUAL "9.1")
+ set(MAX_MSVC 1911)
+ endif()
+ if (NOT MSVC_VERSION LESS ${MAX_MSVC})
+ message(STATUS "nvcc not supported for this compiler version, using cycles_cubin_cc instead.")
+ set(WITH_CYCLES_CUBIN_COMPILER ON)
+ endif()
+ unset(MAX_MSVC)
+ endif()
+endif()
+
# Subdirectories
@@ -254,7 +272,7 @@ if(WITH_CYCLES_NETWORK)
add_definitions(-DWITH_NETWORK)
endif()
-if(WITH_CYCLES_STANDALONE OR WITH_CYCLES_NETWORK)
+if(WITH_CYCLES_STANDALONE OR WITH_CYCLES_NETWORK OR WITH_CYCLES_CUBIN_COMPILER)
add_subdirectory(app)
endif()