Revision: 53241
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53241
Author: blendix
Date: 2012-12-21 10:27:35 +0000 (Fri, 21 Dec 2012)
Log Message:
-----------
Cycles: add some extra CUDA nvcc paths for runtime compile, might help for
#33622.
Modified Paths:
--------------
trunk/blender/intern/cycles/util/util_cuda.cpp
Modified: trunk/blender/intern/cycles/util/util_cuda.cpp
===================================================================
--- trunk/blender/intern/cycles/util/util_cuda.cpp 2012-12-21 10:26:48 UTC
(rev 53240)
+++ trunk/blender/intern/cycles/util/util_cuda.cpp 2012-12-21 10:27:35 UTC
(rev 53241)
@@ -394,10 +394,10 @@
string cuCompilerPath()
{
#ifdef _WIN32
- const char *defaultpath = "C:/CUDA/bin";
+ const char *defaultpaths[] = {"C:/CUDA/bin", NULL};
const char *executable = "nvcc.exe";
#else
- const char *defaultpath = "/usr/local/cuda/bin";
+ const char *defaultpaths[] = {"/Developer/NVIDIA/CUDA-4.2/bin",
"/usr/local/cuda-4.2/bin", "/usr/local/cuda/bin", NULL};
const char *executable = "nvcc";
#endif
@@ -405,13 +405,17 @@
string nvcc;
- if(binpath)
+ if(binpath) {
nvcc = path_join(binpath, executable);
- else
- nvcc = path_join(defaultpath, executable);
+ if(path_exists(nvcc))
+ return nvcc;
+ }
- if(path_exists(nvcc))
- return nvcc;
+ for(int i = 0; defaultpaths[i]; i++) {
+ nvcc = path_join(defaultpaths[i], executable);
+ if(path_exists(nvcc))
+ return nvcc;
+ }
#ifndef _WIN32
{
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs