diff options
author | Adam Strzelecki <ono@java.pl> | 2014-06-27 20:13:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-06-30 13:33:37 (GMT) |
commit | 7243c95129fd8cd0d01495d33848663c796f91db (patch) | |
tree | 6c63d62a25012f73065f86c51e53c139742c9138 /Source/cmGlobalNinjaGenerator.cxx | |
parent | a33cf6d08853ea4c79324bdd36c04f311a23f20a (diff) | |
download | CMake-7243c95129fd8cd0d01495d33848663c796f91db.zip CMake-7243c95129fd8cd0d01495d33848663c796f91db.tar.gz CMake-7243c95129fd8cd0d01495d33848663c796f91db.tar.bz2 |
Ninja: Don't limit custom cmd side-effects to build folder (#14972)
Actually custom command can write wherever it wants to, such as temporary
folder or source folder, possibly violating rules that only build folder should
be affected. Therefore we should consider custom command dependency at any path
as possible side effect adding phony rule.
We avoid adding phony rules for regular source files (since the paraent
commit) so we no longer need the in-build-tree test to avoid them.
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index eb01654..09ee128 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -1033,27 +1033,17 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os) std::back_inserter(unkownExplicitDepends)); - std::string const rootBuildDirectory = - this->GetCMakeInstance()->GetHomeOutputDirectory(); for (std::vector<std::string>::const_iterator i = unkownExplicitDepends.begin(); i != unkownExplicitDepends.end(); ++i) { - //verify the file is in the build directory - std::string const absDepPath = cmSystemTools::CollapseFullPath( - i->c_str(), rootBuildDirectory.c_str()); - bool const inBuildDir = cmSystemTools::IsSubDirectory(absDepPath.c_str(), - rootBuildDirectory.c_str()); - if(inBuildDir) - { - cmNinjaDeps deps(1,*i); - this->WritePhonyBuild(os, - "", - deps, - deps); - } - } + cmNinjaDeps deps(1,*i); + this->WritePhonyBuild(os, + "", + deps, + deps); + } } void cmGlobalNinjaGenerator::WriteBuiltinTargets(std::ostream& os) |