From 97ab0e2ab60fdda78f610032408df104de20b9f1 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 9 Feb 2023 23:55:09 -0500 Subject: [PATCH] meson: always build the zstd binary when tests are enabled We need to run it for the tests, even if programs are disabled. So if they are disabled, create a build rule for the program, but don't install it. Just make it available for the test itself. --- build/meson/meson.build | 2 +- build/meson/programs/meson.build | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/build/meson/meson.build b/build/meson/meson.build index 576dc44db..15c56c2b1 100644 --- a/build/meson/meson.build +++ b/build/meson/meson.build @@ -132,7 +132,7 @@ endif subdir('lib') -if bin_programs +if bin_programs or bin_tests subdir('programs') endif diff --git a/build/meson/programs/meson.build b/build/meson/programs/meson.build index e611dc337..0b5a93056 100644 --- a/build/meson/programs/meson.build +++ b/build/meson/programs/meson.build @@ -72,7 +72,14 @@ zstd = executable('zstd', c_args: zstd_c_args, dependencies: zstd_deps, export_dynamic: export_dynamic_on_windows, # Since Meson 0.45.0 - install: true) + build_by_default: bin_programs, + install: bin_programs) + +if not bin_programs + # we generate rules to build the programs, but don't install anything + # so do not continue to installing scripts and manpages + subdir_done() +endif zstd_frugal_sources = [join_paths(zstd_rootdir, 'programs/zstdcli.c'), join_paths(zstd_rootdir, 'programs/timefn.c'), -- 2.47.2