]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - meson.build
meson: Add build-chcpu option
[thirdparty/util-linux.git] / meson.build
index cddeb98372cc0cf10b24e05fdb823481a81a5765..0c29d7c6357233a94ca845cc07f5382f4563cf35 100644 (file)
@@ -1903,16 +1903,20 @@ if not is_disabler(exe)
   bashcompletions += ['lscpu']
 endif
 
+opt = get_option('build-chcpu').require(have_cpu_set_t).allowed()
 exe = executable(
   'chcpu',
   chcpu_sources,
   include_directories : includes,
   link_with : [lib_common],
   install_dir : sbindir,
-  install : true)
-exes += exe
-manadocs += ['sys-utils/chcpu.8.adoc']
-bashcompletions += ['chcpu']
+  install : opt,
+  build_by_default : opt)
+if opt and not is_disabler(exe)
+  exes += exe
+  manadocs += ['sys-utils/chcpu.8.adoc']
+  bashcompletions += ['chcpu']
+endif
 
 exe = executable(
   'wdctl',