diff options
Diffstat (limited to 'Source/cmTest.cxx')
| -rw-r--r-- | Source/cmTest.cxx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/cmTest.cxx b/Source/cmTest.cxx index a26bef3..7c0f9e7 100644 --- a/Source/cmTest.cxx +++ b/Source/cmTest.cxx @@ -5,7 +5,7 @@ #include "cmMakefile.h" #include "cmProperty.h" #include "cmState.h" -#include "cmStringAlgorithms.h" +#include "cmValue.h" cmTest::cmTest(cmMakefile* mf) : CommandExpandLists(false) @@ -32,20 +32,20 @@ void cmTest::SetCommand(std::vector<std::string> const& command) this->Command = command; } -const char* cmTest::GetProperty(const std::string& prop) const +cmValue cmTest::GetProperty(const std::string& prop) const { - cmProp retVal = this->Properties.GetPropertyValue(prop); + cmValue retVal = this->Properties.GetPropertyValue(prop); if (!retVal) { const bool chain = this->Makefile->GetState()->IsPropertyChained(prop, cmProperty::TEST); if (chain) { - if (cmProp p = this->Makefile->GetProperty(prop, chain)) { - return p->c_str(); + if (cmValue p = this->Makefile->GetProperty(prop, chain)) { + return p; } } return nullptr; } - return retVal->c_str(); + return retVal; } bool cmTest::GetPropertyAsBool(const std::string& prop) const @@ -57,6 +57,10 @@ void cmTest::SetProperty(const std::string& prop, const char* value) { this->Properties.SetProperty(prop, value); } +void cmTest::SetProperty(const std::string& prop, cmValue value) +{ + this->Properties.SetProperty(prop, value); +} void cmTest::AppendProperty(const std::string& prop, const std::string& value, bool asString) |
