cmakeBool
lib.cmakeBool
Docs pulled from | This Revision | 44 minutes ago
Create a "-D<condition>={TRUE,FALSE}" string that can be passed to typical
CMake invocations.
Inputs
condition- The condition to be made true or false
flag- The controlling flag of the condition
Type
cmakeBool :: string -> bool -> string
Examples
lib.strings.cmakeBool usage example
cmakeBool "ENABLE_STATIC_LIBS" false
=> "-DENABLESTATIC_LIBS:BOOL=FALSE"
Noogle detected
Implementation
The following is the current implementation of this function.
cmakeBool =
condition: flag:
assert (lib.isString condition);
assert (lib.isBool flag);
cmakeOptionType "bool" condition (lib.toUpper (lib.boolToString flag));