diff options
author | Brad King <brad.king@kitware.com> | 2003-07-08 17:27:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-07-08 17:27:34 (GMT) |
commit | 1a4ec91593b8133897c2741d6dd43b2216ebb590 (patch) | |
tree | c2885bd4eb18fada4cba5ecac1d0f6fe18799b00 /Source/cmMakefile.cxx | |
parent | b274069b933485139c2581d8ea5d572e60bd228f (diff) | |
download | CMake-1a4ec91593b8133897c2741d6dd43b2216ebb590.zip CMake-1a4ec91593b8133897c2741d6dd43b2216ebb590.tar.gz CMake-1a4ec91593b8133897c2741d6dd43b2216ebb590.tar.bz2 |
BUG#65: Fixed inheritance of CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 03db683..e963f9f 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -308,13 +308,15 @@ bool cmMakefile::ReadListFile(const char* filename_in, const char* external_in) std::string parentList = this->GetParentListFileName(filename); if (parentList != "") { - std::string srcdir = m_cmCurrentDirectory; - std::string bindir = m_CurrentOutputDirectory; + std::string srcdir = this->GetCurrentDirectory(); + std::string bindir = this->GetCurrentOutputDirectory(); std::string::size_type pos = parentList.rfind('/'); - m_cmCurrentDirectory = parentList.substr(0, pos); - m_CurrentOutputDirectory = m_HomeOutputDirectory + parentList.substr(m_cmHomeDirectory.size(), pos - m_cmHomeDirectory.size()); + this->SetCurrentDirectory(parentList.substr(0, pos).c_str()); + this->SetCurrentOutputDirectory((m_HomeOutputDirectory + + parentList.substr(m_cmHomeDirectory.size(), + pos - m_cmHomeDirectory.size())).c_str()); // if not found, oops if(pos == std::string::npos) @@ -325,8 +327,8 @@ bool cmMakefile::ReadListFile(const char* filename_in, const char* external_in) this->ReadListFile(parentList.c_str()); // restore the current directory - m_cmCurrentDirectory = srcdir; - m_CurrentOutputDirectory = bindir; + this->SetCurrentDirectory(srcdir.c_str()); + this->SetCurrentOutputDirectory(bindir.c_str()); } } |