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 37c88ae73113798fe3d248c3e5d24ad9017feb89 (commit)
via 01eaee777bb3f790fff97fd1d0bf58b4cf18a8a2 (commit)
from a87bb9050cef6332464efbf44fa7a24ffce80dbc (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=37c88ae73113798fe3d248c3e5d24ad9017feb89
commit 37c88ae73113798fe3d248c3e5d24ad9017feb89
Merge: a87bb90 01eaee7
Author: Bill Hoffman <[email protected]>
AuthorDate: Thu Jun 6 12:52:46 2013 -0400
Commit: CMake Topic Stage <[email protected]>
CommitDate: Thu Jun 6 12:52:46 2013 -0400
Merge topic 'remove_extra_matches' into next
01eaee7 Remove extra MATCH_ variable sets when not neeeded.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=01eaee777bb3f790fff97fd1d0bf58b4cf18a8a2
commit 01eaee777bb3f790fff97fd1d0bf58b4cf18a8a2
Author: Bill Hoffman <[email protected]>
AuthorDate: Thu Jun 6 12:50:20 2013 -0400
Commit: Bill Hoffman <[email protected]>
CommitDate: Thu Jun 6 12:50:20 2013 -0400
Remove extra MATCH_ variable sets when not neeeded.
This change increased the configure time for ParaView by 10 seconds. Without
the change 1,000,000 set to empty/ set to empty calls were being made. After
the change only 100,000 MATCH verables were set for the same code.
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx
index 1fbde01..68ba13f 100644
--- a/Source/cmStringCommand.cxx
+++ b/Source/cmStringCommand.cxx
@@ -534,8 +534,12 @@ void cmStringCommand::ClearMatches(cmMakefile* mf)
{
char name[128];
sprintf(name, "CMAKE_MATCH_%d", i);
- mf->AddDefinition(name, "");
- mf->MarkVariableAsUsed(name);
+ const char* s = mf->GetDefinition(name);
+ if(s && *s != 0)
+ {
+ mf->AddDefinition(name, "");
+ mf->MarkVariableAsUsed(name);
+ }
}
}
@@ -544,10 +548,14 @@ void cmStringCommand::StoreMatches(cmMakefile*
mf,cmsys::RegularExpression& re)
{
for (unsigned int i=0; i<10; i++)
{
- char name[128];
- sprintf(name, "CMAKE_MATCH_%d", i);
- mf->AddDefinition(name, re.match(i).c_str());
- mf->MarkVariableAsUsed(name);
+ std::string m = re.match(i);
+ if(m.size() > 0)
+ {
+ char name[128];
+ sprintf(name, "CMAKE_MATCH_%d", i);
+ mf->AddDefinition(name, re.match(i).c_str());
+ mf->MarkVariableAsUsed(name);
+ }
}
}
-----------------------------------------------------------------------
Summary of changes:
Source/cmStringCommand.cxx | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
hooks/post-receive
--
CMake
_______________________________________________
Cmake-commits mailing list
[email protected]
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits