Commit a275fefc authored by Brad King's avatar Brad King
Browse files

BUG: Make sure each cmake_depends process uses the same SystemTools path...

BUG: Make sure each cmake_depends process uses the same SystemTools path translation table as the original process.  This addresses problems with dependency scanning when make is run from a symlink directory pointing at the original binary tree.
parent b11d60c2
......@@ -562,6 +562,17 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
cmOStringStream depCmd;
// TODO: Account for source file properties and directory-level
// definitions when scanning for dependencies.
#if !defined(_WIN32) || defined(__CYGWIN__)
// This platform supports symlinks, so cmSystemTools will translate
// paths. Make sure PWD is set to the original name of the home
// output directory to help cmSystemTools to create the same
// translation table for the dependency scanning process.
depCmd << "cd "
<< (this->LocalGenerator->Convert(
this->Makefile->GetHomeOutputDirectory(),
cmLocalGenerator::FULL, cmLocalGenerator::SHELL))
<< " && ";
#endif
depCmd << "$(CMAKE_COMMAND) -E cmake_depends "
<< " \""
<< this->GlobalGenerator->GetName() << "\" "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment