summaryrefslogtreecommitdiff
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-10-13 00:18:26 +0200
committerStephen Kelly <steveire@gmail.com>2016-10-16 13:57:53 +0200
commitcef59bb8bac6b6d38025cc492235953c5ff7654b (patch)
treea3ebc25c5a0ab39090c1f80a57aa941dd93b254a /Source/cmTarget.cxx
parent0d57b07ad99cefc5df9e65d6c14aeaddf5d64b88 (diff)
downloadcmake-cef59bb8bac6b6d38025cc492235953c5ff7654b.tar.gz
cmTarget: Implement GetProperty in terms of cmState::Snapshot
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index f109444324..3a22309ee9 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1222,10 +1222,16 @@ const char* cmTarget::GetProperty(const std::string& prop) const
return this->GetName().c_str();
}
if (prop == propBINARY_DIR) {
- return this->GetMakefile()->GetCurrentBinaryDirectory();
+ return this->GetMakefile()
+ ->GetStateSnapshot()
+ .GetDirectory()
+ .GetCurrentBinary();
}
if (prop == propSOURCE_DIR) {
- return this->GetMakefile()->GetCurrentSourceDirectory();
+ return this->GetMakefile()
+ ->GetStateSnapshot()
+ .GetDirectory()
+ .GetCurrentSource();
}
}
@@ -1234,7 +1240,8 @@ const char* cmTarget::GetProperty(const std::string& prop) const
const bool chain = this->GetMakefile()->GetState()->IsPropertyChained(
prop, cmProperty::TARGET);
if (chain) {
- return this->Makefile->GetProperty(prop, chain);
+ return this->Makefile->GetStateSnapshot().GetDirectory().GetProperty(
+ prop, chain);
}
}
return retVal;