浏览代码

cmIfCommand: Simplify execution context construction

Brad King 9 年之前
父节点
当前提交
7503deb2c5
共有 1 个文件被更改,包括 2 次插入8 次删除
  1. 2 8
      Source/cmIfCommand.cxx

+ 2 - 8
Source/cmIfCommand.cxx

@@ -203,15 +203,9 @@ bool cmIfCommand
 
   cmake::MessageType status;
 
-  cmListFileContext execContext = this->Makefile->GetExecutionContext();
-
-  cmCommandContext commandContext;
-  commandContext.Line = execContext.Line;
-  commandContext.Name = execContext.Name;
-
   cmConditionEvaluator conditionEvaluator(
-        *(this->Makefile), cmListFileContext::FromCommandContext(
-          commandContext, execContext.FilePath),
+        *(this->Makefile),
+        this->Makefile->GetExecutionContext(),
         this->Makefile->GetBacktrace());
 
   bool isTrue = conditionEvaluator.IsTrue(