Fix scons CUDA build and compile error with more strict compilers.

This commit is contained in:
Brecht Van Lommel 2014-03-29 15:56:29 +01:00
parent f449542d6a
commit 73299516fa
Notes: blender-bot 2023-10-13 01:54:23 +02:00
Referenced by issue #39507, Branched Path + Direct Light Sample (off)
2 changed files with 4 additions and 4 deletions

View File

@ -77,7 +77,7 @@ if env['WITH_BF_CYCLES_CUDA_BINARIES']:
nvcc_flags += " --cubin --ptxas-options=\"-v\""
nvcc_flags += " -D__KERNEL_CUDA_VERSION__=%d" % (cuda_version)
nvcc_flags += " -DCCL_NAMESPACE_BEGIN= -DCCL_NAMESPACE_END= -DNVCC"
nvcc_flags += " -I \"%s\" -I \"%s\" -I \"%s\"" % (util_dir, svm_dir, geom_dir, closure_dir)
nvcc_flags += " -I \"%s\" -I \"%s\" -I \"%s\" -I \"%s\"" % (util_dir, svm_dir, geom_dir, closure_dir)
# dependencies
dependencies = ['kernel.cu'] + kernel.Glob('*.h') + kernel.Glob('../util/*.h') + kernel.Glob('svm/*.h') + kernel.Glob('geom/*.h') + kernel.Glob('closure/*.h')

View File

@ -223,9 +223,9 @@ const char *Attribute::standard_name(AttributeStandard std)
AttributeStandard Attribute::name_standard(const char *name)
{
for(AttributeStandard std = ATTR_STD_NONE; std < ATTR_STD_NUM; std++)
if(strcmp(name, Attribute::standard_name(std)) == 0)
return std;
for(int std = ATTR_STD_NONE; std < ATTR_STD_NUM; std++)
if(strcmp(name, Attribute::standard_name((AttributeStandard)std)) == 0)
return (AttributeStandard)std;
return ATTR_STD_NONE;
}