summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-28 17:55:54 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-04-28 17:55:54 (GMT)
commitc0989eaf2afeebaedfdec4d42fdeb344b867c4f8 (patch)
tree4b062492c423018daef54fade78393de2c5a7a39
parent70d54b03fd4bae28fd2ff7fe9f3ede1dc50a994a (diff)
parentc46490dad525e5f5e10eba12808718340ad40ace (diff)
downloadCMake-c0989eaf2afeebaedfdec4d42fdeb344b867c4f8.zip
CMake-c0989eaf2afeebaedfdec4d42fdeb344b867c4f8.tar.gz
CMake-c0989eaf2afeebaedfdec4d42fdeb344b867c4f8.tar.bz2
Merge topic 'fix-osx-framework-detection'
c46490da cmSystemTools: Fix IsPathToFramework implementation (#15535)
-rw-r--r--Source/cmSystemTools.cxx11
1 files changed, 2 insertions, 9 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 0e0532d..e2adabe 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1486,15 +1486,8 @@ void cmSystemTools::EnableVSConsoleOutput()
bool cmSystemTools::IsPathToFramework(const char* path)
{
- if(cmSystemTools::FileIsFullPath(path))
- {
- std::string libname = path;
- if(libname.find(".framework") == libname.size()+1-sizeof(".framework"))
- {
- return true;
- }
- }
- return false;
+ return (cmSystemTools::FileIsFullPath(path) &&
+ cmHasLiteralSuffix(path, ".framework"));
}
bool cmSystemTools::CreateTar(const char* outFileName,