浏览代码

BUG: back out change due to broken dashboard

Bill Hoffman 21 年之前
父节点
当前提交
35cacf367b
共有 1 个文件被更改,包括 3 次插入13 次删除
  1. 3 13
      Source/cmSystemTools.cxx

+ 3 - 13
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;
 }