Merge pull request #3490 from eli-schwartz/meson-tests-noprograms

meson: always build the zstd binary when tests are enabled
This commit is contained in:
Yann Collet 2023-02-16 11:27:27 -08:00 committed by GitHub
commit 4ebaf36582
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View File

@ -132,7 +132,7 @@ endif
subdir('lib')
if bin_programs
if bin_programs or bin_tests
subdir('programs')
endif

View File

@ -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'),

View File

@ -162,7 +162,7 @@ if host_machine_os != os_windows
playTests_sh,
args: opt,
env: ['ZSTD_BIN=' + zstd.full_path(), 'DATAGEN_BIN=./datagen'],
depends: [datagen],
depends: [datagen, zstd],
suite: suite,
workdir: meson.current_build_dir(),
timeout: 2800) # Timeout should work on HDD drive