diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2018-08-29 01:47:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-08-31 18:58:03 (GMT) |
commit | 1fa0f2bd03621121e0a5d4c6cf0b4bcf74ad2ceb (patch) | |
tree | 9710dc5bcb061c36ab6f3b7f136cda84386b450d /Source/cmSystemTools.cxx | |
parent | ca7507cebc74fe4af3660cf85c72070c3f95a9ba (diff) | |
download | CMake-1fa0f2bd03621121e0a5d4c6cf0b4bcf74ad2ceb.zip CMake-1fa0f2bd03621121e0a5d4c6cf0b4bcf74ad2ceb.tar.gz CMake-1fa0f2bd03621121e0a5d4c6cf0b4bcf74ad2ceb.tar.bz2 |
cmSystemTools: Add IsOn(),IsOff() overloads accepting std::string
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 72fd2bb..7663af1 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -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) { |