diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-07-20 15:07:37 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-07-20 15:07:37 (GMT) |
commit | 42ea896d22cb2f04b08546918521fe7972a6174b (patch) | |
tree | 7f53039a37b5e70c75a8c1629e277d8ae641f020 /Source/cmMakefile.cxx | |
parent | 2474302c254f76d65e8ec3845023d1ba5c7f7497 (diff) | |
download | CMake-42ea896d22cb2f04b08546918521fe7972a6174b.zip CMake-42ea896d22cb2f04b08546918521fe7972a6174b.tar.gz CMake-42ea896d22cb2f04b08546918521fe7972a6174b.tar.bz2 |
ENH: When running cmake with PreLoad make sure CMAKE_CURRENT_SOURCE/BINARY_DIR works
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 46204b0..265c0b0 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1735,6 +1735,10 @@ void cmMakefile::SetHomeDirectory(const char* dir) m_cmHomeDirectory = dir; cmSystemTools::ConvertToUnixSlashes(m_cmHomeDirectory); this->AddDefinition("CMAKE_SOURCE_DIR", this->GetHomeDirectory()); + if ( !this->GetDefinition("CMAKE_CURRENT_SOURCE_DIR") ) + { + this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", this->GetHomeDirectory()); + } } void cmMakefile::SetHomeOutputDirectory(const char* lib) @@ -1742,6 +1746,10 @@ void cmMakefile::SetHomeOutputDirectory(const char* lib) m_HomeOutputDirectory = lib; cmSystemTools::ConvertToUnixSlashes(m_HomeOutputDirectory); this->AddDefinition("CMAKE_BINARY_DIR", this->GetHomeOutputDirectory()); + if ( !this->GetDefinition("CMAKE_CURRENT_BINARY_DIR") ) + { + this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", this->GetHomeOutputDirectory()); + } } |