From 053519b390ced4e2ed702f00a00d23ad344a3da3 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 4 Sep 2009 12:38:15 -0400 Subject: [PATCH] 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. --- Source/cmake.cxx | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 5c6a7c6db..7866fb20d 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -3880,17 +3880,6 @@ int cmake::GetSystemInformation(std::vector& args) //---------------------------------------------------------------------------- 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 // conjunction with cmLocalVisualStudio7Generator to avoid