From: Thomas Weißschuh Date: Wed, 29 Apr 2026 11:36:32 +0000 (+0200) Subject: meson: add build-lscpu option X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=8db020c361c3b01530466cfcb1b0152a754b448e;p=thirdparty%2Futil-linux.git meson: add build-lscpu option Allow the build of the target to be disabled by the user and also enable the addition of platform restrictions. Signed-off-by: Thomas Weißschuh --- diff --git a/meson.build b/meson.build index 09e68c24a..6326295de 100644 --- a/meson.build +++ b/meson.build @@ -2046,6 +2046,7 @@ if opt and not is_disabler(exe) bashcompletions += ['swapoff'] endif +opt = get_option('build-lscpu').allowed() exe = executable( 'lscpu', lscpu_sources, @@ -2054,8 +2055,9 @@ exe = executable( lib_smartcols], dependencies : [rtas_libs], install_dir : usrbin_exec_dir, - install : true) -if not is_disabler(exe) + install : opt, + build_by_default : opt) +if opt and not is_disabler(exe) exes += exe manadocs += lscpu_manadocs bashcompletions += ['lscpu'] diff --git a/meson_options.txt b/meson_options.txt index 9d87ed375..527246fd4 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -267,6 +267,8 @@ option('build-prlimit', type : 'feature', description : 'build prlimit') option('build-fincore', type : 'feature', description : 'build fincore') +option('build-lscpu', type : 'feature', + description : 'build lscpu') # static programs