summaryrefslogtreecommitdiff
path: root/Source/cmFindPackageCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-12-30 16:09:46 +0100
committerStephen Kelly <steveire@gmail.com>2014-01-06 18:46:44 +0100
commit802a28fc5e19136b947b2f7d136de31c1d10b578 (patch)
tree1c3e13b743830a9ec2a42b49165d2536843afdfb /Source/cmFindPackageCommand.cxx
parentdc08199848c20c7f76a68dbf54a85c736809ac57 (diff)
downloadcmake-802a28fc5e19136b947b2f7d136de31c1d10b578.tar.gz
Add cmHasLiteralSuffix API.
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r--Source/cmFindPackageCommand.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 55c20d6d1f..12bb807147 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -1151,8 +1151,8 @@ void cmFindPackageCommand::AddPrefixesSystemEnvironment()
std::string const& d = *i;
// If the path is a PREFIX/bin case then add its parent instead.
- if((d.size() >= 4 && strcmp(d.c_str()+d.size()-4, "/bin") == 0) ||
- (d.size() >= 5 && strcmp(d.c_str()+d.size()-5, "/sbin") == 0))
+ if((cmHasLiteralSuffix(d, "/bin")) ||
+ (cmHasLiteralSuffix(d, "/sbin")))
{
this->AddPathInternal(cmSystemTools::GetFilenamePath(d), EnvPath);
}