Ok, Im already using the nightly build (from Tuesday I believe), as I discovered a bug in CMake yesterday.<div>I will bug M$ too :-)</div><div><br></div><div>/A<br><br><div class="gmail_quote">On Wed, Dec 29, 2010 at 1:03 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="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">For Visual Studio generators, CMake does *NO* depedency analysis. It<br>
generates solution and project files such that Visual Studio can do<br>
all the dependency analysis and decide what to re-build when files<br>
change.<br>
<br>
My advice to you would be:<br>
- use only CMake 2.8.3 or newer (a nightly development build of CMake)<br>
with Visual Studio 10 -- CMake 2.8.2 and earlier had significant bugs<br>
related to VS10 that have since been resolved...<br>
- using a newer CMake, isolate the problem to a minimally reproducible<br>
case and then report a bug in the bug tracker about it including the<br>
steps to reproduce the problem<br>
<br>
Reply here again and point us to the bug.<br>
<br>
<br>
HTH,<br>
David<br>
<div><div></div><div class="h5"><br>
<br>
On Wed, Dec 29, 2010 at 4:07 AM, Anders Backman &lt;<a href="mailto:andersb@cs.umu.se">andersb@cs.umu.se</a>&gt; wrote:<br>
&gt; Hi all.<br>
&gt; I have a problem where I have a project of C++ headers and source files<br>
&gt; which are built into a .lib .dll.<br>
&gt; Now this works just fine with CMake 2.8.x and VisualStudio 2008.<br>
&gt; I press F7 everything builds. I press F7 again, it is all built, nothing to<br>
&gt; be done.<br>
&gt; But now when I move over to vs2010, I get into problems where no matter how<br>
&gt; I build the project, it constantly want to rebuild everything.<br>
&gt; I have tried both &#39;msbuild project.sln&#39; from the command line, as well as<br>
&gt; build (F7) inside of VisualStudio  as well as using Incredibuild. The result<br>
&gt; is the same. If I press F7, it builds everything as it was not built before.<br>
&gt; I did some googling on the issue, and some suggest that there is a file in<br>
&gt; the project (header) which does not exist on disk, causing the problem.<br>
&gt; We do file(glob) on all files, so a file which is not found, should not be<br>
&gt; part of the project.<br>
&gt; Right now, it seems to be hard to reduce the problem. When I start from the<br>
&gt; full project, 107 files, it want to rebuild everything.<br>
&gt; When I reduce the problem, I can get down to one single file, still it wants<br>
&gt; to build it. Its a c file, and there is nothing special about it. I even<br>
&gt; managed to reduce that down to one function, no includes. still the same<br>
&gt; problem.<br>
&gt; If I copy the relevant files (a few cmakelists.txt and the directory<br>
&gt; structure, including the two files (.h .c) it builds as it should again.<br>
&gt; I tried to run cmake and generate vs2008 files, that works. Open them in<br>
&gt; vs2010, build, then that works (with the two files only).<br>
&gt;<br>
&gt; So anyway, before I put you all to sleep, as far as I know, there are two<br>
&gt; dependency parsers involved here:<br>
&gt; - CMake runs through source files and generates dependencies, right?<br>
&gt; - THen visual studio does the same (generating the External dependencies<br>
&gt; folder in the project). Now there is SOMETHING wrong in either one, or both<br>
&gt; or none related to VS2010.<br>
&gt; Does someone have any hints on how to debug this problem? I have spent<br>
&gt; substantial time, and I cant seem to get anywhere.<br>
&gt; I cant reduce it to something I can post on the list, as it just magically<br>
&gt; works when I want to rip it out.<br>
&gt; At one point, I had 3 cmakelists, each with about 3 lines. 2 source files<br>
&gt; (.h .c), I did clean on CMakeCache.txt between each cmake . run, loaded the<br>
&gt; project build and got the error. Fairly simple scene. But as soon as I try<br>
&gt; to move that to another dir, it fails.<br>
&gt; Thankful for any advice on the matter.<br>
&gt;<br>
&gt; --<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the CMake FAQ at:<br>
&gt; <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
&gt;<br>
</blockquote></div><br><br clear="all"><br>-- <br><br>
</div>