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. */
|
2008-10-12 18:41:06 +02:00
|
|
|
#include "cmProperty.h"
|
2016-07-09 11:21:54 +02:00
|
|
|
|
|
|
|
void cmProperty::Set(const char* value)
|
2008-10-12 18:41:06 +02:00
|
|
|
{
|
|
|
|
this->Value = value;
|
|
|
|
this->ValueHasBeenSet = true;
|
|
|
|
}
|
|
|
|
|
2016-07-09 11:21:54 +02:00
|
|
|
void cmProperty::Append(const char* value, bool asString)
|
2008-10-12 18:41:06 +02:00
|
|
|
{
|
2016-07-09 11:21:54 +02:00
|
|
|
if (!this->Value.empty() && *value && !asString) {
|
2008-10-12 18:41:06 +02:00
|
|
|
this->Value += ";";
|
2016-07-09 11:21:54 +02:00
|
|
|
}
|
2008-10-12 18:41:06 +02:00
|
|
|
this->Value += value;
|
|
|
|
this->ValueHasBeenSet = true;
|
|
|
|
}
|
|
|
|
|
2016-07-09 11:21:54 +02:00
|
|
|
const char* cmProperty::GetValue() const
|
2008-10-12 18:41:06 +02:00
|
|
|
{
|
2016-07-09 11:21:54 +02:00
|
|
|
if (this->ValueHasBeenSet) {
|
2008-10-12 18:41:06 +02:00
|
|
|
return this->Value.c_str();
|
2016-07-09 11:21:54 +02:00
|
|
|
}
|
2018-01-26 17:06:56 +01:00
|
|
|
return nullptr;
|
2008-10-12 18:41:06 +02:00
|
|
|
}
|