There is not a good/easy way to do this that I can think of off the top of my head...<div><br></div><div>Why do you need to tell where a variable came from...?<br>What are you going to do differently based on this information?</div>
<div><br></div><div><br><div class="gmail_quote">On Wed, Nov 26, 2008 at 10:03 AM, Steven Van Ingelgem <span dir="ltr"><<a href="mailto:steven@vaningelgem.be">steven@vaningelgem.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br><br><br>How can I determine which parameters have been entered via command line, which come from the script and which from the cache?<br><br>For example:<br>--------<br>MESSAGE(STATUS "TEST (before): ${TEST}")<br>
SET(TEST "a")<br>MESSAGE(STATUS "TEST (after): ${TEST}")<br>
--------<br>
<br>C:\tmp>cmake . -G"MinGW Makefiles"<br>-- TEST (before):<br>-- TEST (after): a<br>C:\tmp>cmake .<br>-- TEST (before):<br>-- TEST (after): a<br>C:\tmp>cmake -D TEST=b .<br>-- TEST (before): b<br>-- TEST (after): a<br>
C:\tmp>cmake .<br>-- TEST (before): b<br>-- TEST (after): a<br><br>What I want to detect is how the parameter is set. Via the cache (4th step), via the command line (3rd step) or via the script (step 1/2)?<br><br>Can anyone help me with that?<br>
<br><br>Thanks,<br><font color="#888888">Steven<br><br><br>
</font><br>_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><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>