You've already forked godot
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:
@@ -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__":
|
||||
|
||||
Reference in New Issue
Block a user