diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-05-21 01:27:37 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-05-21 01:27:37 (GMT) |
commit | 35cacf367bc7448b033772187fc69d83a0dc4b98 (patch) | |
tree | 971ff1363cd96f5821c1c59bd633801134578c58 /Source/cmSystemTools.cxx | |
parent | 66288b115e9adb01933b1092fdd35a513774eb66 (diff) | |
download | CMake-35cacf367bc7448b033772187fc69d83a0dc4b98.zip CMake-35cacf367bc7448b033772187fc69d83a0dc4b98.tar.gz CMake-35cacf367bc7448b033772187fc69d83a0dc4b98.tar.bz2 |
BUG: back out change due to broken dashboard
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index b6cd957..a6872f1 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -304,22 +304,12 @@ bool cmSystemTools::IsOn(const char* val) bool cmSystemTools::IsNOTFOUND(const char* val) { - int len = strlen(val); - const char* notfound = "-NOTFOUND"; - const int lenNotFound = 9; - if(len < lenNotFound) - { - return false; - } - if(strncmp((val + (len - lenNotFound)), notfound, lenNotFound) == 0) + cmsys::RegularExpression reg("-NOTFOUND$"); + if(reg.find(val)) { return true; } - if(strcmp(val, "NOTFOUND") == 0) - { - return true; - } - return false; + return std::string("NOTFOUND") == val; } |