On Sep 24, 2012, at 10:18 AM, David Doria <[email protected]> wrote:
>> Well, if ${_var} is already a cache variable, you can retrieve it's
>> HELPSTRING property to see what was set as the original doc string. But if
>> it's not, then there won't be one, and you'll be adding an undocumented
>> option...
>>
>>
>> http://cmake.org/cmake/help/v2.8.9/cmake.html#section_PropertiesonCacheEntries
>
>
> Thanks Dave, that'll work:
>
> get_property(currentHelpString CACHE "${_var}" PROPERTY HELPSTRING)
> set(${_var} OFF CACHE BOOL ${currentHelpString} FORCE)
You might want to put quotes around ${currentHelpString} in case it resolves to
the empty string.
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake