On Tue, Dec 9, 2008 at 1:08 PM, Philip Lowman <span dir="ltr">&lt;<a href="mailto:philip@yhbt.com">philip@yhbt.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
This is a known problem. &nbsp;Visual Studio has no way of knowing that the<br>
compiler flags changed in a project file CMake is writing to.<br>
<br>
I would love to see a patch for this for CMake 2.8.</blockquote><div><br>One thought I had here was to have the &quot;vcbuild&quot; command clean any affected projects.&nbsp; This would have the advantage of isolating CMake from implementing any Visual Studio specific mods (i.e. delete these object files to force a recompilation, etc.).&nbsp; This would have some downsides though.<br>
<br>1. The easiest implementation would just be to perform the clean if a project file changes.&nbsp; This would result in more cleaning then necessary as changing source files (for example) shouldn&#39;t cause a rebuild.&nbsp; Certain project modifications like adding a source file to a target shouldn&#39;t cause a clean of that target.<br>
<br>2. Perhaps the biggest gotcha of all, &quot;cleaning&quot; a target would wipe out any binaries/libraries already generated.&nbsp; This is far different from the behavior of CMake&#39;s Makefile generator which simply causes targets to be rebuilt on the next &quot;make&quot;.<br>
<br>Anyone have any ideas for fixing this?&nbsp; I&#39;ve been bit by this one before (forgetting to rebuild everything when I change a preprocessor definition at the global scope).<br><br></div></div><br>-- <br>Philip Lowman<br>