diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-07-22 13:57:39 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2019-07-22 15:08:32 +0200 |
commit | 66d09a6b4cae73fbb48fe01082af5397c4a75d9a (patch) | |
tree | 052f28156bf8b60e33f928b1d3d32918f6988ab1 /main | |
parent | 017b224a87064a3d333ba63809a0f12cfe2c4412 (diff) |
SCons: Fix uses of [].append instead of env.add_source_files()
Also added support for SCons project-absolute paths (starting with #) and
warning about duplicates in add_source_files(), and fixed
default_controller_mappings.gen.cpp being included twice after first build
due to *.cpp globbing.
Part of #30270.
Diffstat (limited to 'main')
-rw-r--r-- | main/SCsub | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/SCsub b/main/SCsub index e7fe6ab4e1..62bc155c67 100644 --- a/main/SCsub +++ b/main/SCsub @@ -6,6 +6,7 @@ from platform_methods import run_in_subprocess import main_builders env.main_sources = [] + env.add_source_files(env.main_sources, "*.cpp") # order matters here. higher index controller database files write on top of lower index database files @@ -14,7 +15,9 @@ controller_databases = ["#main/gamecontrollerdb.txt", "#main/gamecontrollerdb_20 env.Depends("#main/default_controller_mappings.gen.cpp", controller_databases) env.CommandNoCache("#main/default_controller_mappings.gen.cpp", controller_databases, run_in_subprocess(main_builders.make_default_controller_mappings)) -env.main_sources.append("#main/default_controller_mappings.gen.cpp") +# Don't warn about duplicate entry here, we need it registered manually for first build, +# even if later builds will pick it up twice due to above *.cpp globbing. +env.add_source_files(env.main_sources, "#main/default_controller_mappings.gen.cpp", warn_duplicates=False) env.Depends("#main/splash.gen.h", "#main/splash.png") env.CommandNoCache("#main/splash.gen.h", "#main/splash.png", run_in_subprocess(main_builders.make_splash)) |