diff options
author | Fred Baksik <frodak17@gmail.com> | 2019-04-22 15:01:24 (GMT) |
---|---|---|
committer | Fred Baksik <frodak17@gmail.com> | 2019-05-01 13:15:51 (GMT) |
commit | 6ad699358b6b421da6c49cf540b30eb8b0a3a996 (patch) | |
tree | 58ba9cddd24b581eca31fc130a5f7606c77abd78 /Tests/RunCMake/CommandLine | |
parent | 955f7f41c08b90553fb4bcf364c12c072802d925 (diff) | |
download | CMake-6ad699358b6b421da6c49cf540b30eb8b0a3a996.zip CMake-6ad699358b6b421da6c49cf540b30eb8b0a3a996.tar.gz CMake-6ad699358b6b421da6c49cf540b30eb8b0a3a996.tar.bz2 |
cmake: --build -j <jobs> should not accept 0.
Fixes #19059
Diffstat (limited to 'Tests/RunCMake/CommandLine')
9 files changed, 24 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/BuildDir--build--parallel-large-result.txt b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-large-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-large-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/BuildDir--build--parallel-large-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-large-stderr.txt new file mode 100644 index 0000000..94fc157 --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-large-stderr.txt @@ -0,0 +1,3 @@ +^The <jobs> value is too large\. ++ +Usage: cmake --build <dir> \[options\] \[-- \[native-options\]\] diff --git a/Tests/RunCMake/CommandLine/BuildDir--build--parallel-zero-result.txt b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-zero-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-zero-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/BuildDir--build--parallel-zero-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-zero-stderr.txt new file mode 100644 index 0000000..8ed4fee --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-zero-stderr.txt @@ -0,0 +1,3 @@ +^The <jobs> value requires a positive integer argument\. ++ +Usage: cmake --build <dir> \[options\] \[-- \[native-options\]\] diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-jobs-large-result.txt b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-large-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-large-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-jobs-large-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-large-stderr.txt new file mode 100644 index 0000000..94fc157 --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-large-stderr.txt @@ -0,0 +1,3 @@ +^The <jobs> value is too large\. ++ +Usage: cmake --build <dir> \[options\] \[-- \[native-options\]\] diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-jobs-zero-result.txt b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-zero-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-zero-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-jobs-zero-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-zero-stderr.txt new file mode 100644 index 0000000..8ed4fee --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-zero-stderr.txt @@ -0,0 +1,3 @@ +^The <jobs> value requires a positive integer argument\. ++ +Usage: cmake --build <dir> \[options\] \[-- \[native-options\]\] diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index ea749ea..49d3608 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -149,6 +149,14 @@ function(run_BuildDir) ${CMAKE_COMMAND} --build BuildDir-build --parallel2) run_cmake_command(BuildDir--build--parallel-no-space-good-number-trailing--target ${CMAKE_COMMAND} -E chdir .. ${CMAKE_COMMAND} --build BuildDir-build --parallel2 --target CustomTarget) + run_cmake_command(BuildDir--build-jobs-zero ${CMAKE_COMMAND} -E chdir .. + ${CMAKE_COMMAND} --build BuildDir-build -j 0) + run_cmake_command(BuildDir--build--parallel-zero ${CMAKE_COMMAND} -E chdir .. + ${CMAKE_COMMAND} --build BuildDir-build --parallel 0) + run_cmake_command(BuildDir--build-jobs-large ${CMAKE_COMMAND} -E chdir .. + ${CMAKE_COMMAND} --build BuildDir-build -j 4294967293) + run_cmake_command(BuildDir--build--parallel-large ${CMAKE_COMMAND} -E chdir .. + ${CMAKE_COMMAND} --build BuildDir-build --parallel 4294967293) # No default jobs for Xcode and FreeBSD build command if(NOT RunCMake_GENERATOR MATCHES "Xcode" AND NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD") |