Commit baed22c4 authored by Brad King's avatar Brad King

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.
parent 44d6370d
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment