diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-03-30 17:45:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-03-30 19:00:14 (GMT) |
commit | 3eec21a01cda630f34a4505d66bdbf6d5063ecdc (patch) | |
tree | 78481680659c0c29e7dc2cb4cac82bce280ce8a0 /Source/cmTargetPropCommandBase.cxx | |
parent | 888b8a43d82e6f6157642c2bd84520920d8e2d11 (diff) | |
download | CMake-3eec21a01cda630f34a4505d66bdbf6d5063ecdc.zip CMake-3eec21a01cda630f34a4505d66bdbf6d5063ecdc.tar.gz CMake-3eec21a01cda630f34a4505d66bdbf6d5063ecdc.tar.bz2 |
cmTarget::GetProperty: return cmProp
Diffstat (limited to 'Source/cmTargetPropCommandBase.cxx')
-rw-r--r-- | Source/cmTargetPropCommandBase.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmTargetPropCommandBase.cxx b/Source/cmTargetPropCommandBase.cxx index 0de8d6d..6325837 100644 --- a/Source/cmTargetPropCommandBase.cxx +++ b/Source/cmTargetPropCommandBase.cxx @@ -9,6 +9,8 @@ #include "cmTarget.h" #include "cmake.h" +using cmProp = const std::string*; + cmTargetPropCommandBase::cmTargetPropCommandBase(cmExecutionStatus& status) : Makefile(&status.GetMakefile()) , Status(status) @@ -157,9 +159,9 @@ void cmTargetPropCommandBase::HandleInterfaceContent( { if (prepend) { const std::string propName = std::string("INTERFACE_") + this->Property; - const char* propValue = tgt->GetProperty(propName); - const std::string totalContent = this->Join(content) + - (propValue ? std::string(";") + propValue : std::string()); + cmProp propValue = tgt->GetProperty(propName); + const std::string totalContent = + this->Join(content) + (propValue ? (";" + *propValue) : std::string()); tgt->SetProperty(propName, totalContent); } else { tgt->AppendProperty("INTERFACE_" + this->Property, this->Join(content)); |