From d7cbf3e1d6c3753b4d05cf43e0d9978ad154f5ff Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Wed, 25 May 2005 12:22:32 -0400 Subject: BUG: a fix for constant recomputing of depends --- Source/cmDepends.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Source/cmDepends.cxx') diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx index 9544662792..165eee0b21 100644 --- a/Source/cmDepends.cxx +++ b/Source/cmDepends.cxx @@ -48,6 +48,11 @@ void cmDepends::SetTargetFile(const char* dir, const char* targetFile, m_DependsMarkFile += m_TargetFile; m_DependsMakeFile += makeExt; m_DependsMarkFile += markExt; + + if (!m_CompileDirectory.size()) + { + m_CompileDirectory = dir; + } } @@ -79,12 +84,12 @@ void cmDepends::Check() { // Dependency checks must be done in proper working directory. std::string oldcwd = "."; - if(m_Directory != ".") + if(m_CompileDirectory != ".") { // Get the CWD but do not call CollapseFullPath because // we only need it to cd back, and the form does not matter oldcwd = cmSystemTools::GetCurrentWorkingDirectory(false); - cmSystemTools::ChangeDirectory(m_Directory.c_str()); + cmSystemTools::ChangeDirectory(m_CompileDirectory.c_str()); } // Check whether dependencies must be regenerated. -- cgit v1.2.1