Merge topic 'fix-CMAKE_DISABLE_SOURCE_CHANGES-top-dir'

60cb75e4a1 Fix CMAKE_DISABLE_SOURCE_CHANGES recognition of top of build tree

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2001
This commit is contained in:
Brad King
2018-04-25 12:57:01 +00:00
committed by Kitware Robot

View File

@@ -2333,7 +2333,8 @@ bool cmMakefile::CanIWriteThisFile(std::string const& fileName) const
}
return !cmSystemTools::IsSubDirectory(fileName, this->GetHomeDirectory()) ||
cmSystemTools::IsSubDirectory(fileName, this->GetHomeOutputDirectory());
cmSystemTools::IsSubDirectory(fileName, this->GetHomeOutputDirectory()) ||
cmSystemTools::SameFile(fileName, this->GetHomeOutputDirectory());
}
const char* cmMakefile::GetRequiredDefinition(const std::string& name) const