diff options
author | Brad King <brad.king@kitware.com> | 2019-06-03 18:57:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-06-03 18:57:19 (GMT) |
commit | f263650f95bdf87e2c50ada4a28d4fb729ac6f1c (patch) | |
tree | 7b8fb20825c9bdda10833c877debab16349a7157 /Tests | |
parent | 73472408c501e66c9dd8c027293b8c0907001b42 (diff) | |
download | CMake-f263650f95bdf87e2c50ada4a28d4fb729ac6f1c.zip CMake-f263650f95bdf87e2c50ada4a28d4fb729ac6f1c.tar.gz CMake-f263650f95bdf87e2c50ada4a28d4fb729ac6f1c.tar.bz2 |
Tests: Fix RunCMake.CommandLine test to use generator in no-S-B case
Apply the fix from commit baed22c4b0 (Tests: Fix RunCMake.CommandLine
test to use generator with -S and -B, 2019-04-10) to the `no-S-B` case
too. It also generates a build system and should use the generator
being tested.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index cee996c..7798b62 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -68,6 +68,9 @@ run_cmake_command(cache-empty-entry ${CMAKE_COMMAND} --build ${RunCMake_SOURCE_DIR}/cache-empty-entry/) function(run_ExplicitDirs) + set(RunCMake_TEST_NO_CLEAN 1) + set(RunCMake_TEST_NO_SOURCE_DIR 1) + set(source_dir ${RunCMake_BINARY_DIR}/ExplicitDirsMissing) file(REMOVE_RECURSE "${source_dir}") @@ -76,16 +79,15 @@ function(run_ExplicitDirs) cmake_minimum_required(VERSION 3.13) project(ExplicitDirsMissing LANGUAGES NONE) ]=]) - run_cmake_command(no-S-B ${CMAKE_COMMAND} -E chdir ${source_dir} - ${CMAKE_COMMAND} -DFOO=BAR) + set(RunCMake_TEST_SOURCE_DIR "${source_dir}") + set(RunCMake_TEST_BINARY_DIR "${source_dir}") + run_cmake_with_options(no-S-B -DFOO=BAR) set(source_dir ${RunCMake_SOURCE_DIR}/ExplicitDirs) set(binary_dir ${RunCMake_BINARY_DIR}/ExplicitDirs-build) set(RunCMake_TEST_SOURCE_DIR "${source_dir}") set(RunCMake_TEST_BINARY_DIR "${binary_dir}") - set(RunCMake_TEST_NO_CLEAN 1) - set(RunCMake_TEST_NO_SOURCE_DIR 1) file(REMOVE_RECURSE "${binary_dir}") run_cmake_with_options(S-arg -S ${source_dir} ${binary_dir}) |