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.
This commit is contained in:
@@ -132,7 +132,7 @@ endif
|
|||||||
|
|
||||||
subdir('lib')
|
subdir('lib')
|
||||||
|
|
||||||
if bin_programs
|
if bin_programs or bin_tests
|
||||||
subdir('programs')
|
subdir('programs')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,14 @@ zstd = executable('zstd',
|
|||||||
c_args: zstd_c_args,
|
c_args: zstd_c_args,
|
||||||
dependencies: zstd_deps,
|
dependencies: zstd_deps,
|
||||||
export_dynamic: export_dynamic_on_windows, # Since Meson 0.45.0
|
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'),
|
zstd_frugal_sources = [join_paths(zstd_rootdir, 'programs/zstdcli.c'),
|
||||||
join_paths(zstd_rootdir, 'programs/timefn.c'),
|
join_paths(zstd_rootdir, 'programs/timefn.c'),
|
||||||
|
|||||||
Reference in New Issue
Block a user