lib.cmakeOptionType: support list

This commit is contained in:
Tristan Ross
2025-03-15 11:49:55 -07:00
parent 4d4a2f8b14
commit b26e122b14

View File

@@ -1849,7 +1849,7 @@ rec {
: The type of the feature to be set, as described in
https://cmake.org/cmake/help/latest/command/set.html
the possible values (case insensitive) are:
BOOL FILEPATH PATH STRING INTERNAL
BOOL FILEPATH PATH STRING INTERNAL LIST
`value`
: The desired value
@@ -1872,7 +1872,7 @@ rec {
:::
*/
cmakeOptionType = let
types = [ "BOOL" "FILEPATH" "PATH" "STRING" "INTERNAL" ];
types = [ "BOOL" "FILEPATH" "PATH" "STRING" "INTERNAL" "LIST" ];
in type: feature: value:
assert (elem (toUpper type) types);
assert (isString feature);