diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-07-31 14:33:25 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-07-31 14:33:25 (GMT) |
commit | 6f31b0dfbd5fbd234d08f716703b6d05c659e086 (patch) | |
tree | 410fc30c88ba41252b2949d2cc6ff6f8d087e8d3 /Source/cmMakefile.cxx | |
parent | 9926b7f717f90ca6b5055d1cbf205f258466df99 (diff) | |
download | CMake-6f31b0dfbd5fbd234d08f716703b6d05c659e086.zip CMake-6f31b0dfbd5fbd234d08f716703b6d05c659e086.tar.gz CMake-6f31b0dfbd5fbd234d08f716703b6d05c659e086.tar.bz2 |
ENH: add a --trace option
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index fca2f7e..7e035e1 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -395,6 +395,21 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, if(pcmd->GetEnabled() && !cmSystemTools::GetFatalErrorOccured() && (!this->GetCMakeInstance()->GetScriptMode() || pcmd->IsScriptable())) { + // if trace is one, print out invoke information + if(this->GetCMakeInstance()->GetTrace()) + { + cmOStringStream msg; + msg << lff.FilePath << "(" << lff.Line << "): "; + msg << lff.Name << "("; + for(std::vector<cmListFileArgument>::const_iterator i = + lff.Arguments.begin(); i != lff.Arguments.end(); ++i) + { + msg << i->Value; + msg << " "; + } + msg << ")"; + cmSystemTools::Message(msg.str().c_str()); + } // Try invoking the command. if(!pcmd->InvokeInitialPass(lff.Arguments,status) || status.GetNestedError()) |