Now we&#39;re getting somewhere...<br>
<br>
Which 2.4 are you on?<br><br>
To force caching of &quot;-D&quot; variables with older cmake versions, specify a
type for each one (the &quot;:STRING&quot; in the modified version below). Also,
I would put the -D values before naming the source directory:<br>
<br>
&nbsp; cmake -G &quot;MSYS Makefiles&quot; -DCMAKE_SYSTEM:STRING=Generic
-DCMAKE_C_COMPILER_WORKS:STRING=1<br>
&nbsp;&nbsp;&nbsp; -DCMAKE_CXX_COMPILER_WORKS:STRING=1
-DCMAKE_COMPILER_IS_GNUCC:STRING=1<br>
&nbsp;&nbsp;&nbsp; -DCMAKE_COMPILER_IS_GNUCXX:STRING=1 -DTARGET:STRING=nios2 ../<br>
<br>
The reason we are all confused trying to answer your question is that
you can do this without the &quot;:STRING&quot; in CMake 2.6. (In fact, I think
the caching behavior changed in one of the 2.4.x patch releases because
people were mainly confused about why &quot;:STRING=&quot; values were cached but
simple &quot;=&quot; values were not.) I think 2.4.8 works the same as 2.6 in
this regard.<br>
<br>
<br>
HTH,<br>
David<br>
<br>
<br>
<br>
<br><div><span class="gmail_quote">On 8/28/08, <b class="gmail_sendername">Vandenbroucke Sander</b> &lt;<a href="mailto:Sander.Vandenbroucke@vandewiele.com">Sander.Vandenbroucke@vandewiele.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br> &gt; &gt; &gt; Vandenbroucke Sander wrote:<br> &gt; &gt; &gt; Hi,<br> &gt; &gt; &gt;<br> &gt; &gt; &gt; Sometimes CMake re-configures my build tree when running make.<br> &gt; &gt; &gt; Unfortunately CMake uses wrong options, I normally set those on the<br>
 &gt; &gt; &gt; command line. This forces me to re-config &amp; rebuild my entire source<br> &gt; &gt; &gt; tree. This is a bit annoying since, in most cases, this is not<br> &gt; necessary<br> &gt; &gt; &gt; and takes a long time.<br>
 &gt; &gt; &gt;<br> &gt; &gt; &gt; So here is my question: can I prevent the automatic reconfiguration<br> &gt; and<br> &gt; &gt; &gt; throw an error/warning so the user can do a manual reconfig?<br> &gt; &gt; &gt;<br> &gt; &gt;<br>
 &gt; &gt; CMake should use the same options.&nbsp;&nbsp;Your options should have been<br> &gt; stored<br> &gt; &gt; in the cache.<br> &gt; You are right, those options are not cached.<br> &gt;<br>
&gt; But Bill&#39;s point was that they *should* be cached. So the question
is: why &gt; are your original command line -D options not saved in
CMakeCache.txt...?<br> <br>They are my project specific options to
define a target architecture. I have not cached them my self. So to fix
this &#39;problem&#39; I should cache all my -D options.<br> <br><br> &gt; What version of CMake are you running?<br> &gt; (Send output of &#39;which cmake&#39; and &#39;cmake --version&#39;...)<br> <br>I&#39;m still on 2.4. Upgrading is planned some time in the future.<br>
 <br><br> &gt; What is your exact original command line for running CMake?<br> <br>set CC=distcc nios2-elf-gcc<br> set CXX=distcc nios2-elf-g++<br>
cmake -G &quot;MSYS Makefiles&quot; ../ -DCMAKE_SYSTEM=Generic
-DCMAKE_C_COMPILER_WORKS=1 -DCMAKE_CXX_COMPILER_WORKS=1
-DCMAKE_COMPILER_IS_GNUCC=1 -DCMAKE_COMPILER_IS_GNUCXX=1 -DTARGET=nios2<br> <br><br> Sander.<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">http://www.cmake.org/mailman/listinfo/cmake</a><br> </blockquote></div><br>