CTest: Fix regression in build-and-test timeout forwarding

Refactoring in commit 66419bc046 (CTest: convert timeouts to
std::chrono::duration, 2017-11-20) changed out "infinite" timeout
to a value not representable by a 64-bit integer.  Update the
`--build-and-test` forwarding of `--test-timeout` to not forward
an "infinite" timeout.
This commit is contained in:
Brad King 2017-12-08 07:33:39 -05:00
parent e770b1b86e
commit 687a26b702

View File

@ -1131,6 +1131,7 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output,
// invocations. Since --build-generator is required this is a
// good place to check for it, and to add the arguments in
if (strcmp(i, "--build-generator") == 0 &&
timeout != std::chrono::duration<double>::max() &&
timeout > std::chrono::duration<double>::zero()) {
args.push_back("--test-timeout");
std::ostringstream msg;