diff options
Diffstat (limited to 'Source/CTest/cmCTestRunTest.cxx')
-rw-r--r-- | Source/CTest/cmCTestRunTest.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 9b62183..563439a 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -758,11 +758,13 @@ bool cmCTestRunTest::ForkProcess() } // An explicit TIMEOUT=0 test property means "no timeout". - if (timeout && *timeout == std::chrono::duration<double>::zero()) { - timeout = cm::nullopt; + if (timeout) { + if (*timeout == std::chrono::duration<double>::zero()) { + timeout = cm::nullopt; + } } else { // Check --timeout. - if (!timeout && this->CTest->GetGlobalTimeout() > cmDuration::zero()) { + if (this->CTest->GetGlobalTimeout() > cmDuration::zero()) { timeout = this->CTest->GetGlobalTimeout(); } |