diff options
author | Brad King <brad.king@kitware.com> | 2017-03-31 17:56:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-03-31 17:56:49 (GMT) |
commit | 716f8c88c9c94dc58f22ae770d613a4fec51c276 (patch) | |
tree | 3df5656a26486b9c6510d4faa4c5a2894b9665a5 /Tests/CMakeOnly | |
parent | c791fb12544926bc5870a61735dc2ec62940a6f6 (diff) | |
download | CMake-716f8c88c9c94dc58f22ae770d613a4fec51c276.zip CMake-716f8c88c9c94dc58f22ae770d613a4fec51c276.tar.gz CMake-716f8c88c9c94dc58f22ae770d613a4fec51c276.tar.bz2 |
Tests: Add option to customize LinkInterfaceLoop timeout
This test has a timeout in case CMake gets into an infinite loop. The
default of 90 seconds should be plenty of time for the test to run
correctly since it does not actually do a build. However, busy machines
that run lots of tests in parallel may need a longer timeout. Give them
an option to extend it.
Diffstat (limited to 'Tests/CMakeOnly')
-rw-r--r-- | Tests/CMakeOnly/CMakeLists.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Tests/CMakeOnly/CMakeLists.txt b/Tests/CMakeOnly/CMakeLists.txt index c692cbd..d44c836 100644 --- a/Tests/CMakeOnly/CMakeLists.txt +++ b/Tests/CMakeOnly/CMakeLists.txt @@ -9,7 +9,14 @@ macro(add_CMakeOnly_test test) endmacro() add_CMakeOnly_test(LinkInterfaceLoop) -set_property(TEST CMakeOnly.LinkInterfaceLoop PROPERTY TIMEOUT 90) +# If a bug is introduced in CMake that causes an infinite loop while +# analyzing LinkInterfaceLoop then don't let the test run too long. +# Use an option to customize it so that the timeout can be extended +# on busy machines. +if(NOT DEFINED CMake_TEST_CMakeOnly.LinkInterfaceLoop_TIMEOUT) + set(CMake_TEST_CMakeOnly.LinkInterfaceLoop_TIMEOUT 90) +endif() +set_property(TEST CMakeOnly.LinkInterfaceLoop PROPERTY TIMEOUT ${CMake_TEST_CMakeOnly.LinkInterfaceLoop_TIMEOUT}) add_CMakeOnly_test(CheckSymbolExists) |