summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-04-16 20:18:04 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-04-20 22:12:51 (GMT)
commit1ea085d1b62f02d4e556ce1fabb0589e30108e20 (patch)
treeb1c52adbc110c5784822bf7adaf47fd4912e8dde /Source/cmMakefile.cxx
parentf034bb2f54f784461ed1adea8f0554d49ff5b0b3 (diff)
downloadCMake-1ea085d1b62f02d4e556ce1fabb0589e30108e20.zip
CMake-1ea085d1b62f02d4e556ce1fabb0589e30108e20.tar.gz
CMake-1ea085d1b62f02d4e556ce1fabb0589e30108e20.tar.bz2
cmMakefile: Initialize dir definitions early.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 6c2b8b2..23c2e48 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1543,6 +1543,11 @@ void cmMakefile::InitializeFromParent()
// Initialize definitions with the closure of the parent scope.
this->Internal->VarStack.top() = parent->Internal->VarStack.top().Closure();
+ this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR",
+ this->cmStartDirectory.c_str());
+ this->AddDefinition("CMAKE_CURRENT_BINARY_DIR",
+ this->StartOutputDirectory.c_str());
+
const std::vector<cmValueWithOrigin>& parentIncludes =
parent->GetIncludeDirectoriesEntries();
this->IncludeDirectoriesEntries.insert(this->IncludeDirectoriesEntries.end(),
@@ -1611,7 +1616,6 @@ void cmMakefile::InitializeFromParent()
void cmMakefile::ConfigureSubDirectory(cmLocalGenerator *lg2)
{
lg2->GetMakefile()->InitializeFromParent();
- lg2->GetMakefile()->MakeStartDirectoriesCurrent();
if (this->GetCMakeInstance()->GetDebugOutput())
{
std::string msg=" Entering ";