MantisBT - CMake
View Issue Details
0010589CMakeCMakepublic2010-04-21 18:062010-07-13 09:21
Ben Medina 
 
normalmajoralways
closedfixed 
CMake-2-8 
 
0010589: Spurious re-running of CMake in VS2010 Qt-based projects
When building a Qt-based project using Visual Studio 2010, CMake will be re-run during the build, triggering a prompt to reload the solution. I've seen this in my own app, ParaView, and the QtTest sample from the CMake wiki.

To reproduce:
1. Download the QtTest app from here:
http://www.itk.org/Wiki/BundleUtilitiesExample [^]
2. Run CMake with the VS2010 generator. I'm using the CMake nightly from 04/20/2010.
3. Launch VS2010, and build the project.

Expected result:
Project builds without error. This is the case when the project is built with the VS2008 generator.

Actual result:
CMake is re-run during the build:

1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
1> Checking Build System
1> CMake does not need to re-run because CMakeFiles/generate.stamp is up-to-date.
2>------ Build started: Project: QtTest, Configuration: Debug Win32 ------
2> Generating moc_TestForm.cxx
2> Generating ui_TestForm.h
2> Building Custom Rule C:/Users/ben/Desktop/QtTest/CMakeLists.txt
2> CMake is re-running because C:\Program Files (x86)\CMake 2.9\CMakeFiles\generate.stamp dependency file is missing.
2> -- Configuring done
2> -- Generating done
2> -- Build files have been written to: C:/Users/ben/Desktop/QtTest/win32-vs2010
2> main.cpp
2> TestForm.cpp
2> moc_TestForm.cxx
2> Generating Code...

You'll be prompted to reload the solution, and then the build will complete successfully. Then, you'll be prompted to reload each project in the solution (and their filter files).
If you don't want to build Qt with VS2010, you can use the VS2008-built Qt. The problem occurs with either version.
No tags attached.
related to 0010481closed Bill Hoffman *.vcxproj.filters files for Visual Studio 2010 RC should only be modified / get new timestamp if content changes 
related to 0010502closed Brad King *.vcxproj files for Visual Studio 2010 RC should only be modified / get new timestamp if content changes 
Issue History
2010-04-21 18:06Ben MedinaNew Issue
2010-04-22 04:22Rolf Eike BeerNote Added: 0020344
2010-04-22 12:48Ben MedinaNote Added: 0020352
2010-05-14 18:21David ColeRelationship addedrelated to 0010481
2010-05-14 18:22David ColeRelationship addedrelated to 0010502
2010-06-12 08:34alexkNote Added: 0020997
2010-06-30 15:50Ben MedinaNote Added: 0021203
2010-07-13 09:21Bill HoffmanStatusnew => closed
2010-07-13 09:21Bill HoffmanResolutionopen => fixed

Notes
(0020344)
Rolf Eike Beer   
2010-04-22 04:22   
Very likely a duplicate of 10481 or 10502.
(0020352)
Ben Medina   
2010-04-22 12:48   
I don't think it's a duplicate. Those are bugs about unnecessary overwriting of vcxproj and vcxproj.filters files. This bug is about CMake unnecessarily re-running in the middle of the build.

Of course, this bug will trigger the other two bugs, making the whole process very painful.
(0020997)
alexk   
2010-06-12 08:34   
I am experiencing the same thing but with VS 2008:

I get a

Building Custom [...]/CMakeLists.txt
9>CMake is re-running because CMakeFiles/generate.stamp dependency file is missing.

Message for any of the >20 Projects in my solution followed by a prompt to reload the complete solution.

There is a generate.stamp and a generate.stamp.depend file however located at ${CMAKE_BINARY_DIR}/CMakeFiles

I'm not sure if this is really a bug but this is the only documentation of the issue I've found on the net. Any workaround (e.g. specify the location of generate.* somewhere) would be much apprechiated.

Thanks

Alex
(0021203)
Ben Medina   
2010-06-30 15:50   
Confirmed fixed in 2.8.2.