]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: build test_scols_termreduce
authorThomas Weißschuh <thomas@t-8ch.de>
Sun, 12 Apr 2026 06:04:38 +0000 (08:04 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Sun, 12 Apr 2026 06:43:58 +0000 (08:43 +0200)
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>
libsmartcols/meson.build
libsmartcols/src/meson.build [new file with mode: 0644]
meson.build

index a1d2d482991feb2de3dbe83b4ce9debaf1dfce12..81cac8aa1b39a20ecfce0be8614cd74ba746dfe0 100644 (file)
@@ -3,13 +3,7 @@ dir_libsmartcols = include_directories('.', 'src')
 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,
diff --git a/libsmartcols/src/meson.build b/libsmartcols/src/meson.build
new file mode 100644 (file)
index 0000000..68a5013
--- /dev/null
@@ -0,0 +1,7 @@
+configure_file(
+  input : 'libsmartcols.h.in',
+  output : 'libsmartcols.h',
+  configuration : defs,
+  install : build_libsmartcols,
+  install_dir : get_option('includedir') / 'libsmartcols',
+)
index f5b0ba7c17070d7461f72cfd7fc15b19f83f4cd1..034cd1cc4ebb9dd79e23665b642bd85f5a222f07 100644 (file)
@@ -3991,6 +3991,16 @@ exe = executable(
   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'