abacus: remove meson build system
This commit is contained in:
parent
6c0950dbe1
commit
eb9295cfcd
13
meson.build
13
meson.build
|
@ -1,13 +0,0 @@
|
|||
project(
|
||||
'abacus',
|
||||
'cpp',
|
||||
version: '0.0.0',
|
||||
license: 'MIT',
|
||||
default_options: [
|
||||
'warning_level=3',
|
||||
'cpp_std=c++17',
|
||||
],
|
||||
)
|
||||
|
||||
subdir('src')
|
||||
subdir('tests')
|
|
@ -1,16 +0,0 @@
|
|||
bignum_sources = files(
|
||||
'bignum.cc',
|
||||
'bignum.hh',
|
||||
)
|
||||
|
||||
bignum_inc = include_directories('.')
|
||||
|
||||
bignum_lib = static_library(
|
||||
'bignum',
|
||||
sources: bignum_sources,
|
||||
)
|
||||
|
||||
bignum = declare_dependency(
|
||||
link_with: bignum_lib,
|
||||
include_directories: bignum_inc,
|
||||
)
|
|
@ -1,16 +0,0 @@
|
|||
abacus_sources = files(
|
||||
'abacus.cc',
|
||||
)
|
||||
|
||||
subdir('bignum')
|
||||
subdir('parse')
|
||||
|
||||
abacus = executable(
|
||||
'abacus',
|
||||
sources: abacus_sources,
|
||||
dependencies: [
|
||||
bignum,
|
||||
parse,
|
||||
],
|
||||
install: true,
|
||||
)
|
|
@ -1,48 +0,0 @@
|
|||
flex_binary = find_program('flex', required: true)
|
||||
lexer_sources = custom_target(
|
||||
'lexer_sources',
|
||||
input: 'scanner.ll',
|
||||
output: 'scanner.cc',
|
||||
command: [
|
||||
flex_binary,
|
||||
'-o',
|
||||
'@OUTPUT@',
|
||||
'@INPUT@',
|
||||
],
|
||||
)
|
||||
|
||||
bison_binary = find_program('bison', required: true)
|
||||
parser_sources = custom_target(
|
||||
'parser_sources',
|
||||
input: 'parser.yy',
|
||||
output: [
|
||||
'parser.cc',
|
||||
'parser.hh',
|
||||
],
|
||||
command: [
|
||||
bison_binary,
|
||||
'@INPUT@',
|
||||
'--output=@OUTPUT0@',
|
||||
'--defines=@OUTPUT1@',
|
||||
'--graph',
|
||||
# FIXME: html output in bison 3.7.90
|
||||
],
|
||||
)
|
||||
|
||||
parse_inc = include_directories('.')
|
||||
|
||||
parse_lib = static_library(
|
||||
'parser',
|
||||
'parser-driver.cc',
|
||||
'parser-driver.hh',
|
||||
lexer_sources,
|
||||
parser_sources,
|
||||
dependencies: [
|
||||
bignum,
|
||||
],
|
||||
)
|
||||
|
||||
parse = declare_dependency(
|
||||
link_with: parse_lib,
|
||||
include_directories: parse_inc,
|
||||
)
|
|
@ -1 +0,0 @@
|
|||
subdir('unit')
|
|
@ -1,26 +0,0 @@
|
|||
gtest = dependency(
|
||||
'gtest',
|
||||
main: true,
|
||||
required: false,
|
||||
)
|
||||
|
||||
if gtest.found()
|
||||
unit_test_sources = files(
|
||||
'bignum.cc',
|
||||
)
|
||||
|
||||
unit_tests = executable(
|
||||
'unit_tests',
|
||||
sources: unit_test_sources,
|
||||
dependencies: [
|
||||
bignum,
|
||||
gtest,
|
||||
],
|
||||
)
|
||||
|
||||
test(
|
||||
'unit tests',
|
||||
unit_tests,
|
||||
protocol: 'gtest',
|
||||
)
|
||||
endif
|
Loading…
Reference in a new issue