Commit 053519b3 authored by Brad King's avatar Brad King
Browse files

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.
parent 524bb1e3
......@@ -3880,17 +3880,6 @@ int cmake::GetSystemInformation(std::vector<std::string>& args)
static bool cmakeCheckStampFile(const char* stampName)
// If the stamp file still exists then it must really be out of
// date.
// 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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment