51 lines
1.0 KiB
Plaintext
51 lines
1.0 KiB
Plaintext
|
|
Import('env')
|
|
|
|
env.ModuleConfig(
|
|
name = 'Test',
|
|
description = 'Test Module',
|
|
cxx_namespace = 'tst'
|
|
)
|
|
|
|
src_files = Split("""
|
|
main.cpp
|
|
test.cpp
|
|
test.generated.cpp
|
|
""")
|
|
|
|
# env.IncludeGen(src_files,
|
|
# template=env.File('#templates/header.jinja'),
|
|
# include_filter=r'.*\.refl.hpp'
|
|
# )
|
|
|
|
# env.CodeGen('GenSource', inputs = [], template=env.File('#templates/source.jinja'), )
|
|
# env.CodeGen(
|
|
# target = 'test.generated.cpp',
|
|
# template = env.File('#templates/source.jinja'),
|
|
# inputs = {'source': 'test.cpp'}
|
|
# )
|
|
|
|
ast_json = env.AstJson(
|
|
target = env.File('test.json'),
|
|
source = 'test.hpp'
|
|
)
|
|
env.Default(ast_json)
|
|
|
|
ast_hpp = env.AstJinja(
|
|
target = env.File('test.refl.hpp'),
|
|
source = env.File('test.hpp'),
|
|
template = env.File('#templates/header.jinja')
|
|
)
|
|
|
|
prog_app = env.Program(
|
|
name = 'Test',
|
|
target = env['BIN_DIR'] + '/test',
|
|
source = src_files,
|
|
dependencies = {
|
|
}
|
|
)
|
|
env.Requires(prog_app.target, ast_hpp)
|
|
env.Default(prog_app)
|
|
|
|
Return('env')
|