cmLocalUnixMakefileGenerator3: Move local strings into local brace scopes

This commit is contained in:
Sebastian Holtermann 2019-03-11 20:19:31 +01:00
parent 06a59f1bda
commit addd1ce402

View File

@ -1292,10 +1292,10 @@ bool cmLocalUnixMakefileGenerator3::UpdateDependencies(
// If the directory information is newer than depend.internal, include dirs // If the directory information is newer than depend.internal, include dirs
// may have changed. In this case discard all old dependencies. // may have changed. In this case discard all old dependencies.
bool needRescanDirInfo = false; bool needRescanDirInfo = false;
std::string dirInfoFile = this->GetCurrentBinaryDirectory();
dirInfoFile += "/CMakeFiles";
dirInfoFile += "/CMakeDirectoryInformation.cmake";
{ {
std::string dirInfoFile = this->GetCurrentBinaryDirectory();
dirInfoFile += "/CMakeFiles";
dirInfoFile += "/CMakeDirectoryInformation.cmake";
int result; int result;
if (!ftc->FileTimeCompare(internalDependFile, dirInfoFile, &result) || if (!ftc->FileTimeCompare(internalDependFile, dirInfoFile, &result) ||
result < 0) { result < 0) {
@ -1357,11 +1357,14 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies(
// Read the directory information file. // Read the directory information file.
cmMakefile* mf = this->Makefile; cmMakefile* mf = this->Makefile;
bool haveDirectoryInfo = false; bool haveDirectoryInfo = false;
std::string dirInfoFile = this->GetCurrentBinaryDirectory(); {
dirInfoFile += "/CMakeFiles"; std::string dirInfoFile = this->GetCurrentBinaryDirectory();
dirInfoFile += "/CMakeDirectoryInformation.cmake"; dirInfoFile += "/CMakeFiles";
if (mf->ReadListFile(dirInfoFile) && !cmSystemTools::GetErrorOccuredFlag()) { dirInfoFile += "/CMakeDirectoryInformation.cmake";
haveDirectoryInfo = true; if (mf->ReadListFile(dirInfoFile) &&
!cmSystemTools::GetErrorOccuredFlag()) {
haveDirectoryInfo = true;
}
} }
// Lookup useful directory information. // Lookup useful directory information.