Tests: Extend RunCMake.CommandLine to cover 'cmake --build' for 'ninja -v'
This commit is contained in:
parent
ce935ebe50
commit
d1082448a8
|
@ -0,0 +1 @@
|
||||||
|
-E echo CustomCommand
|
|
@ -0,0 +1,5 @@
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT output.txt
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E echo CustomCommand > output.txt
|
||||||
|
)
|
||||||
|
add_custom_target(CustomTarget ALL DEPENDS output.txt)
|
|
@ -18,6 +18,22 @@ run_cmake_command(build-no-generator
|
||||||
run_cmake_command(build-bad-generator
|
run_cmake_command(build-bad-generator
|
||||||
${CMAKE_COMMAND} --build ${RunCMake_SOURCE_DIR}/cache-bad-generator)
|
${CMAKE_COMMAND} --build ${RunCMake_SOURCE_DIR}/cache-bad-generator)
|
||||||
|
|
||||||
|
if(RunCMake_GENERATOR STREQUAL "Ninja")
|
||||||
|
# Use a single build tree for a few tests without cleaning.
|
||||||
|
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Build-build)
|
||||||
|
set(RunCMake_TEST_NO_CLEAN 1)
|
||||||
|
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
|
||||||
|
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
|
||||||
|
|
||||||
|
set(RunCMake_TEST_OPTIONS -DCMAKE_VERBOSE_MAKEFILE=1)
|
||||||
|
run_cmake(Build)
|
||||||
|
unset(RunCMake_TEST_OPTIONS)
|
||||||
|
run_cmake_command(Build-ninja-v ${CMAKE_COMMAND} --build .)
|
||||||
|
|
||||||
|
unset(RunCMake_TEST_BINARY_DIR)
|
||||||
|
unset(RunCMake_TEST_NO_CLEAN)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
run_cmake_command(E_create_symlink-missing-dir
|
run_cmake_command(E_create_symlink-missing-dir
|
||||||
${CMAKE_COMMAND} -E create_symlink T missing-dir/L
|
${CMAKE_COMMAND} -E create_symlink T missing-dir/L
|
||||||
|
|
Loading…
Reference in New Issue