diff options
author | Brad King <brad.king@kitware.com> | 2017-02-26 15:34:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-26 15:43:30 (GMT) |
commit | 01347954187ebccf83fc7540163f150a5f430c36 (patch) | |
tree | 9e4a3a3104066e15c6aa4995263873e4d16e4ed3 | |
parent | 624021a09e7850b1f6cb75af40b17a38d98c95e3 (diff) | |
download | CMake-01347954187ebccf83fc7540163f150a5f430c36.zip CMake-01347954187ebccf83fc7540163f150a5f430c36.tar.gz CMake-01347954187ebccf83fc7540163f150a5f430c36.tar.bz2 |
Tests: Fix RunCMake.ObjectLibrary dependency delay
Sleep before the second copy to avoid the need for a touch.
Sleep for longer on generators whose build tools have low
resolution timestamps.
-rw-r--r-- | Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake b/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake index 9291218..0ac5b8c 100644 --- a/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake +++ b/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake @@ -24,14 +24,20 @@ function(run_Dependencies) file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + if(RunCMake_GENERATOR STREQUAL "Borland Makefiles" OR + RunCMake_GENERATOR STREQUAL "Watcom WMake") + set(fs_delay 3) + else() + set(fs_delay 1.125) + endif() + run_cmake_command(Dependencies-build ${CMAKE_COMMAND} -E copy ${RunCMake_SOURCE_DIR}/depends_obj1.cpp ${RunCMake_TEST_BINARY_DIR}/depends_obj.cpp) run_cmake(Dependencies) - run_cmake_command(Dependencies-build ${CMAKE_COMMAND} --build .) + run_cmake_command(Dependencies-build ${CMAKE_COMMAND} --build . --config Debug) + run_cmake_command(Dependencies-build ${CMAKE_COMMAND} -E sleep ${fs_delay}) run_cmake_command(Dependencies-build ${CMAKE_COMMAND} -E copy ${RunCMake_SOURCE_DIR}/depends_obj0.cpp ${RunCMake_TEST_BINARY_DIR}/depends_obj.cpp) - run_cmake_command(Dependencies-build ${CMAKE_COMMAND} -E sleep 1) - run_cmake_command(Dependencies-build ${CMAKE_COMMAND} -E touch_nocreate ${RunCMake_TEST_BINARY_DIR}/depends_obj.cpp) - run_cmake_command(Dependencies-build ${CMAKE_COMMAND} --build .) - run_cmake_command(Dependencies-build ${CMAKE_CTEST_COMMAND} -C Debug) + run_cmake_command(Dependencies-build ${CMAKE_COMMAND} --build . --config Debug) + run_cmake_command(Dependencies-build ${CMAKE_CTEST_COMMAND} -C Debug -V) endfunction() run_Dependencies() |