cmakeFeature
lib.strings.cmakeFeature
Docs pulled from | This Revision | 26 minutes ago
Nixpkgs manual
Create a "-D<feature>:STRING=<value>" string that can be passed to typical
CMake invocations.
This is the most typical usage, so it deserves a special case.
Inputs
feature- The feature to be set
value- The desired value
Type
cmakeFeature :: String -> String -> String
Examples
lib.strings.cmakeFeature usage example
cmakeFeature "MODULES" "badblock"
=> "-DMODULES:STRING=badblock"
Noogle detected
Implementation
The following is the current implementation of this function.
feature: value:
assert (isString feature);
assert (isString value);
"-D${feature}:${toUpper type}=${value}"