summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/file/RunCMakeTest.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/file/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/file/RunCMakeTest.cmake19
1 files changed, 17 insertions, 2 deletions
diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake
index 8d1b981..f5461ad 100644
--- a/Tests/RunCMake/file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file/RunCMakeTest.cmake
@@ -111,7 +111,7 @@ else()
set(tf_1 "${RunCMake_TEST_BINARY_DIR}/test/1.txt")
file(WRITE "${tf_1}" "1")
- message(STATUS "GLOB-RerunCMake: first configuration...")
+ message(STATUS "GLOB-CONFIGURE_DEPENDS-RerunCMake: first configuration...")
run_cmake(GLOB-CONFIGURE_DEPENDS-RerunCMake)
run_cmake_command(GLOB-CONFIGURE_DEPENDS-RerunCMake-build ${CMAKE_COMMAND} --build .)
@@ -125,10 +125,25 @@ else()
execute_process(COMMAND ${CMAKE_COMMAND} -E sleep ${fs_delay})
message(STATUS "GLOB-CONFIGURE_DEPENDS-RerunCMake: remove first test file...")
- file(REMOVE "${RunCMake_TEST_BINARY_DIR}/test/1.txt")
+ file(REMOVE "${tf_1}")
run_cmake_command(GLOB-CONFIGURE_DEPENDS-RerunCMake-rebuild_second ${CMAKE_COMMAND} --build .)
run_cmake_command(GLOB-CONFIGURE_DEPENDS-RerunCMake-nowork ${CMAKE_COMMAND} --build .)
+ if(NOT WIN32 OR CYGWIN)
+ message(STATUS "GLOB-CONFIGURE_DEPENDS-CMP0009-RerunCMake: link the first test directory into a new directory...")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}/test2")
+ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${RunCMake_TEST_BINARY_DIR}/test" "${RunCMake_TEST_BINARY_DIR}/test2/test_folder_symlink")
+
+ message(STATUS "GLOB-CONFIGURE_DEPENDS-CMP0009-RerunCMake: first configuration...")
+ run_cmake(GLOB-CONFIGURE_DEPENDS-CMP0009-RerunCMake)
+ run_cmake_command(GLOB-CONFIGURE_DEPENDS-CMP0009-RerunCMake-build ${CMAKE_COMMAND} --build .)
+
+ message(STATUS "GLOB-CONFIGURE_DEPENDS-CMP0009-RerunCMake: add another file in the linked directory...")
+ set(tf_3 "${RunCMake_TEST_BINARY_DIR}/test/3.txt")
+ file(WRITE "${tf_3}" "3")
+ run_cmake_command(GLOB-CONFIGURE_DEPENDS-CMP0009-RerunCMake-rebuild ${CMAKE_COMMAND} --build .)
+ endif()
+
unset(RunCMake_TEST_BINARY_DIR)
unset(RunCMake_TEST_NO_CLEAN)
unset(RunCMake_DEFAULT_stderr)