summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/RunCMake.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-09-30 13:19:21 (GMT)
committerBrad King <brad.king@kitware.com>2019-09-30 13:19:21 (GMT)
commit05d7ca14e99ee8ad36da01ddb314d0b90ab41874 (patch)
treec923027983a11aef0edb53946ab94aa5fc5f1e2d /Tests/RunCMake/RunCMake.cmake
parent156b56480a786db4d967bde5eb6d5edee56a27d0 (diff)
parentb3b1c7bf3afc8f33fa69b79f47f778cb781ac3c7 (diff)
downloadCMake-05d7ca14e99ee8ad36da01ddb314d0b90ab41874.zip
CMake-05d7ca14e99ee8ad36da01ddb314d0b90ab41874.tar.gz
CMake-05d7ca14e99ee8ad36da01ddb314d0b90ab41874.tar.bz2
Merge branch 'backport-3.14-fix-EXCLUDE_FROM_ALL-subdir-all'
Diffstat (limited to 'Tests/RunCMake/RunCMake.cmake')
-rw-r--r--Tests/RunCMake/RunCMake.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index ad3f8f6..c743a02 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -82,9 +82,12 @@ function(run_cmake test)
set(maybe_input_file "")
endif()
if(RunCMake_TEST_COMMAND)
+ if(NOT RunCMake_TEST_COMMAND_WORKING_DIRECTORY)
+ set(RunCMake_TEST_COMMAND_WORKING_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+ endif()
execute_process(
COMMAND ${RunCMake_TEST_COMMAND}
- WORKING_DIRECTORY "${RunCMake_TEST_BINARY_DIR}"
+ WORKING_DIRECTORY "${RunCMake_TEST_COMMAND_WORKING_DIRECTORY}"
OUTPUT_VARIABLE actual_stdout
ERROR_VARIABLE ${actual_stderr_var}
RESULT_VARIABLE actual_result