[Cmake-commits] CMake branch, next, updated. v3.0.0-rc6-3679-gf93a85c
Ben Boeckel
ben.boeckel at kitware.com
Mon Jun 9 14:46:28 EDT 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via f93a85c96a332146137defdd3cd062d7b18b0133 (commit)
via 1b003c1f9542ec3bb638b1b16de6d85a424f1c53 (commit)
via 7492a7b8465d28c7f4377372153ef1e10ff336d5 (commit)
via 3e7194a215aed5e34acf32ad4b8c6bd948beb15e (commit)
from 0fe910f07c8871b94486986e9875dba033df5b8f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f93a85c96a332146137defdd3cd062d7b18b0133
commit f93a85c96a332146137defdd3cd062d7b18b0133
Merge: 0fe910f 1b003c1
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Mon Jun 9 14:46:27 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jun 9 14:46:27 2014 -0400
Merge topic 'dev/static-regex' into next
1b003c1f cmTarget: Remove an unused variable
7492a7b8 regex: Search on strings where possible
3e7194a2 regex: Use static regexs where possible
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1b003c1f9542ec3bb638b1b16de6d85a424f1c53
commit 1b003c1f9542ec3bb638b1b16de6d85a424f1c53
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Wed Apr 30 13:13:39 2014 -0400
Commit: Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Mon Jun 9 14:45:35 2014 -0400
cmTarget: Remove an unused variable
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 59cc14c..058e661 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -6145,7 +6145,6 @@ void processILibs(const std::string& config,
if (emitted.insert(tgt).second)
{
tgts.push_back(tgt);
- std::vector<std::string> ilibs;
cmTarget::LinkInterface const* iface =
tgt->GetLinkInterfaceLibraries(config, headTarget);
if (iface)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7492a7b8465d28c7f4377372153ef1e10ff336d5
commit 7492a7b8465d28c7f4377372153ef1e10ff336d5
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Wed Apr 30 13:13:21 2014 -0400
Commit: Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Mon Jun 9 14:45:35 2014 -0400
regex: Search on strings where possible
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 70f02d6..0ce04a5 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -1811,7 +1811,7 @@ cmComputeLinkInformation::AddLibraryRuntimeInfo(std::string const& fullPath)
}
}
- is_shared_library = this->ExtractSharedLibraryName.find(file.c_str());
+ is_shared_library = this->ExtractSharedLibraryName.find(file);
if(!is_shared_library)
{
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 07362c3..7dcb335 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -402,7 +402,7 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
return compilerId ? compilerId : "";
}
static cmsys::RegularExpression compilerIdValidator("^[A-Za-z0-9_]*$");
- if (!compilerIdValidator.find(parameters.begin()->c_str()))
+ if (!compilerIdValidator.find(*parameters.begin()))
{
reportError(context, content->GetOriginalExpression(),
"Expression syntax not recognized.");
@@ -509,7 +509,7 @@ struct CompilerVersionNode : public cmGeneratorExpressionNode
}
static cmsys::RegularExpression compilerIdValidator("^[0-9\\.]*$");
- if (!compilerIdValidator.find(parameters.begin()->c_str()))
+ if (!compilerIdValidator.find(*parameters.begin()))
{
reportError(context, content->GetOriginalExpression(),
"Expression syntax not recognized.");
@@ -710,7 +710,7 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode
return configurationNode.Evaluate(parameters, context, content, 0);
}
static cmsys::RegularExpression configValidator("^[A-Za-z0-9_]*$");
- if (!configValidator.find(parameters.begin()->c_str()))
+ if (!configValidator.find(*parameters.begin()))
{
reportError(context, content->GetOriginalExpression(),
"Expression syntax not recognized.");
@@ -969,7 +969,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
return std::string();
}
- if (!propertyNameValidator.find(propertyName.c_str()))
+ if (!propertyNameValidator.find(propertyName))
{
::reportError(context, content->GetOriginalExpression(),
"Property name not supported.");
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3e7194a215aed5e34acf32ad4b8c6bd948beb15e
commit 3e7194a215aed5e34acf32ad4b8c6bd948beb15e
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Wed Apr 30 13:12:29 2014 -0400
Commit: Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Mon Jun 9 14:45:35 2014 -0400
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.
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 0113698..a5eee6b 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -588,8 +588,8 @@ void cmCPackNSISGenerator::CreateMenuLinks( cmOStringStream& str,
return;
}
- cmsys::RegularExpression urlRegex;
- urlRegex.compile("^(mailto:|(ftps?|https?|news)://).*$");
+ static cmsys::RegularExpression
+ urlRegex("^(mailto:|(ftps?|https?|news)://).*$");
std::vector<std::string>::iterator it;
for ( it = cpackMenuLinksVector.begin();
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index ea8536f..70f02d6 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))))
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index 028d229..2b4d955 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -469,12 +469,11 @@ std::string::size_type cmGeneratorExpression::Find(const std::string &input)
//----------------------------------------------------------------------------
bool cmGeneratorExpression::IsValidTargetName(const std::string &input)
{
- cmsys::RegularExpression targetNameValidator;
// The ':' is supported to allow use with IMPORTED targets. At least
// Qt 4 and 5 IMPORTED targets use ':' as the namespace delimiter.
- targetNameValidator.compile("^[A-Za-z0-9_.:+-]+$");
+ static cmsys::RegularExpression targetNameValidator("^[A-Za-z0-9_.:+-]+$");
- return targetNameValidator.find(input.c_str());
+ return targetNameValidator.find(input);
}
//----------------------------------------------------------------------------
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index c54922d..07362c3 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -401,8 +401,7 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
{
return compilerId ? compilerId : "";
}
- cmsys::RegularExpression compilerIdValidator;
- compilerIdValidator.compile("^[A-Za-z0-9_]*$");
+ static cmsys::RegularExpression compilerIdValidator("^[A-Za-z0-9_]*$");
if (!compilerIdValidator.find(parameters.begin()->c_str()))
{
reportError(context, content->GetOriginalExpression(),
@@ -509,8 +508,7 @@ struct CompilerVersionNode : public cmGeneratorExpressionNode
return compilerVersion ? compilerVersion : "";
}
- cmsys::RegularExpression compilerIdValidator;
- compilerIdValidator.compile("^[0-9\\.]*$");
+ static cmsys::RegularExpression compilerIdValidator("^[0-9\\.]*$");
if (!compilerIdValidator.find(parameters.begin()->c_str()))
{
reportError(context, content->GetOriginalExpression(),
@@ -711,8 +709,7 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode
{
return configurationNode.Evaluate(parameters, context, content, 0);
}
- cmsys::RegularExpression configValidator;
- configValidator.compile("^[A-Za-z0-9_]*$");
+ static cmsys::RegularExpression configValidator("^[A-Za-z0-9_]*$");
if (!configValidator.find(parameters.begin()->c_str()))
{
reportError(context, content->GetOriginalExpression(),
@@ -884,8 +881,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
"$<TARGET_PROPERTY:...> expression requires one or two parameters");
return std::string();
}
- cmsys::RegularExpression propertyNameValidator;
- propertyNameValidator.compile("^[A-Za-z0-9_]+$");
+ static cmsys::RegularExpression propertyNameValidator("^[A-Za-z0-9_]+$");
cmTarget const* target = context->HeadTarget;
std::string propertyName = *parameters.begin();
diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx
index ec671fc..71a3497 100644
--- a/Source/cmOrderDirectories.cxx
+++ b/Source/cmOrderDirectories.cxx
@@ -39,8 +39,8 @@ public:
if(file.rfind(".framework") != std::string::npos)
{
- cmsys::RegularExpression splitFramework;
- splitFramework.compile("^(.*)/(.*).framework/(.*)$");
+ static cmsys::RegularExpression
+ splitFramework("^(.*)/(.*).framework/(.*)$");
if(splitFramework.find(file) &&
(std::string::npos !=
splitFramework.match(3).find(splitFramework.match(2))))
@@ -326,8 +326,8 @@ void cmOrderDirectories::AddRuntimeLibrary(std::string const& fullPath,
if(fullPath.rfind(".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))))
-----------------------------------------------------------------------
Summary of changes:
Source/CPack/cmCPackNSISGenerator.cxx | 4 ++--
Source/cmComputeLinkInformation.cxx | 6 +++---
Source/cmGeneratorExpression.cxx | 5 ++---
Source/cmGeneratorExpressionEvaluator.cxx | 20 ++++++++------------
Source/cmOrderDirectories.cxx | 8 ++++----
Source/cmTarget.cxx | 1 -
6 files changed, 19 insertions(+), 25 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list