Eh?<div><br></div><div>The files looks ok to me (in Sweden :-)</div><div>We are ahead of US (in time also :-) , but that shouldn&#39;t matter in this case.</div><div><br></div><div>I unpacked the file, looked at the dates, and they are all from today around noon (11:54).</div>

<div><br></div><div>Which means either you have to wait until after 11:54 or you have to touch the files...</div><div>I can certainly touch and make a double check...</div><div><br></div><div>Ok. touched all files, ran cmake . and then:</div>

<div><br></div><div>cmake --build . --config Release</div><div><br></div><div>Everything is built for each time I execute the above command. So problem resists.</div><div><br></div><div><br></div><div>/A</div><div><br><div class="gmail_quote">

On Thu, Dec 30, 2010 at 3:29 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;">

The rar file you have pointed us to, when extracted, yields &quot;modified<br>
time&quot; stamps on the source files in the future. No matter how many<br>
times you rebuild such a project, you will always get rebuild problems<br>
with systems that base &quot;modified-ness&quot; on time stamps. Visual Studio /<br>
msbuild is such a system (as are most makes).<br>
<br>
The question is: why *doesn&#39;t* this happen with VS 2008 on the same<br>
source tree? It should... The CMakeLists.txt file is in the future as<br>
are most of the referenced c++ source files.<br>
<br>
Where did these source files from the future come from? (A colleague<br>
in another time zone, a computer with a clock problem, or did you do<br>
this on your laptop in another time zone and then adjust the time<br>
later and then try the build (travelling lately? :-) ... ) ??<br>
<br>
Please fix up the mod times, try again, and let us know if you still<br>
have problems.<br>
<br>
<br>
Also, just as an FYI, here&#39;s the reply I was working on before I<br>
discovered the time stamp madness:<br>
<br>
You can use:<br>
cmake --build . --config Release<br>
<br>
to build a CMake-based project via the command line regardless of the<br>
underlying native build system. And when you do, it will generate the<br>
&quot;correct&quot; call to that underlying native build system, whether it be<br>
make, devenv, msbuild or xcode.<br>
<br>
In the Visual Studio 10 case, the CMakeCache should have something<br>
like this defined:<br>
MAKECOMMAND:STRING=C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe<br>
ALL_BUILD.vcxproj /p:Configuration=${CTEST_CONFIGURATION_TYPE}<br>
<br>
In which case, that is the command line executed by a call to &quot;cmake --build&quot;<br>
<br>
MSBuild does not need the sln file, it can build the whole project<br>
based on ALL_BUILD.vcxproj and the other vcxproj files that it<br>
references. The sln file is only needed by Visual Studio.<br>
<br>
<br>
HTH,<br>
<font color="#888888">David<br>
</font><div><div></div><div class="h5"><br>
<br>
On Thu, Dec 30, 2010 at 6:06 AM, Anders Backman &lt;<a href="mailto:andersb@cs.umu.se">andersb@cs.umu.se</a>&gt; wrote:<br>
&gt; I think I managed to reproduce the problem, partially.<br>
&gt; The file below contains a project which for me reproduces the problem when I<br>
&gt; use msbuild.<br>
&gt; F7 (Build-&gt;BuildSolution) works (builds only once, then next time, it does<br>
&gt; nothing).<br>
&gt; So there is something in the combination of CMake and msbuild which causes<br>
&gt; the problem.<br>
&gt; We use Incredibuild, which uses msbuild, hence we get the problem also in<br>
&gt; Incredibuild.<br>
&gt; I do not know the difference between F7 and msbuild though.<br>
&gt; <a href="http://rapidshare.com/files/439941435/DependencyBug.rar" target="_blank">http://rapidshare.com/files/439941435/DependencyBug.rar</a><br>
&gt; Instructions:<br>
&gt; 1. Unpack dep2.rar into a new empty directory<br>
&gt; 2. install CMake (2.8.2 or later)<br>
&gt; <a href="http://www.cmake.org/files/v2.8/cmake-2.8.3-win32-x86.exe" target="_blank">http://www.cmake.org/files/v2.8/cmake-2.8.3-win32-x86.exe</a><br>
&gt; 3 go to the directory in a command prompt<br>
&gt; 4. execute: cmake .<br>
&gt; 5. msbuild DepBug.sln<br>
&gt; 6. msbuild DepBug.sln &lt;&lt; Builds everything again from scratch.<br>
&gt;<br>
&gt; /A<br>
&gt; On Wed, Dec 29, 2010 at 1:26 PM, Anders Backman &lt;<a href="mailto:andersb@cs.umu.se">andersb@cs.umu.se</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Ok, Im already using the nightly build (from Tuesday I believe), as I<br>
&gt;&gt; discovered a bug in CMake yesterday.<br>
&gt;&gt; I will bug M$ too :-)<br>
&gt;&gt; /A<br>
&gt;&gt;<br>
&gt;&gt; On Wed, Dec 29, 2010 at 1:03 PM, David Cole &lt;<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; For Visual Studio generators, CMake does *NO* depedency analysis. It<br>
&gt;&gt;&gt; generates solution and project files such that Visual Studio can do<br>
&gt;&gt;&gt; all the dependency analysis and decide what to re-build when files<br>
&gt;&gt;&gt; change.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; My advice to you would be:<br>
&gt;&gt;&gt; - use only CMake 2.8.3 or newer (a nightly development build of CMake)<br>
&gt;&gt;&gt; with Visual Studio 10 -- CMake 2.8.2 and earlier had significant bugs<br>
&gt;&gt;&gt; related to VS10 that have since been resolved...<br>
&gt;&gt;&gt; - using a newer CMake, isolate the problem to a minimally reproducible<br>
&gt;&gt;&gt; case and then report a bug in the bug tracker about it including the<br>
&gt;&gt;&gt; steps to reproduce the problem<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Reply here again and point us to the bug.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; HTH,<br>
&gt;&gt;&gt; David<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; 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;<br>
&gt;&gt;&gt; wrote:<br>
&gt;&gt;&gt; &gt; Hi all.<br>
&gt;&gt;&gt; &gt; I have a problem where I have a project of C++ headers and source files<br>
&gt;&gt;&gt; &gt; which are built into a .lib .dll.<br>
&gt;&gt;&gt; &gt; Now this works just fine with CMake 2.8.x and VisualStudio 2008.<br>
&gt;&gt;&gt; &gt; I press F7 everything builds. I press F7 again, it is all built,<br>
&gt;&gt;&gt; &gt; nothing to<br>
&gt;&gt;&gt; &gt; be done.<br>
&gt;&gt;&gt; &gt; But now when I move over to vs2010, I get into problems where no matter<br>
&gt;&gt;&gt; &gt; how<br>
&gt;&gt;&gt; &gt; I build the project, it constantly want to rebuild everything.<br>
&gt;&gt;&gt; &gt; I have tried both &#39;msbuild project.sln&#39; from the command line, as well<br>
&gt;&gt;&gt; &gt; as<br>
&gt;&gt;&gt; &gt; build (F7) inside of VisualStudio  as well as using Incredibuild. The<br>
&gt;&gt;&gt; &gt; result<br>
&gt;&gt;&gt; &gt; is the same. If I press F7, it builds everything as it was not built<br>
&gt;&gt;&gt; &gt; before.<br>
&gt;&gt;&gt; &gt; I did some googling on the issue, and some suggest that there is a file<br>
&gt;&gt;&gt; &gt; in<br>
&gt;&gt;&gt; &gt; the project (header) which does not exist on disk, causing the problem.<br>
&gt;&gt;&gt; &gt; We do file(glob) on all files, so a file which is not found, should not<br>
&gt;&gt;&gt; &gt; be<br>
&gt;&gt;&gt; &gt; part of the project.<br>
&gt;&gt;&gt; &gt; Right now, it seems to be hard to reduce the problem. When I start from<br>
&gt;&gt;&gt; &gt; the<br>
&gt;&gt;&gt; &gt; full project, 107 files, it want to rebuild everything.<br>
&gt;&gt;&gt; &gt; When I reduce the problem, I can get down to one single file, still it<br>
&gt;&gt;&gt; &gt; wants<br>
&gt;&gt;&gt; &gt; to build it. Its a c file, and there is nothing special about it. I<br>
&gt;&gt;&gt; &gt; even<br>
&gt;&gt;&gt; &gt; managed to reduce that down to one function, no includes. still the<br>
&gt;&gt;&gt; &gt; same<br>
&gt;&gt;&gt; &gt; problem.<br>
&gt;&gt;&gt; &gt; If I copy the relevant files (a few cmakelists.txt and the directory<br>
&gt;&gt;&gt; &gt; structure, including the two files (.h .c) it builds as it should<br>
&gt;&gt;&gt; &gt; again.<br>
&gt;&gt;&gt; &gt; I tried to run cmake and generate vs2008 files, that works. Open them<br>
&gt;&gt;&gt; &gt; in<br>
&gt;&gt;&gt; &gt; vs2010, build, then that works (with the two files only).<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; So anyway, before I put you all to sleep, as far as I know, there are<br>
&gt;&gt;&gt; &gt; two<br>
&gt;&gt;&gt; &gt; dependency parsers involved here:<br>
&gt;&gt;&gt; &gt; - CMake runs through source files and generates dependencies, right?<br>
&gt;&gt;&gt; &gt; - THen visual studio does the same (generating the External<br>
&gt;&gt;&gt; &gt; dependencies<br>
&gt;&gt;&gt; &gt; folder in the project). Now there is SOMETHING wrong in either one, or<br>
&gt;&gt;&gt; &gt; both<br>
&gt;&gt;&gt; &gt; or none related to VS2010.<br>
&gt;&gt;&gt; &gt; Does someone have any hints on how to debug this problem? I have spent<br>
&gt;&gt;&gt; &gt; substantial time, and I cant seem to get anywhere.<br>
&gt;&gt;&gt; &gt; I cant reduce it to something I can post on the list, as it just<br>
&gt;&gt;&gt; &gt; magically<br>
&gt;&gt;&gt; &gt; works when I want to rip it out.<br>
&gt;&gt;&gt; &gt; At one point, I had 3 cmakelists, each with about 3 lines. 2 source<br>
&gt;&gt;&gt; &gt; files<br>
&gt;&gt;&gt; &gt; (.h .c), I did clean on CMakeCache.txt between each cmake . run, loaded<br>
&gt;&gt;&gt; &gt; the<br>
&gt;&gt;&gt; &gt; project build and got the error. Fairly simple scene. But as soon as I<br>
&gt;&gt;&gt; &gt; try<br>
&gt;&gt;&gt; &gt; to move that to another dir, it fails.<br>
&gt;&gt;&gt; &gt; Thankful for any advice on the matter.<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; --<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt;&gt; &gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Visit other Kitware open-source projects at<br>
&gt;&gt;&gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Please keep messages on-topic and check the CMake FAQ at:<br>
&gt;&gt;&gt; &gt; <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt;&gt; &gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; __________________________________________<br>
&gt; Anders Backman, CTO  Algoryx Simulation AB<br>
&gt; Uminova Science Park, Box 7973,  SE-907 19<br>
&gt; Umeå,  Sweden<br>
&gt; <a href="mailto:anders@algoryx.se">anders@algoryx.se</a> <a href="http://www.algoryx.se" target="_blank">http://www.algoryx.se</a><br>
&gt; Cell: +46-70-392 64 67<br>
&gt;<br>
&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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>__________________________________________<br>Anders Backman, CTO  Algoryx Simulation AB<br>Uminova Science Park, Box 7973,  SE-907 19 <br>Umeå,  Sweden<br><a href="mailto:anders@algoryx.se">anders@algoryx.se</a> <a href="http://www.algoryx.se">http://www.algoryx.se</a> <br>

Cell: +46-70-392 64 67<br>
</div>