diff options
author | Brad King <brad.king@kitware.com> | 2020-06-12 15:32:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-06-12 18:31:16 (GMT) |
commit | b9dd072e05cf73969eb6e3306c82c3eaa94cfb9b (patch) | |
tree | 49e4ddf1f9dbf08f570f75719958e3aaa153f337 | |
parent | 87c860ebadabb669a570119186aabbd99cad1e5e (diff) | |
download | CMake-b9dd072e05cf73969eb6e3306c82c3eaa94cfb9b.zip CMake-b9dd072e05cf73969eb6e3306c82c3eaa94cfb9b.tar.gz CMake-b9dd072e05cf73969eb6e3306c82c3eaa94cfb9b.tar.bz2 |
Tests: Add case for cmake --build with a failing target
4 files changed, 5 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-result.txt b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-result.txt new file mode 100644 index 0000000..d197c91 --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-result.txt @@ -0,0 +1 @@ +[^0] diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-stderr.txt new file mode 100644 index 0000000..8d98f9d --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-stderr.txt @@ -0,0 +1 @@ +.* diff --git a/Tests/RunCMake/CommandLine/BuildDir/CMakeLists.txt b/Tests/RunCMake/CommandLine/BuildDir/CMakeLists.txt index d2a2831..cf2c087 100644 --- a/Tests/RunCMake/CommandLine/BuildDir/CMakeLists.txt +++ b/Tests/RunCMake/CommandLine/BuildDir/CMakeLists.txt @@ -5,3 +5,4 @@ add_custom_command( add_custom_target(CustomTarget ALL DEPENDS output.txt) add_custom_target(CustomTarget2 ALL DEPENDS output.txt) add_custom_target(CustomTarget3 ALL DEPENDS output.txt) +add_custom_target(CustomTargetFail COMMAND DoesNotExist) diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 973391d..16fdeef 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -134,6 +134,8 @@ function(run_BuildDir) ${CMAKE_COMMAND} --build BuildDir-build --target CustomTarget) run_cmake_command(BuildDir--build-multiple-targets ${CMAKE_COMMAND} -E chdir .. ${CMAKE_COMMAND} --build BuildDir-build -t CustomTarget2 --target CustomTarget3) + run_cmake_command(BuildDir--build-multiple-targets-fail ${CMAKE_COMMAND} -E chdir .. + ${CMAKE_COMMAND} --build BuildDir-build -t CustomTargetFail --target CustomTarget3) run_cmake_command(BuildDir--build-multiple-targets-jobs ${CMAKE_COMMAND} -E chdir .. ${CMAKE_COMMAND} --build BuildDir-build --target CustomTarget CustomTarget2 -j2 --target CustomTarget3) run_cmake_command(BuildDir--build-multiple-targets-with-clean-first ${CMAKE_COMMAND} -E chdir .. |