mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
cmTarget::GetProperty: return cmProp
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user