From cef59bb8bac6b6d38025cc492235953c5ff7654b Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 13 Oct 2016 00:18:26 +0200 Subject: cmTarget: Implement GetProperty in terms of cmState::Snapshot --- Source/cmTarget.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index f109444..3a22309 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; -- cgit v0.12