summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx16
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;
}