diff options
author | Brad King <brad.king@kitware.com> | 2006-04-27 14:41:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-04-27 14:41:37 (GMT) |
commit | a275fefc857d95172778615866f6e21b92e6a594 (patch) | |
tree | 7f65c0a77643fc02abcf89ee47e850144e01e79a /Source/cmMakefileTargetGenerator.cxx | |
parent | b11d60c2e55315e1e32f136ca60d78c9802d0cb8 (diff) | |
download | CMake-a275fefc857d95172778615866f6e21b92e6a594.zip CMake-a275fefc857d95172778615866f6e21b92e6a594.tar.gz CMake-a275fefc857d95172778615866f6e21b92e6a594.tar.bz2 |
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.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index a73213a..bf8422a 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -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() << "\" " |