summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-13 19:52:33 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-13 22:16:07 (GMT)
commit2c219bafc045dfdf49529b8ad141fed3dbb4d8e9 (patch)
tree88438e304e55c8b3540f23940e95e3019326b3fe /Source/cmake.cxx
parent84e0776e77e625ab43c1a5b2031a06a035ae0210 (diff)
downloadCMake-2c219bafc045dfdf49529b8ad141fed3dbb4d8e9.zip
CMake-2c219bafc045dfdf49529b8ad141fed3dbb4d8e9.tar.gz
CMake-2c219bafc045dfdf49529b8ad141fed3dbb4d8e9.tar.bz2
cmState: Initialize top level source directories immediately.
Don't leave this as cmMakefile responsibility.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 6846f1b..2ecd3d1 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -980,6 +980,10 @@ cmGlobalGenerator* cmake::CreateGlobalGenerator(const std::string& gname)
void cmake::SetHomeDirectory(const std::string& dir)
{
this->State->SetSourceDirectory(dir);
+ if (this->CurrentSnapshot.IsValid())
+ {
+ this->CurrentSnapshot.SetDefinition("CMAKE_SOURCE_DIR", dir);
+ }
}
const char* cmake::GetHomeDirectory() const
@@ -990,6 +994,10 @@ const char* cmake::GetHomeDirectory() const
void cmake::SetHomeOutputDirectory(const std::string& dir)
{
this->State->SetBinaryDirectory(dir);
+ if (this->CurrentSnapshot.IsValid())
+ {
+ this->CurrentSnapshot.SetDefinition("CMAKE_BINARY_DIR", dir);
+ }
}
const char* cmake::GetHomeOutputDirectory() const