<div dir="ltr"><div dir="ltr"><div>Hi Ellon.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 9 Oct 2019 at 09:51, Ellon Paiva <<a href="mailto:ellonpaiva@gmail.com">ellonpaiva@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi there,<br>
<br>
I was wondering if there was a way to recover the help text passed to an <br>
option to be used later below in the same CMake script.<br>
<br>
I saw that the help text goes into a comment before the option on the <br>
CMakeCache.txt, but is it stored in any recoverable variable during the <br>
script processing ?<br>
<br></blockquote><div><br></div><div>Since option() just creates a cache variable, you should be able to retrieve that variable's HELPSTRING property ( <a href="https://cmake.org/cmake/help/latest/prop_cache/HELPSTRING.html">https://cmake.org/cmake/help/latest/prop_cache/HELPSTRING.html</a> ):</div><div><br></div><div> option(SampleOpt "Help")<br></div><div> get_property(result CACHE SampleOpt PROPERTY HELPSTRING)</div><div><br></div><div>Petr<br></div></div></div>