[Cmake-commits] [cmake-commits] king committed cmake.cxx 1.424 1.425

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Sep 4 12:38:18 EDT 2009


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv29261/Source

Modified Files:
	cmake.cxx 
Log Message:
Simplify VS CMake re-run check

When CMake is invoked by the VS IDE re-run rule we compute whether or
not CMake really needs to re-run based on some timestamp helper files.
Previously we assumed that if the main generate.stamp file exists then
VS has correctly detected that the file is out of date.  However, this
assumption is too aggressive and re-runs CMake unnecessarily sometimes.

This commit removes the assumption and always checks timestamps itself.
The change breaks the explicit user re-run request (R-click -> Compile)
but only in cases when the build system is already up to date.


Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.424
retrieving revision 1.425
diff -C 2 -d -r1.424 -r1.425
*** cmake.cxx	3 Sep 2009 21:01:05 -0000	1.424
--- cmake.cxx	4 Sep 2009 16:38:15 -0000	1.425
***************
*** 3881,3895 ****
  static bool cmakeCheckStampFile(const char* stampName)
  {
-   // If the stamp file still exists then it must really be out of
-   // date.
-   if(cmSystemTools::FileExists(stampName))
-     {
-     // Notify the user why CMake is re-running.  It is safe to
-     // just print to stdout here because this code is only reachable
-     // through an undocumented flag used by the VS generator.
-     std::cout << "CMake is re-running because build system is out-of-date.\n";
-     return false;
-     }
- 
    // The stamp file does not exist.  Use the stamp dependencies to
    // determine whether it is really out of date.  This works in
--- 3881,3884 ----



More information about the Cmake-commits mailing list