Build the test helper for the libsmartcols tests.
The helper expects libsmartcols.h to be in "$builddir/libsmartcols/src",
so make sure meson also places it there.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
defs = configuration_data()
defs.set('LIBSMARTCOLS_VERSION', pc_version)
-configure_file(
- input : 'src/libsmartcols.h.in',
- output : 'libsmartcols.h',
- configuration : defs,
- install : build_libsmartcols,
- install_dir : get_option('includedir') / 'libsmartcols',
-)
+subdir('src')
scols_bison = generator(
bison,
--- /dev/null
+configure_file(
+ input : 'libsmartcols.h.in',
+ output : 'libsmartcols.h',
+ configuration : defs,
+ install : build_libsmartcols,
+ install_dir : get_option('includedir') / 'libsmartcols',
+)
build_by_default: program_tests)
exes += exe
+exe = executable(
+ 'test_scols_termreduce',
+ 'tests/helpers/test_scols_termreduce.c',
+ include_directories : includes,
+ link_with : [lib_smartcols],
+ build_by_default: program_tests)
+if not is_disabler(exe)
+ exes += exe
+endif
+
############################################################
if conf.get('HAVE_OPENAT').to_string() == '1'