diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2005-04-12 17:27:07 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2005-04-12 17:27:07 (GMT) |
commit | 100407394209e44cd8a2dae555d2424161f45a6e (patch) | |
tree | 5d7f1c7fd896ebebfa3387eb30f82016c7cd9bff /Source/cmMacroCommand.cxx | |
parent | 9e4506a2d0586dacba53119bc7c651a1d16c1849 (diff) | |
download | CMake-100407394209e44cd8a2dae555d2424161f45a6e.zip CMake-100407394209e44cd8a2dae555d2424161f45a6e.tar.gz CMake-100407394209e44cd8a2dae555d2424161f45a6e.tar.bz2 |
ENH: performance improvements
Diffstat (limited to 'Source/cmMacroCommand.cxx')
-rw-r--r-- | Source/cmMacroCommand.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index 3387546..7780920 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -119,6 +119,14 @@ bool cmMacroHelperCommand::InvokeInitialPass newLFF.m_Name = m_Functions[c].m_Name; newLFF.m_FilePath = m_Functions[c].m_FilePath; newLFF.m_Line = m_Functions[c].m_Line; + const char* def = + m_Makefile->GetDefinition("CMAKE_MACRO_REPORT_DEFINITION_LOCATION"); + bool macroReportLocation = false; + if(def && !cmSystemTools::IsOff(def)) + { + macroReportLocation = true; + } + // for each argument of the current function for (std::vector<cmListFileArgument>::const_iterator k = m_Functions[c].m_Arguments.begin(); @@ -194,9 +202,7 @@ bool cmMacroHelperCommand::InvokeInitialPass arg.Value = tmps; arg.Quoted = k->Quoted; - const char* def = - m_Makefile->GetDefinition("CMAKE_MACRO_REPORT_DEFINITION_LOCATION"); - if(def && !cmSystemTools::IsOff(def)) + if(macroReportLocation) { // Report the location of the argument where the macro was // defined. |