summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-04-30 18:56:06 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-04-30 18:56:06 (GMT)
commit2fb2207c1025f86cc5b62faf8c3a1ca15ea18152 (patch)
tree3238682d3b82c1a09285b0942b0e62ee390f0b08 /Source/cmSystemTools.cxx
parente7519358e748e66f88b7c277a6d59fff502dad4a (diff)
downloadCMake-2fb2207c1025f86cc5b62faf8c3a1ca15ea18152.zip
CMake-2fb2207c1025f86cc5b62faf8c3a1ca15ea18152.tar.gz
CMake-2fb2207c1025f86cc5b62faf8c3a1ca15ea18152.tar.bz2
bug fixes
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 2da8439..9211d8b 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -544,3 +544,20 @@ bool cmSystemTools::IsOn(const char* val)
}
return (v == "ON" || v == "1" || v == "YES" || v == "TRUE" || v == "Y");
}
+
+bool cmSystemTools::IsOff(const char* val)
+{
+ if (!val)
+ {
+ return true;
+ }
+ std::basic_string<char> v = val;
+
+ for(std::basic_string<char>::iterator c = v.begin();
+ c != v.end(); c++)
+ {
+ *c = toupper(*c);
+ }
+ return (v == "OFF" || v == "0" || v == "NO" || v == "FALSE" ||
+ v == "N" || v == "NOTFOUND");
+}