]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: add build-lscpu option
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 29 Apr 2026 11:36:32 +0000 (13:36 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Thu, 14 May 2026 11:18:41 +0000 (13:18 +0200)
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 <thomas@t-8ch.de>
meson.build
meson_options.txt

index 09e68c24ab7e5e663abc9b2b35cbcaeb0c001226..6326295ded51a4dfd84a3cce298b7e3b5162f097 100644 (file)
@@ -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']
index 9d87ed375db4191bc0bf702ec31242d24af1079b..527246fd49ce76c49f70874b9a4c9228cbad2d6a 100644 (file)
@@ -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