fypp icon indicating copy to clipboard operation
fypp copied to clipboard

parsing cmake variables values of bool

Open zerothi opened this issue 1 year ago • 5 comments

Using fypp to parse cmake options are really great, but I generally have a problem parsing WITH_* arguments.

I would rather not do:


#:if defined("WITH_OPT")
.. option ON
#:endif

but rather something like:

#:if bool("WITH_OPT")
... option ON
#:endif

I can of course define a function that parses this, but I think this could be very generally useful? The truth/false values could optionally be set by some global FYPP_BOOL_TRUE/FALSE variables?

zerothi avatar Mar 02 '23 10:03 zerothi