diff options
author | Brad King <brad.king@kitware.com> | 2019-04-10 13:31:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-04-10 13:40:48 (GMT) |
commit | baed22c4b000d524f4890af86cf3c02dc885cba6 (patch) | |
tree | 38986ec5bca575fbf94e60bc6c4555f3b12becae /Tests/RunCMake | |
parent | 44d6370db35c82d182bfc9480f0f0031b6b559ed (diff) | |
download | CMake-baed22c4b000d524f4890af86cf3c02dc885cba6.zip CMake-baed22c4b000d524f4890af86cf3c02dc885cba6.tar.gz CMake-baed22c4b000d524f4890af86cf3c02dc885cba6.tar.bz2 |
Tests: Fix RunCMake.CommandLine test to use generator with -S and -B
The `-S` and `-B` command-line option tests do generate build systems
and so should use the generator being tested.
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 3deabd0..ea749ea 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -82,23 +82,27 @@ project(ExplicitDirsMissing LANGUAGES NONE) 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}") - file(MAKE_DIRECTORY "${binary_dir}") - run_cmake_command(S-arg ${CMAKE_COMMAND} -S ${source_dir} ${binary_dir}) - run_cmake_command(S-arg-reverse-order ${CMAKE_COMMAND} ${binary_dir} -S${source_dir} ) - run_cmake_command(S-no-arg ${CMAKE_COMMAND} -S ) - run_cmake_command(S-no-arg2 ${CMAKE_COMMAND} -S -T) - run_cmake_command(S-B ${CMAKE_COMMAND} -S ${source_dir} -B ${binary_dir}) + run_cmake_with_options(S-arg -S ${source_dir} ${binary_dir}) + run_cmake_with_options(S-arg-reverse-order ${binary_dir} -S${source_dir} ) + run_cmake_with_options(S-no-arg -S ) + run_cmake_with_options(S-no-arg2 -S -T) + run_cmake_with_options(S-B -S ${source_dir} -B ${binary_dir}) # make sure that -B can explicitly construct build directories file(REMOVE_RECURSE "${binary_dir}") - run_cmake_command(B-arg ${CMAKE_COMMAND} -B ${binary_dir} ${source_dir}) + run_cmake_with_options(B-arg -B ${binary_dir} ${source_dir}) file(REMOVE_RECURSE "${binary_dir}") - run_cmake_command(B-arg-reverse-order ${CMAKE_COMMAND} ${source_dir} -B${binary_dir}) - run_cmake_command(B-no-arg ${CMAKE_COMMAND} -B ) - run_cmake_command(B-no-arg2 ${CMAKE_COMMAND} -B -T) + run_cmake_with_options(B-arg-reverse-order ${source_dir} -B${binary_dir}) + run_cmake_with_options(B-no-arg -B ) + run_cmake_with_options(B-no-arg2 -B -T) file(REMOVE_RECURSE "${binary_dir}") - run_cmake_command(B-S ${CMAKE_COMMAND} -B${binary_dir} -S${source_dir}) + run_cmake_with_options(B-S -B${binary_dir} -S${source_dir}) endfunction() run_ExplicitDirs() |