mirror of
https://github.com/reactos/CMake.git
synced 2025-01-26 13:57:07 +00:00
cmSystemTools: Add IsOn(),IsOff() overloads accepting std::string
This commit is contained in:
parent
ca7507cebc
commit
1fa0f2bd03
@ -392,6 +392,11 @@ bool cmSystemTools::IsOn(const char* val)
|
||||
return (onValues.count(v) > 0);
|
||||
}
|
||||
|
||||
bool cmSystemTools::IsOn(const std::string& val)
|
||||
{
|
||||
return cmSystemTools::IsOn(val.c_str());
|
||||
}
|
||||
|
||||
bool cmSystemTools::IsNOTFOUND(const char* val)
|
||||
{
|
||||
if (strcmp(val, "NOTFOUND") == 0) {
|
||||
@ -428,6 +433,11 @@ bool cmSystemTools::IsOff(const char* val)
|
||||
return (offValues.count(v) > 0);
|
||||
}
|
||||
|
||||
bool cmSystemTools::IsOff(const std::string& val)
|
||||
{
|
||||
return cmSystemTools::IsOff(val.c_str());
|
||||
}
|
||||
|
||||
void cmSystemTools::ParseWindowsCommandLine(const char* command,
|
||||
std::vector<std::string>& args)
|
||||
{
|
||||
|
@ -129,6 +129,7 @@ public:
|
||||
* as ifdef.
|
||||
*/
|
||||
static bool IsOn(const char* val);
|
||||
static bool IsOn(const std::string& val);
|
||||
|
||||
/**
|
||||
* does a string indicate a false or off value ? Note that this is
|
||||
@ -138,6 +139,7 @@ public:
|
||||
* NOTFOUND, *-NOTFOUND or IGNORE will cause IsOff to return true.
|
||||
*/
|
||||
static bool IsOff(const char* val);
|
||||
static bool IsOff(const std::string& val);
|
||||
|
||||
///! Return true if value is NOTFOUND or ends in -NOTFOUND.
|
||||
static bool IsNOTFOUND(const char* value);
|
||||
|
Loading…
x
Reference in New Issue
Block a user