mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 20:19:53 +00:00
performance improvements
This commit is contained in:
parent
117f961a5a
commit
76b344c6fe
@ -20,6 +20,8 @@ bool cmMacroFunctionBlocker::
|
||||
IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
|
||||
{
|
||||
// record commands until we hit the ENDMACRO
|
||||
if (!m_Executing)
|
||||
{
|
||||
// at the ENDMACRO call we shift gears and start looking for invocations
|
||||
if(lff.m_Name == "ENDMACRO")
|
||||
{
|
||||
@ -31,9 +33,6 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_Executing)
|
||||
{
|
||||
// if it wasn't an endmacro and we are not executing then we must be
|
||||
// recording
|
||||
m_Functions.push_back(lff);
|
||||
@ -63,10 +62,12 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
|
||||
}
|
||||
|
||||
// Invoke all the functions that were collected in the block.
|
||||
cmListFileFunction newLFF;
|
||||
for(unsigned int c = 0; c < m_Functions.size(); ++c)
|
||||
{
|
||||
// Replace the formal arguments and then invoke the command.
|
||||
cmListFileFunction newLFF;
|
||||
newLFF.m_Arguments.clear();
|
||||
newLFF.m_Arguments.reserve(m_Functions[c].m_Arguments.size());
|
||||
newLFF.m_Name = m_Functions[c].m_Name;
|
||||
newLFF.m_FilePath = m_Functions[c].m_FilePath;
|
||||
newLFF.m_Line = m_Functions[c].m_Line;
|
||||
|
Loading…
Reference in New Issue
Block a user