summaryrefslogtreecommitdiff
path: root/Source/cmComputeLinkInformation.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-04-30 13:12:29 -0400
committerBen Boeckel <ben.boeckel@kitware.com>2014-06-09 14:45:35 -0400
commit3e7194a215aed5e34acf32ad4b8c6bd948beb15e (patch)
treed64f0613579fdf8fda51ce8fd05f6045a3a2142e /Source/cmComputeLinkInformation.cxx
parent9e8fa1043ce9bfcffdcfa395f618dd7958ef4251 (diff)
downloadcmake-3e7194a215aed5e34acf32ad4b8c6bd948beb15e.tar.gz
regex: Use static regexs where possible
Rather than declaring and compiling a constant regex every time a chunk of code is executed, build the regex once.
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r--Source/cmComputeLinkInformation.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index ea8536fc04..70f02d6878 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -1831,8 +1831,8 @@ cmComputeLinkInformation::AddLibraryRuntimeInfo(std::string const& fullPath)
{
if(fullPath.find(".framework") != std::string::npos)
{
- cmsys::RegularExpression splitFramework;
- splitFramework.compile("^(.*)/(.*).framework/(.*)$");
+ static cmsys::RegularExpression
+ splitFramework("^(.*)/(.*).framework/(.*)$");
if(splitFramework.find(fullPath) &&
(std::string::npos !=
splitFramework.match(3).find(splitFramework.match(2))))