summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-03-14 16:40:24 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-03-18 14:09:11 (GMT)
commitec3c968de27d0d352dce53e3400a33b1bc576496 (patch)
tree839a4e04703781a2463b22413b177de84f9ec22e /Source/cmake.cxx
parent1de0c827a16e1ef5b4c6c900982c6a76061d2c97 (diff)
downloadCMake-ec3c968de27d0d352dce53e3400a33b1bc576496.zip
CMake-ec3c968de27d0d352dce53e3400a33b1bc576496.tar.gz
CMake-ec3c968de27d0d352dce53e3400a33b1bc576496.tar.bz2
cmake: Use scopes to limit temporary object lifetime
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx30
1 files changed, 16 insertions, 14 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index ff8dc43..e1b775e 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2430,20 +2430,22 @@ static bool cmakeCheckStampFile(const std::string& stampName)
}
// Compare the stamp dependencies against the dependency file itself.
- cmFileTimeCache ftc;
- std::string dep;
- while (cmSystemTools::GetLineFromStream(fin, dep)) {
- int result;
- if (!dep.empty() && dep[0] != '#' &&
- (!ftc.Compare(stampDepends, dep, &result) || result < 0)) {
- // The stamp depends file is older than this dependency. The
- // build system is really out of date.
- std::cout << "CMake is re-running because " << stampName
- << " is out-of-date.\n";
- std::cout << " the file '" << dep << "'\n";
- std::cout << " is newer than '" << stampDepends << "'\n";
- std::cout << " result='" << result << "'\n";
- return false;
+ {
+ cmFileTimeCache ftc;
+ std::string dep;
+ while (cmSystemTools::GetLineFromStream(fin, dep)) {
+ int result;
+ if (!dep.empty() && dep[0] != '#' &&
+ (!ftc.Compare(stampDepends, dep, &result) || result < 0)) {
+ // The stamp depends file is older than this dependency. The
+ // build system is really out of date.
+ std::cout << "CMake is re-running because " << stampName
+ << " is out-of-date.\n";
+ std::cout << " the file '" << dep << "'\n";
+ std::cout << " is newer than '" << stampDepends << "'\n";
+ std::cout << " result='" << result << "'\n";
+ return false;
+ }
}
}