<div dir="ltr"><div><div>My question is still not answered completely:<br></div>When should the new variable be added? On startup is not really possible because it might be the case that your src/binary directory is not set properly. <br>
</div>So you would agree that it makes sense to do it "on configure" but only if the cache is empty? This will not allow to overwrite the variable via parameter but I guess that usecase is not very common?<br></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 4, 2013 at 4:57 PM, Matthew Woehlke <span dir="ltr"><<a href="mailto:matthew.woehlke@kitware.com" target="_blank">matthew.woehlke@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2013-11-02 07:58, David Cole wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
physhh wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The question is: What is the expected behavior?<br>
</blockquote>
<br></div><div class="im">
ccmake and cmake-gui are interactive programs meant to prompt the user<br>
to fill in the cache values properly before typing 'c' or clicking<br>
'Configure'.<br>
<br>
-D is a convenient way to give cache values an initial value that is<br>
different from their natural 'default' values.<br>
<br>
Using -D with ccmake and cmake-gui makes total sense, but it should only<br>
be used by the program to set the initial value that users see in the<br>
UI. After that point, the user should be in charge, and if he sets<br>
something different in the UI, the user value should win.<br>
<br>
I think Matthew's bug report is correct: the UI value should be used and<br>
then stored in the cache for subsequent runs. The -D values to ccmake<br>
and cmake-gui should only be used for initializing UI entries.<br>
Therefore, they should *NOT* be passed to the internal CMake instance<br>
used for configuring.<br>
</div></blockquote>
<br>
My thoughts exactly. Thanks, David.<div class="HOEnZb"><div class="h5"><br>
<br>
-- <br>
Matthew<br>
<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</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/<u></u>CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/<u></u>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/<u></u>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/<u></u>training.html</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/<u></u>opensource/opensource.html</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/<u></u>listinfo/cmake</a><br>
</div></div></blockquote></div><br></div>