You should avoid using FORCE in the first place.<div><br></div><div>:-)</div><div><br></div><div><br></div><div>But if you have to use it, then you should provide the type and documentation along with the call that uses FORCE. If you have multiple calls that require this information, consider using variables to eliminate the duplication and reference the variables from the multiple calls.<br>
<br><br><div class="gmail_quote">On Fri, Sep 21, 2012 at 11:39 AM, David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria@gmail.com" target="_blank">daviddoria@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is there a way to use the FORCE argument to set() without resetting<br>
the docstring? I tried:<br>
<br>
cmake_minimum_required(VERSION 2.6)<br>
PROJECT(CacheForce)<br>
<br>
# Create a variable<br>
set(MyVariable OFF CACHE BOOL &quot;Description goes here.&quot; FORCE)<br>
<br>
# Change the value<br>
set(MyVariable ON CACHE FORCE) # error: &quot;set given invalid arguments<br>
for CACHE mode.&quot; . I was hoping not to have to re-specify the type<br>
(BOOL) either.<br>
<br>
It seems like it is just asking for things to get out of sync by<br>
having to set the docstring in more than one place.<br>
<br>
Is there a way to do this?<br>
<br>
Thanks,<br>
<br>
David<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div>