41 lines
1.1 KiB
Meson
41 lines
1.1 KiB
Meson
project('xlang', ['cpp', 'c'],
|
|
version : '0.1',
|
|
license : 'ISC',
|
|
default_options : ['buildtype=debugoptimized',
|
|
'warning_level=3',
|
|
'cpp_std=c++20'])
|
|
|
|
antlr4_runtime_dep = dependency('antlr4-runtime', modules : ['antlr4_shared'])
|
|
antlr4_exe = find_program('antlr4')
|
|
antlr4 = generator(antlr4_exe,
|
|
arguments : [
|
|
'-o', '@BUILD_DIR@',
|
|
'-package', meson.project_name(),
|
|
'-visitor',
|
|
'-Dlanguage=Cpp',
|
|
'-Xexact-output-dir',
|
|
'@INPUT@',
|
|
],
|
|
output : [
|
|
'@BASENAME@Lexer.h',
|
|
'@BASENAME@Lexer.cpp',
|
|
'@BASENAME@Parser.h',
|
|
'@BASENAME@Parser.cpp',
|
|
'@BASENAME@Visitor.h',
|
|
'@BASENAME@Visitor.cpp',
|
|
'@BASENAME@BaseVisitor.h',
|
|
'@BASENAME@BaseVisitor.cpp',
|
|
'@BASENAME@Listener.h',
|
|
'@BASENAME@Listener.cpp',
|
|
'@BASENAME@BaseListener.h',
|
|
'@BASENAME@BaseListener.cpp',
|
|
])
|
|
|
|
qbe_exe = find_program('qbe')
|
|
qbe = generator(qbe_exe,
|
|
arguments : ['-o', '@OUTPUT@', '@INPUT@'],
|
|
output : '@BASENAME@.S')
|
|
|
|
subdir('bootstrap')
|
|
subdir('test')
|