2013-07-09 22:35:49 +04:00
|
|
|
include(RunCMake)
|
|
|
|
|
|
|
|
run_cmake(ErrorLogs)
|
2013-07-17 22:56:40 +04:00
|
|
|
run_cmake(FailCopyFileABI)
|
2014-01-21 20:33:56 +04:00
|
|
|
|
|
|
|
# Use a single build tree for a few tests without cleaning.
|
|
|
|
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/RerunCMake-build)
|
|
|
|
set(RunCMake_TEST_NO_CLEAN 1)
|
|
|
|
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
|
|
|
|
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
|
|
|
|
set(input "${RunCMake_TEST_BINARY_DIR}/CustomCMakeInput.txt")
|
|
|
|
set(stamp "${RunCMake_TEST_BINARY_DIR}/CustomCMakeStamp.txt")
|
2014-01-21 23:14:49 +04:00
|
|
|
set(depend "${RunCMake_TEST_BINARY_DIR}/CustomCMakeDepend.txt")
|
|
|
|
set(output "${RunCMake_TEST_BINARY_DIR}/CustomCMakeOutput.txt")
|
2014-01-21 20:33:56 +04:00
|
|
|
file(WRITE "${input}" "1")
|
2014-01-21 23:14:49 +04:00
|
|
|
file(WRITE "${depend}" "1")
|
2014-01-21 20:33:56 +04:00
|
|
|
run_cmake(RerunCMake)
|
|
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) # handle 1s resolution
|
|
|
|
file(WRITE "${input}" "2")
|
|
|
|
run_cmake_command(RerunCMake-build1 ${CMAKE_COMMAND} --build .)
|
2014-01-21 23:14:49 +04:00
|
|
|
file(WRITE "${depend}" "2")
|
|
|
|
run_cmake_command(RerunCMake-build2 ${CMAKE_COMMAND} --build .)
|
2014-01-21 20:33:56 +04:00
|
|
|
unset(RunCMake_TEST_BINARY_DIR)
|
|
|
|
unset(RunCMake_TEST_NO_CLEAN)
|