I would like to use a cmake option inside a generator expression in order to turn on a certain compile flag. From the documentation it is not clear to me how to achieve this.
I would like to write something like
option(MYOPTION " ... " OFF)
...
add_compile_options($<$<MYOPTION>:-lblas>)
which does not work.
Is there a way to achieve this?