mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-04 04:03:22 +03:00
Fix CMAKE_DISABLE_SOURCE_CHANGES recognition of top of build tree
The change in commit v3.11.0-rc1~480^2 (UseJava: add_jar OUTPUT_DIR
option used only for jar generation, 2017-10-12) added code of the form
`file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR})`. This exposed an existing
bug in `CMAKE_DISABLE_SOURCE_CHANGES` in which it does not recognize
that the top of the build tree itself is in the build tree. Fix that
now.
Fixes: #17933
This commit is contained in:
1 parent
fbe6cd1596
commit
60cb75e4a1
1 file changed
+2
-1
@@ -2304,7 +2304,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
|
||||
|
||||
Reference in new issue
Block a user