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'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"><<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>></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 "modified<br>
time" 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 "modified-ness" on time stamps. Visual Studio /<br>
msbuild is such a system (as are most makes).<br>
<br>
The question is: why *doesn'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'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>
"correct" 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 "cmake --build"<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 <<a href="mailto:andersb@cs.umu.se">andersb@cs.umu.se</a>> wrote:<br>
> I think I managed to reproduce the problem, partially.<br>
> The file below contains a project which for me reproduces the problem when I<br>
> use msbuild.<br>
> F7 (Build->BuildSolution) works (builds only once, then next time, it does<br>
> nothing).<br>
> So there is something in the combination of CMake and msbuild which causes<br>
> the problem.<br>
> We use Incredibuild, which uses msbuild, hence we get the problem also in<br>
> Incredibuild.<br>
> I do not know the difference between F7 and msbuild though.<br>
> <a href="http://rapidshare.com/files/439941435/DependencyBug.rar" target="_blank">http://rapidshare.com/files/439941435/DependencyBug.rar</a><br>
> Instructions:<br>
> 1. Unpack dep2.rar into a new empty directory<br>
> 2. install CMake (2.8.2 or later)<br>
> <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>
> 3 go to the directory in a command prompt<br>
> 4. execute: cmake .<br>
> 5. msbuild DepBug.sln<br>
> 6. msbuild DepBug.sln << Builds everything again from scratch.<br>
><br>
> /A<br>
> On Wed, Dec 29, 2010 at 1:26 PM, Anders Backman <<a href="mailto:andersb@cs.umu.se">andersb@cs.umu.se</a>> wrote:<br>
>><br>
>> Ok, Im already using the nightly build (from Tuesday I believe), as I<br>
>> discovered a bug in CMake yesterday.<br>
>> I will bug M$ too :-)<br>
>> /A<br>
>><br>
>> On Wed, Dec 29, 2010 at 1:03 PM, David Cole <<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>><br>
>> wrote:<br>
>>><br>
>>> 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>
>>><br>
>>><br>
>>> On Wed, Dec 29, 2010 at 4:07 AM, Anders Backman <<a href="mailto:andersb@cs.umu.se">andersb@cs.umu.se</a>><br>
>>> wrote:<br>
>>> > Hi all.<br>
>>> > I have a problem where I have a project of C++ headers and source files<br>
>>> > which are built into a .lib .dll.<br>
>>> > Now this works just fine with CMake 2.8.x and VisualStudio 2008.<br>
>>> > I press F7 everything builds. I press F7 again, it is all built,<br>
>>> > nothing to<br>
>>> > be done.<br>
>>> > But now when I move over to vs2010, I get into problems where no matter<br>
>>> > how<br>
>>> > I build the project, it constantly want to rebuild everything.<br>
>>> > I have tried both 'msbuild project.sln' from the command line, as well<br>
>>> > as<br>
>>> > build (F7) inside of VisualStudio as well as using Incredibuild. The<br>
>>> > result<br>
>>> > is the same. If I press F7, it builds everything as it was not built<br>
>>> > before.<br>
>>> > I did some googling on the issue, and some suggest that there is a file<br>
>>> > in<br>
>>> > the project (header) which does not exist on disk, causing the problem.<br>
>>> > We do file(glob) on all files, so a file which is not found, should not<br>
>>> > be<br>
>>> > part of the project.<br>
>>> > Right now, it seems to be hard to reduce the problem. When I start from<br>
>>> > the<br>
>>> > full project, 107 files, it want to rebuild everything.<br>
>>> > When I reduce the problem, I can get down to one single file, still it<br>
>>> > wants<br>
>>> > to build it. Its a c file, and there is nothing special about it. I<br>
>>> > even<br>
>>> > managed to reduce that down to one function, no includes. still the<br>
>>> > same<br>
>>> > problem.<br>
>>> > If I copy the relevant files (a few cmakelists.txt and the directory<br>
>>> > structure, including the two files (.h .c) it builds as it should<br>
>>> > again.<br>
>>> > I tried to run cmake and generate vs2008 files, that works. Open them<br>
>>> > in<br>
>>> > vs2010, build, then that works (with the two files only).<br>
>>> ><br>
>>> > So anyway, before I put you all to sleep, as far as I know, there are<br>
>>> > two<br>
>>> > dependency parsers involved here:<br>
>>> > - CMake runs through source files and generates dependencies, right?<br>
>>> > - THen visual studio does the same (generating the External<br>
>>> > dependencies<br>
>>> > folder in the project). Now there is SOMETHING wrong in either one, or<br>
>>> > both<br>
>>> > or none related to VS2010.<br>
>>> > Does someone have any hints on how to debug this problem? I have spent<br>
>>> > substantial time, and I cant seem to get anywhere.<br>
>>> > I cant reduce it to something I can post on the list, as it just<br>
>>> > magically<br>
>>> > works when I want to rip it out.<br>
>>> > At one point, I had 3 cmakelists, each with about 3 lines. 2 source<br>
>>> > files<br>
>>> > (.h .c), I did clean on CMakeCache.txt between each cmake . run, loaded<br>
>>> > the<br>
>>> > project build and got the error. Fairly simple scene. But as soon as I<br>
>>> > try<br>
>>> > to move that to another dir, it fails.<br>
>>> > Thankful for any advice on the matter.<br>
>>> ><br>
>>> > --<br>
>>> ><br>
>>> ><br>
>>> > _______________________________________________<br>
>>> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>> ><br>
>>> > Visit other Kitware open-source projects at<br>
>>> > <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:<br>
>>> > <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>
>>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>><br>
><br>
><br>
><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" target="_blank">http://www.algoryx.se</a><br>
> Cell: +46-70-392 64 67<br>
><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <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:<br>
> <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>
><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>