diff options
author | Brad King <brad.king@kitware.com> | 2021-03-29 13:29:30 +0000 |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-03-29 09:29:40 -0400 |
commit | c4f800545443d0816a3d87cc7161c1d8dc7b529f (patch) | |
tree | 85f4fc3dbfc30f1044d1cf72760bd9dcdb06dafa /Tests/RunCMake/CommandLine | |
parent | d5ab6a53edef5f259f9b9446943dcc5113898b51 (diff) | |
parent | 79d7bcaf4029ce7b78abfcbcaf8cd1a09a172437 (diff) | |
download | cmake-c4f800545443d0816a3d87cc7161c1d8dc7b529f.tar.gz |
Merge topic 'correct_arg_parsing'
79d7bcaf40 cmCommandLineArgument: correctly compute next parse index
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5936
Diffstat (limited to 'Tests/RunCMake/CommandLine')
3 files changed, 6 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-jobs-no-number-trailing--invalid-target-result.txt b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-no-number-trailing--invalid-target-result.txt new file mode 100644 index 0000000000..3beecb0a1a --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-no-number-trailing--invalid-target-result.txt @@ -0,0 +1 @@ +(1|2) diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-jobs-no-number-trailing--invalid-target-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-no-number-trailing--invalid-target-stderr.txt new file mode 100644 index 0000000000..ee4bcc004a --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-no-number-trailing--invalid-target-stderr.txt @@ -0,0 +1 @@ +.*(ninja: error: unknown target 'invalid-target'|No rule to make target [`']invalid-target').* diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index a2b2044bed..c497472a50 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -212,6 +212,10 @@ function(run_BuildDir) ${CMAKE_COMMAND} --build BuildDir-build -j) run_cmake_command(BuildDir--build-jobs-no-number-trailing--target ${CMAKE_COMMAND} -E chdir .. ${CMAKE_COMMAND} --build BuildDir-build -j --target CustomTarget) + if(RunCMake_GENERATOR MATCHES "Unix Makefiles" OR RunCMake_GENERATOR MATCHES "Ninja") + run_cmake_command(BuildDir--build-jobs-no-number-trailing--invalid-target ${CMAKE_COMMAND} -E chdir .. + ${CMAKE_COMMAND} --build BuildDir-build -j --target invalid-target) + endif() run_cmake_command(BuildDir--build--parallel-no-number ${CMAKE_COMMAND} -E chdir .. ${CMAKE_COMMAND} --build BuildDir-build --parallel) run_cmake_command(BuildDir--build--parallel-no-number-trailing--target ${CMAKE_COMMAND} -E chdir .. |