浏览代码

cmCTestTestCommand: defer getting the global timeout

Ben Boeckel 8 年之前
父节点
当前提交
5969048d1d
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Source/CTest/cmCTestTestCommand.cxx

+ 2 - 1
Source/CTest/cmCTestTestCommand.cxx

@@ -33,10 +33,11 @@ cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler()
   const char* ctestTimeout =
     this->Makefile->GetDefinition("CTEST_TEST_TIMEOUT");
 
-  double timeout = this->CTest->GetTimeOut();
+  double timeout;
   if (ctestTimeout) {
     timeout = atof(ctestTimeout);
   } else {
+    timeout = this->CTest->GetTimeOut();
     if (timeout <= 0) {
       // By default use timeout of 10 minutes
       timeout = 600;