cmake/Source/cmProperty.cxx

27 lines
603 B
C++
Raw Normal View History

2016-10-30 18:24:19 +01:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmProperty.h"
2016-07-09 11:21:54 +02:00
void cmProperty::Set(const char* value)
{
this->Value = value;
this->ValueHasBeenSet = true;
}
2016-07-09 11:21:54 +02:00
void cmProperty::Append(const char* value, bool asString)
{
2016-07-09 11:21:54 +02:00
if (!this->Value.empty() && *value && !asString) {
this->Value += ";";
2016-07-09 11:21:54 +02:00
}
this->Value += value;
this->ValueHasBeenSet = true;
}
2016-07-09 11:21:54 +02:00
const char* cmProperty::GetValue() const
{
2016-07-09 11:21:54 +02:00
if (this->ValueHasBeenSet) {
return this->Value.c_str();
2016-07-09 11:21:54 +02:00
}
2018-01-26 17:06:56 +01:00
return nullptr;
}