summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-13 18:42:16 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-05-14 18:57:21 (GMT)
commit894961af16c83beb785b3d0fa7d1e6b80946eaac (patch)
tree5d451d1266a54041f2a7679f430e7c0baf5a8a85 /Source
parent115e9199822a6c9395cc3bb55c57e061b5fc6315 (diff)
downloadCMake-894961af16c83beb785b3d0fa7d1e6b80946eaac.zip
CMake-894961af16c83beb785b3d0fa7d1e6b80946eaac.tar.gz
CMake-894961af16c83beb785b3d0fa7d1e6b80946eaac.tar.bz2
cmMakefile: Use the state to determine the parent directory.
Do not depend on the local generator for that.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakefile.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 1a6d123..48a9b92 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4117,11 +4117,12 @@ const char *cmMakefile::GetProperty(const std::string& prop,
output = "";
if (prop == "PARENT_DIRECTORY")
{
- if(cmLocalGenerator* plg = this->LocalGenerator->GetParent())
+ cmState::Snapshot parent = this->StateSnapshot.GetParent();
+ if(parent.IsValid())
{
- output = plg->GetMakefile()->GetCurrentSourceDirectory();
+ return parent.GetCurrentSourceDirectory();
}
- return output.c_str();
+ return "";
}
else if (prop == "INCLUDE_REGULAR_EXPRESSION" )
{