# Linux usage like help

**URL:** https://discourse.cmake.org/t/linux-usage-like-help/524
**Category:** Community
**Created:** [January 20, 2020, 11:50am UTC](https://discourse.cmake.org/t/linux-usage-like-help/524 "2020-01-20T11:50:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![regev.ran](https://discourse.cmake.org/user_avatar/discourse.cmake.org/regev.ran/32/310_2.png) [@regev.ran](https://discourse.cmake.org/u/regev.ran)
#### Post date: [January 20, 2020, 11:50am UTC](https://discourse.cmake.org/t/linux-usage-like-help/524/1 "2020-01-20T11:50:13Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![robert.maynard](https://discourse.cmake.org/user_avatar/discourse.cmake.org/robert.maynard/32/4_2.png) [@robert.maynard](https://discourse.cmake.org/u/robert.maynard)
#### Post date: [January 20, 2020, 9:10pm UTC](https://discourse.cmake.org/t/linux-usage-like-help/524/2 "2020-01-20T21:10:37Z")

</div>

The recommend pattern is to use `option` for binary options. This way users that are using `ccache` or `cmake-gui` can also easily modify the state of the option.
