[CMake] Recover help text from option() ?

Petr Kmoch petr.kmoch at gmail.com
Wed Oct 9 07:59:25 EDT 2019


On Wed, 9 Oct 2019 at 11:11, Ellon Paiva <ellonpaiva at gmail.com> wrote:

> Another somehow related question: is there a way to recover the name of
> all options defined in a project?
>
>
>
You should be able to get this by reading the directory property
CACHE_VARIABLES (
https://cmake.org/cmake/help/latest/prop_dir/CACHE_VARIABLES.html ) and
going from there (querying variable types etc.), but note that it's
"intended for debugging purposes." Please read the docs on cache variable
properties (
https://cmake.org/cmake/help/latest/manual/cmake-properties.7.html#properties-on-cache-entries
) to see what's possible.

Petr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20191009/514e501a/attachment.html>


More information about the CMake mailing list