summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/CommandLine/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 8084983..081ee3f 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -155,10 +155,14 @@ message(STATUS "CMAKE_BINARY_DIR='${CMAKE_BINARY_DIR}'")
set(source_dir ${RunCMake_SOURCE_DIR}/ExplicitDirs)
set(binary_dir ${RunCMake_BINARY_DIR}/ExplicitDirs-build)
+ set(working_dir ${RunCMake_BINARY_DIR}/ExplicitDirs-cwd)
set(RunCMake_TEST_SOURCE_DIR "${source_dir}")
set(RunCMake_TEST_BINARY_DIR "${binary_dir}")
+ file(MAKE_DIRECTORY "${working_dir}")
+ set(RunCMake_TEST_COMMAND_WORKING_DIRECTORY "${working_dir}")
+
file(REMOVE_RECURSE "${binary_dir}")
run_cmake_with_options(ExplicitDirs-S-arg -S ${source_dir} ${binary_dir})
run_cmake_with_options(ExplicitDirs-S-arg-reverse-order ${binary_dir} -S${source_dir} )
@@ -194,6 +198,8 @@ message(STATUS "CMAKE_BINARY_DIR='${CMAKE_BINARY_DIR}'")
run_cmake_with_options(ExplicitDirs-B-S -B${binary_dir} -S${source_dir})
run_cmake_with_options(ExplicitDirs-B-S-extra-path -B${binary_dir} -S${source_dir} /extra/path/)
+ unset(RunCMake_TEST_COMMAND_WORKING_DIRECTORY)
+
message("copied to ${RunCMake_TEST_BINARY_DIR}/initial-cache.txt")
file(COPY ${RunCMake_SOURCE_DIR}/C_buildsrcdir/initial-cache.txt DESTINATION ${RunCMake_TEST_BINARY_DIR})