31 lines
767 B
Meson
31 lines
767 B
Meson
|
project('regex-is-hard', 'cpp', default_options: [
|
||
|
'buildtype=debugoptimized',
|
||
|
'cpp_std=c++20',
|
||
|
'warning_level=3',
|
||
|
])
|
||
|
|
||
|
boost = dependency('boost', modules: ['regex'], required: false)
|
||
|
oniguruma = dependency('oniguruma')
|
||
|
pcre = dependency('libpcre2-8')
|
||
|
re2 = dependency('re2')
|
||
|
tre = dependency('tre')
|
||
|
|
||
|
config_h = configure_file(configuration: {
|
||
|
'HAVE_BOOST': boost.found().to_int(),
|
||
|
}, output: 'config.h')
|
||
|
|
||
|
sources = [
|
||
|
'src/main.cc',
|
||
|
'src/data.cc',
|
||
|
'src/engine_c.cc',
|
||
|
'src/engine_oniguruma.cc',
|
||
|
'src/engine_pcre.cc',
|
||
|
'src/engine_re2.cc',
|
||
|
'src/engine_std.cc',
|
||
|
'src/engine_tre.cc',
|
||
|
]
|
||
|
if boost.found()
|
||
|
sources += 'src/engine_boost.cc'
|
||
|
endif
|
||
|
driver = executable('driver', sources, dependencies: [boost, oniguruma, pcre, re2, tre], install: true)
|