cmTarget::GetProperty: return cmProp

This commit is contained in:
Vitaly Stakhovsky
2020-03-30 13:45:00 -04:00
parent 888b8a43d8
commit 3eec21a01c
14 changed files with 169 additions and 170 deletions

View File

@@ -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));