diff options
author | Martijn Berger <martijn.berger@gmail.com> | 2013-12-29 17:42:02 +0400 |
---|---|---|
committer | Martijn Berger <martijn.berger@gmail.com> | 2013-12-29 17:57:21 +0400 |
commit | 21d587d9fc055f568f7e0a81b58d703de7a2a1af (patch) | |
tree | 0c12b453ddf60849b922493bcd51cbe173918251 /intern | |
parent | 42aa19088e02e296b4cc19b7171de2840e111539 (diff) |
Added option to have a seperate environment for executing nvcc
This can be used to compiler cuda kernels with Visual Studio 2010 while
the rest of blender is compiled with MSVC 12.0 / 2013
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/SConscript | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/kernel/SConscript b/intern/cycles/kernel/SConscript index a0522d9ba8e..88d8bb1786e 100644 --- a/intern/cycles/kernel/SConscript +++ b/intern/cycles/kernel/SConscript @@ -94,7 +94,11 @@ if env['WITH_BF_CYCLES_CUDA_BINARIES']: # sm_3x cuda_arch_flags = "--maxrregcount=32 --use_fast_math" - command = "\"%s\" -arch=%s %s %s \"%s\" -o \"%s\"" % (nvcc, arch, nvcc_flags, cuda_arch_flags, kernel_file, cubin_file) + if env['BF_CYCLES_CUDA_ENV']: + MS_SDK = "C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Bin\\SetEnv.cmd" + command = "\"%s\" & %s -arch=%s %s %s \"%s\" -o \"%s\"" % (MS_SDK, nvcc, arch, nvcc_flags, cuda_arch_flags, kernel_file, cubin_file) + else: + command = "\"%s\" -arch=%s %s %s \"%s\" -o \"%s\"" % (nvcc, arch, nvcc_flags, cuda_arch_flags, kernel_file, cubin_file) kernel.Command(cubin_file, 'kernel.cu', command) kernel.Depends(cubin_file, dependencies) |