diff options
author | Marc Chevrier <marc.chevrier@sap.com> | 2018-04-24 12:16:20 +0200 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-04-24 10:42:00 -0400 |
commit | 60cb75e4a196c97e55d535486e2d28630afb3f6e (patch) | |
tree | b48df5c463a1c8f7662faf39e8c67ee5eee51e95 /Source | |
parent | fbe6cd1596bf280edd49aeb8f981f99d7cd8beb3 (diff) | |
download | cmake-60cb75e4a196c97e55d535486e2d28630afb3f6e.tar.gz |
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
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 71359a2710..604ca2ca5f 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -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 |