Fix scons not installing closure/ directory for runtime compiles of CUDA kernel.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 3 Dec 2012 16:51:05 +0000 (16:51 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 3 Dec 2012 16:51:05 +0000 (16:51 +0000)
SConstruct
build_files/scons/tools/Blender.py
intern/cycles/kernel/SConscript

index d6972de8cabdcde34daa1433b28373e6e218639c..c2bae0459caec630fe34880b8573a10136ee0301 100644 (file)
@@ -700,6 +700,8 @@ if env['OURPLATFORM']!='darwin':
             source.remove('kernel.cpp')
             source.remove('CMakeLists.txt')
             source.remove('svm')
+            source.remove('closure')
+            source.remove('shaders')
             source.remove('osl')
             source=['intern/cycles/kernel/'+s for s in source]
             source.append('intern/cycles/util/util_color.h')
@@ -715,6 +717,14 @@ if env['OURPLATFORM']!='darwin':
             if '__pycache__' in source: source.remove('__pycache__')
             source=['intern/cycles/kernel/svm/'+s for s in source]
             scriptinstall.append(env.Install(dir=dir,source=source))
+            # closure
+            dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'kernel', 'closure')
+            source=os.listdir('intern/cycles/kernel/closure')
+            if '.svn' in source: source.remove('.svn')
+            if '_svn' in source: source.remove('_svn')
+            if '__pycache__' in source: source.remove('__pycache__')
+            source=['intern/cycles/kernel/closure/'+s for s in source]
+            scriptinstall.append(env.Install(dir=dir,source=source))
 
             # licenses
             dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'license')
index 6805b5b0a96d62007b6fbb58df6b2b8cae7a5acb..94a9f1d9c244b3c1005bb43623cdfa8054512dc9 100644 (file)
@@ -651,7 +651,7 @@ def AppIt(target=None, source=None, env=None):
             commands.getoutput(cmd)
             cmd = 'cp -R %s/kernel/*.h %s/kernel/*.cl %s/kernel/*.cu %s/kernel/' % (croot, croot, croot, cinstalldir)
             commands.getoutput(cmd)
-            cmd = 'cp -R %s/kernel/svm %s/util/util_color.h %s/util/util_math.h %s/util/util_transform.h %s/util/util_types.h %s/kernel/' % (croot, croot, croot, croot, croot, cinstalldir)
+            cmd = 'cp -R %s/kernel/svm %s/kernel/closure %s/util/util_color.h %s/util/util_math.h %s/util/util_transform.h %s/util/util_types.h %s/kernel/' % (croot, croot, croot, croot, croot, croot, cinstalldir)
             commands.getoutput(cmd)
             cmd = 'cp -R %s/../intern/cycles/kernel/*.cubin %s/lib/' % (builddir, cinstalldir)
             commands.getoutput(cmd)
index 14890164a42ed754d82e99beb129c2754e0bf224..730f758194ecf0cd635d7ae3f54a975862e93656 100644 (file)
@@ -32,16 +32,17 @@ if env['WITH_BF_CYCLES_CUDA_BINARIES']:
     kernel_file = os.path.join(source_dir, "kernel.cu")
     util_dir = os.path.join(source_dir, "../util")
     svm_dir = os.path.join(source_dir, "../svm")
+    closure_dir = os.path.join(source_dir, "../closure")
 
     # nvcc flags
     nvcc_flags = "-m%s" % (bits)
     nvcc_flags += " --cubin --ptxas-options=\"-v\" --maxrregcount=24"
     nvcc_flags += " --opencc-options -OPT:Olimit=0"
     nvcc_flags += " -DCCL_NAMESPACE_BEGIN= -DCCL_NAMESPACE_END= -DNVCC"
-    nvcc_flags += " -I \"%s\" -I \"%s\"" % (util_dir, svm_dir)
+    nvcc_flags += " -I \"%s\" -I \"%s\" -I \"%s\"" % (util_dir, svm_dir, closure_dir)
 
     # dependencies
-    dependencies = ['kernel.cu'] + kernel.Glob('*.h') + kernel.Glob('../util/*.h') + kernel.Glob('svm/*.h')
+    dependencies = ['kernel.cu'] + kernel.Glob('*.h') + kernel.Glob('../util/*.h') + kernel.Glob('svm/*.h') + kernel.Glob('closure/*.h')
     last_cubin_file = None
 
     # add command for each cuda architecture