cmakeOptionType
lib.cmakeOptionType
Docs pulled from | This Revision | about 1 hour ago
Nixpkgs manual
Create a "-D<feature>:<type>=<value>" string that can be passed to typical
CMake invocations.
Inputs
type- The type of the feature to be set, as described in the CMake set documentation the possible values (case insensitive) are: BOOL FILEPATH PATH STRING INTERNAL LIST
feature- The feature to be set
feature- The feature to be set
value- The desired value
Type
cmakeOptionType :: String -> String -> String -> String
Examples
lib.strings.cmakeOptionType usage example
cmakeOptionType "string" "ENGINE" "sdl2"
=> "-DENGINE:STRING=sdl2"
Noogle detected
Implementation
The following is the current implementation of this function.
type: feature: value:
assert (elem (toUpper type) types);
assert (isString feature);
assert (isString value);
"-D${feature}:${toUpper type}=${value}"