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/util/util_cuda.cpp')
-rw-r--r--intern/cycles/util/util_cuda.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/intern/cycles/util/util_cuda.cpp b/intern/cycles/util/util_cuda.cpp
index bd5583b9718..fdf3d664a11 100644
--- a/intern/cycles/util/util_cuda.cpp
+++ b/intern/cycles/util/util_cuda.cpp
@@ -373,8 +373,14 @@ bool cuLibraryInit()
/* cuda 4.0 */
CUDA_LIBRARY_FIND(cuCtxSetCurrent);
+#ifndef WITH_CUDA_BINARIES
+#ifdef _WIN32
+ return false; /* runtime build doesn't work at the moment */
+#else
if(cuCompilerPath() == "")
return false;
+#endif
+#endif
/* success */
result = true;
@@ -401,7 +407,15 @@ string cuCompilerPath()
else
nvcc = path_join(defaultpath, executable);
- return (path_exists(nvcc))? nvcc: "";
+ if(path_exists(nvcc))
+ return nvcc;
+
+#ifndef _WIN32
+ if(system("which nvcc") == 0)
+ return "nvcc";
+#endif
+
+ return "";
}
CCL_NAMESPACE_END