SCons: do not build tests with tools=no

This doesn't affect the resulting binary size, but allows to save
a phew seconds during compilation if building export templates.
This commit is contained in:
Andrii Doroshenko (Xrayez) 2019-09-26 14:56:27 +03:00
parent 04032a9445
commit 752debe204
2 changed files with 3 additions and 3 deletions

View file

@ -28,7 +28,8 @@ env.CommandNoCache("#main/splash_editor.gen.h", "#main/splash_editor.png", run_i
env.Depends("#main/app_icon.gen.h", "#main/app_icon.png")
env.CommandNoCache("#main/app_icon.gen.h", "#main/app_icon.png", run_in_subprocess(main_builders.make_app_icon))
SConscript('tests/SCsub')
if env["tools"]:
SConscript('tests/SCsub')
lib = env.add_library("main", env.main_sources)
env.Prepend(LIBS=[lib])

View file

@ -1457,12 +1457,11 @@ bool Main::start() {
};
if (test != "") {
#ifdef DEBUG_ENABLED
#ifdef TOOLS_ENABLED
main_loop = test_main(test, args);
if (!main_loop)
return false;
#endif
} else if (script != "") {