Commit ec3c968d authored by Sebastian Holtermann's avatar Sebastian Holtermann

cmake: Use scopes to limit temporary object lifetime

parent 1de0c827
...@@ -2430,20 +2430,22 @@ static bool cmakeCheckStampFile(const std::string& stampName) ...@@ -2430,20 +2430,22 @@ static bool cmakeCheckStampFile(const std::string& stampName)
} }
// Compare the stamp dependencies against the dependency file itself. // Compare the stamp dependencies against the dependency file itself.
cmFileTimeCache ftc; {
std::string dep; cmFileTimeCache ftc;
while (cmSystemTools::GetLineFromStream(fin, dep)) { std::string dep;
int result; while (cmSystemTools::GetLineFromStream(fin, dep)) {
if (!dep.empty() && dep[0] != '#' && int result;
(!ftc.Compare(stampDepends, dep, &result) || result < 0)) { if (!dep.empty() && dep[0] != '#' &&
// The stamp depends file is older than this dependency. The (!ftc.Compare(stampDepends, dep, &result) || result < 0)) {
// build system is really out of date. // The stamp depends file is older than this dependency. The
std::cout << "CMake is re-running because " << stampName // build system is really out of date.
<< " is out-of-date.\n"; std::cout << "CMake is re-running because " << stampName
std::cout << " the file '" << dep << "'\n"; << " is out-of-date.\n";
std::cout << " is newer than '" << stampDepends << "'\n"; std::cout << " the file '" << dep << "'\n";
std::cout << " result='" << result << "'\n"; std::cout << " is newer than '" << stampDepends << "'\n";
return false; std::cout << " result='" << result << "'\n";
return false;
}
} }
} }
......
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