summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-07-27 13:31:22 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-07-27 13:31:22 (GMT)
commit280dde34dda52559411376be17591755f4b6358f (patch)
tree2a904a41cd7ed5b11fe83e7a8a24138f30629aaf /Source/cmMakefile.cxx
parent0679c73b6ebcf2b336c1f69d93d6539b27ccaaff (diff)
parent594bafe52773c940fc3fb9cd9022a4d1a3a194c7 (diff)
downloadCMake-280dde34dda52559411376be17591755f4b6358f.zip
CMake-280dde34dda52559411376be17591755f4b6358f.tar.gz
CMake-280dde34dda52559411376be17591755f4b6358f.tar.bz2
Merge topic 'trace-expand'
594bafe5 cmake: add --trace-expand option
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index e07701f..57e33df 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -339,10 +339,21 @@ void cmMakefile::PrintCommandTrace(const cmListFileFunction& lff) const
std::ostringstream msg;
msg << this->GetExecutionFilePath() << "(" << lff.Line << "): ";
msg << lff.Name << "(";
+ bool expand = this->GetCMakeInstance()->GetTraceExpand();
+ std::string temp;
for(std::vector<cmListFileArgument>::const_iterator i =
lff.Arguments.begin(); i != lff.Arguments.end(); ++i)
{
- msg << i->Value;
+ if (expand)
+ {
+ temp = i->Value;
+ this->ExpandVariablesInString(temp);
+ msg << temp;
+ }
+ else
+ {
+ msg << i->Value;
+ }
msg << " ";
}
msg << ")";
@@ -4773,7 +4784,8 @@ bool cmMakefile::PolicyOptionalWarningEnabled(std::string const& var)
return cmSystemTools::IsOn(val);
}
}
- // Enable optional policy warnings with --debug-output or --trace.
+ // Enable optional policy warnings with --debug-output, --trace,
+ // or --trace-expand.
cmake* cm = this->GetCMakeInstance();
return cm->GetDebugOutput() || cm->GetTrace();
}