The question is: how to add a usage, linux-like, to cmake file?
I have a lot of variables in my cmake files. I added Usage in the begining of the main cmake file, like this:
if ( DEFINED USAGE )
message( … )
message( … )
unset( USAGE CACHE )
return()
endif()
And then when I run cmake, and want to get the usage message, I run it like this:
cmake -DUSAGE=TRUE <path/to/source>
And I get the usage messages
Is there a better option, builtin option or something else?
Asking the same question in other words:
How do I communicate my cmake users how to configure the project?