diff options
Diffstat (limited to 'Source/cmWhileCommand.cxx')
-rw-r--r-- | Source/cmWhileCommand.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx index 012c580..4b7afd8 100644 --- a/Source/cmWhileCommand.cxx +++ b/Source/cmWhileCommand.cxx @@ -49,7 +49,20 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, mf.ExpandArguments(this->Args, expandedArguments); cmake::MessageType messageType; - cmConditionEvaluator conditionEvaluator(mf); + cmListFileContext execContext = this->GetStartingContext(); + + cmCommandContext commandContext; + commandContext.Line = execContext.Line; + commandContext.Name = execContext.Name; + + cmListFileContext conditionContext = + cmConditionEvaluator::GetConditionContext( + &mf, commandContext, + this->GetStartingContext().FilePath); + + cmConditionEvaluator conditionEvaluator( + mf, conditionContext, + mf.GetBacktrace(commandContext)); bool isTrue = conditionEvaluator.IsTrue( expandedArguments, errorString, messageType); |