diff options
author | Jordan Williams <jordan@jwillikers.com> | 2024-04-22 09:14:26 -0500 |
---|---|---|
committer | Jordan Williams <jordan@jwillikers.com> | 2024-04-24 15:30:30 -0500 |
commit | a2c940f44b2a54deedfc21cc7fd91625dcbacf1a (patch) | |
tree | 1efecbc7faea23e44c2dee7142454c004e080335 | |
parent | fa3bce7e0025fb921a8d05ac26288e687cd1bec5 (diff) | |
download | util-linux-a2c940f44b2a54deedfc21cc7fd91625dcbacf1a.tar.gz |
meson: Add build-chcpu option
The cpu_set_t type does not exist on macOS.
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
-rw-r--r-- | meson.build | 12 | ||||
-rw-r--r-- | meson_options.txt | 2 |
2 files changed, 10 insertions, 4 deletions
diff --git a/meson.build b/meson.build index cddeb98372..0c29d7c635 100644 --- a/meson.build +++ b/meson.build @@ -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', diff --git a/meson_options.txt b/meson_options.txt index b2507d228b..ed4001d44e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -57,6 +57,8 @@ option('build-swapon', type : 'feature', description : 'build swapon') option('build-swapoff', type : 'feature', description : 'build swapoff') +option('build-chcpu', type : 'feature', + description : 'build chcpu') option('build-losetup', type : 'feature', description : 'build losetup') option('build-zramctl', type : 'feature', |