summaryrefslogtreecommitdiffstats
path: root/Source/cmIfCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmIfCommand.cxx')
-rw-r--r--Source/cmIfCommand.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx
index 4eed477..ffc0f35 100644
--- a/Source/cmIfCommand.cxx
+++ b/Source/cmIfCommand.cxx
@@ -74,6 +74,13 @@ IsFunctionBlocked(const cmListFileFunction& lff,
{
this->IsBlocking = this->HasRun;
this->HasRun = true;
+
+ // if trace is enabled, print a (trivially) evaluated "else"
+ // statement
+ if(!this->IsBlocking && mf.GetCMakeInstance()->GetTrace())
+ {
+ mf.PrintCommandTrace(this->Functions[c]);
+ }
}
else if (scopeDepth == 0 && !cmSystemTools::Strucmp
(this->Functions[c].Name.c_str(),"elseif"))
@@ -88,6 +95,12 @@ IsFunctionBlocked(const cmListFileFunction& lff,
cmMakefileCall stack_manager(&mf, this->Functions[c], status);
static_cast<void>(stack_manager);
+ // if trace is enabled, print the evaluated "elseif" statement
+ if(mf.GetCMakeInstance()->GetTrace())
+ {
+ mf.PrintCommandTrace(this->Functions[c]);
+ }
+
std::string errorString;
std::vector<std::string> expandedArguments;