Browse Source

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 <[email protected]>
Merge-request: !2001
Brad King 7 years ago
parent
commit
22e4837442
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Source/cmMakefile.cxx

+ 2 - 1
Source/cmMakefile.cxx

@@ -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