Merge topic 'remove_extra_matches'
dc03499
Do not set CMAKE_MATCH_ variables when not neeeded
This commit is contained in:
commit
f247474eb6
|
@ -534,15 +534,22 @@ void cmStringCommand::ClearMatches(cmMakefile* mf)
|
|||
{
|
||||
char name[128];
|
||||
sprintf(name, "CMAKE_MATCH_%d", i);
|
||||
const char* s = mf->GetDefinition(name);
|
||||
if(s && *s != 0)
|
||||
{
|
||||
mf->AddDefinition(name, "");
|
||||
mf->MarkVariableAsUsed(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmStringCommand::StoreMatches(cmMakefile* mf,cmsys::RegularExpression& re)
|
||||
{
|
||||
for (unsigned int i=0; i<10; i++)
|
||||
{
|
||||
std::string m = re.match(i);
|
||||
if(m.size() > 0)
|
||||
{
|
||||
char name[128];
|
||||
sprintf(name, "CMAKE_MATCH_%d", i);
|
||||
|
@ -550,6 +557,7 @@ void cmStringCommand::StoreMatches(cmMakefile* mf,cmsys::RegularExpression& re)
|
|||
mf->MarkVariableAsUsed(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmStringCommand::HandleFindCommand(std::vector<std::string> const&
|
||||
|
|
Loading…
Reference in New Issue