diff --git a/SConscript b/SConscript index 7322aa0..c140ea2 100644 --- a/SConscript +++ b/SConscript @@ -36,7 +36,7 @@ def _inject_dependency(dependency, kwargs: dict, add_sources: bool = True) -> No _inject_list(kwargs, dependency, 'CPPDEFINES') _inject_list(kwargs, dependency, 'LIBPATH') _inject_list(kwargs, dependency, 'LIBS') - if add_sources and 'ADDITIONAL_SOURCES' in dependency: + if add_sources and 'ADDITIONAL_SOURCES' in dependency and hasattr(kwargs['source'], 'extend'): kwargs['source'].extend(dependency['ADDITIONAL_SOURCES']) if 'DEPENDENCIES' in dependency: for inner_dependency in dependency['DEPENDENCIES']: @@ -299,9 +299,11 @@ if env['COMPILER_FAMILY'] == 'gcc' or env['COMPILER_FAMILY'] == 'clang': # GCC complains about missing initializer for "" that doesn't exist :/ # also GCC complains about some (compiler generated) fields in coroutines not having any linkage # also -Wdangling-reference seems to produce a lot of false positives - # also -Wmaybe-uninitialized seems to produce false positives (or a bug in the standard library?) + # also -Wmaybe-uninitialized seems to produce false positives (or a bug in the standard library?)) + # -Winit-list-lifetime triggers in vulkan.hpp even though it is disabled via pragma :/ env.Append(CCFLAGS = ['-Wno-missing-field-initializers', '-Wno-maybe-uninitialized']) - env.Append(CXXFLAGS = ['-Wno-subobject-linkage', '-Wno-dangling-reference']) + env.Append(CXXFLAGS = ['-Wno-subobject-linkage', '-Wno-dangling-reference', '-Wno-init-list-lifetime']) + else: # no-gnu-anonymous-struct - we don't care env.Append(CCFLAGS = ['-Wno-gnu-anonymous-struct']) @@ -354,6 +356,10 @@ env.AddMethod(_wrap_builder(env.UnityLibrary, is_lib = True), 'UnityLibrary') env.AddMethod(_wrap_builder(env.UnityStaticLibrary, is_lib = True), 'UnityStaticLibrary') env.AddMethod(_wrap_builder(env.UnitySharedLibrary, is_lib = True), 'UnitySharedLibrary') +if hasattr(env, 'Gch'): + env.AddMethod(_wrap_builder(env.Gch), 'Gch') + + if dump_env: print('==== Begin Environment Dump =====') print(env.Dump())