summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/RunCMake.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-04-10 13:29:30 (GMT)
committerBrad King <brad.king@kitware.com>2019-04-10 13:40:48 (GMT)
commit538721939faef01b00ffd20416e8f7146d7368ac (patch)
treefaff3527aa7ddccd1278356f49319542a84de672 /Tests/RunCMake/RunCMake.cmake
parent784c35b4445ca4ecf5a6aad859bd3724cdb49ff6 (diff)
downloadCMake-538721939faef01b00ffd20416e8f7146d7368ac.zip
CMake-538721939faef01b00ffd20416e8f7146d7368ac.tar.gz
CMake-538721939faef01b00ffd20416e8f7146d7368ac.tar.bz2
Tests: Teach RunCMake to optionally exclude the source dir argument
Diffstat (limited to 'Tests/RunCMake/RunCMake.cmake')
-rw-r--r--Tests/RunCMake/RunCMake.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index ce71677..5d49909 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -98,8 +98,14 @@ function(run_cmake test)
else()
set(_D_CMAKE_GENERATOR_INSTANCE "")
endif()
+ if(NOT RunCMake_TEST_NO_SOURCE_DIR)
+ set(maybe_source_dir "${RunCMake_TEST_SOURCE_DIR}")
+ else()
+ set(maybe_source_dir "")
+ endif()
execute_process(
- COMMAND ${CMAKE_COMMAND} "${RunCMake_TEST_SOURCE_DIR}"
+ COMMAND ${CMAKE_COMMAND}
+ ${maybe_source_dir}
-G "${RunCMake_GENERATOR}"
-A "${RunCMake_GENERATOR_PLATFORM}"
-T "${RunCMake_GENERATOR_TOOLSET}"