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. --- Source/cmGlobalNinjaGenerator.cxx | 22 ++++++---------------- 1 file 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) -- 1.9.3 (Apple Git-50) -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers