I am doing cross-platform compilation.  I don&#39;t want everything to recompile on all platforms.  That is a risk with having a configuration header file.  If I remember correctly, cmake would ignore conditional include guards when doing dependency scanning.  Therefore:<br>
#ifdef WIN32<br>#include &quot;config.hh&quot;<br>#endif<br><br>would trigger a compilation on all platforms if config.hh changed.<br><br>I want everything to recompile on Windows, but not on my linux builds.<br><br>Regards,<br>
<br>Juan<br><br><div class="gmail_quote">On Mon, Aug 31, 2009 at 1:30 PM, David Cole <span dir="ltr">&lt;<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Your original question was about why not everything was recompiling... Then, when a solution is offered, you say &quot;but if I do that everything will recompile!&quot;<br><br><div>We thought that&#39;s what you wanted... :-)</div>

<div><br></div><div><br><div class="gmail_quote"><div><div></div><div class="h5">On Mon, Aug 31, 2009 at 2:22 PM, j s <span dir="ltr">&lt;<a href="mailto:j.s4403@gmail.com" target="_blank">j.s4403@gmail.com</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
<div>That wouldn&#39;t be good for what I am trying to do.  I just need:</div>
<div>_USE_MATH_DEFINES</div>
<div> </div>
<div>for all files so that Visual C++ recognizes M_PI.  Creating a header file dependency could trigger a huge storm of recompilations just by touching the file.</div>
<div> </div>
<div>I&#39;ll just have to be careful around Visual C++.</div>
<div> </div>
<div>Juan<br><br></div><div><div></div><div>
<div class="gmail_quote">On Mon, Aug 31, 2009 at 11:16 AM, Clinton Stimpson <span dir="ltr">&lt;<a href="mailto:clinton@elemtech.com" target="_blank">clinton@elemtech.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<div>
<div></div>
<div>On Sunday 30 August 2009 12:20:51 pm Philip Lowman wrote:<br>&gt; On Tue, Aug 25, 2009 at 1:32 PM, j s &lt;<a href="mailto:j.s4403@gmail.com" target="_blank">j.s4403@gmail.com</a>&gt; wrote:<br>&gt; &gt; I am using the Visual Studio generator from the cmake binary<br>


&gt; &gt; distribution. If I change flags using ADD_DEFINITIONS, I notice that it<br>&gt; &gt; doesn&#39;t trigger a rebuild of all the affected files.<br>&gt; &gt;<br>&gt; &gt; Is this by design?<br>&gt;<br>&gt; I&#39;ve known and worked around this limitation for a few years now.  The<br>


&gt; easiest thing to do is clean the entire solution if you change any compile<br>&gt; flags whatsoever (unless you know exactly what you changed and the impact<br>&gt; of doing it).<br>&gt;<br>&gt; The problem is that VS doesn&#39;t remember the old flags when you open up a<br>


&gt; project file with new flags so isn&#39;t capable of cleaning the project for<br>&gt; you.  This issue could probably be worked around in CMake itself one way or<br>&gt; another but it&#39;s never been worked on to my knowledge.<br>


<br></div></div>Or how about putting it into a configured header file instead?<br>Visual Studio rebuilds correctly if you do it that way.<br><br>Clint<br><br></blockquote></div><br>
</div></div><br></div></div>_______________________________________________<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>
</blockquote></div><br>