diff options
author | Stephen Kelly <steveire@gmail.com> | 2016-10-12 22:18:26 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2016-10-16 11:57:53 (GMT) |
commit | cef59bb8bac6b6d38025cc492235953c5ff7654b (patch) | |
tree | a3ebc25c5a0ab39090c1f80a57aa941dd93b254a | |
parent | 0d57b07ad99cefc5df9e65d6c14aeaddf5d64b88 (diff) | |
download | CMake-cef59bb8bac6b6d38025cc492235953c5ff7654b.zip CMake-cef59bb8bac6b6d38025cc492235953c5ff7654b.tar.gz CMake-cef59bb8bac6b6d38025cc492235953c5ff7654b.tar.bz2 |
cmTarget: Implement GetProperty in terms of cmState::Snapshot
-rw-r--r-- | Source/cmTarget.cxx | 13 |
1 files 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; |