1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

SCons: Improve logic to generate modules_tests.gen.h

This removes the need for `AlwaysBuild` by ensuring that the proper
files are being tracked as `Depends`.
This commit is contained in:
Rémi Verschelde
2022-02-08 12:39:40 +01:00
parent f425d403fe
commit 3495288b03
2 changed files with 30 additions and 24 deletions

View File

@@ -14,13 +14,10 @@ def generate_modules_enabled(target, source, env):
def generate_modules_tests(target, source, env):
import os
import glob
with open(target[0].path, "w") as f:
for name, path in env.module_list.items():
headers = glob.glob(os.path.join(path, "tests", "*.h"))
for h in headers:
f.write('#include "%s"\n' % (os.path.normpath(h)))
for header in source:
f.write('#include "%s"\n' % (os.path.normpath(header.path)))
if __name__ == "__main__":