mesonEnable
lib.strings.mesonEnable
Docs pulled from | This Revision | about 1 hour ago
Create a "-D<feature>={enabled,disabled}" string that can be passed to
typical Meson invocations.
Inputs
feature- The feature to be enabled or disabled
flag- The controlling flag
Type
mesonEnable :: String -> Bool -> String
Examples
lib.strings.mesonEnable usage example
mesonEnable "docs" true
=> "-Ddocs=enabled"
mesonEnable "savage" false
=> "-Dsavage=disabled"
Noogle detected
Implementation
The following is the current implementation of this function.
mesonEnable =
feature: flag:
assert (lib.isString feature);
assert (lib.isBool flag);
mesonOption feature (if flag then "enabled" else "disabled");