diff options
author | Bartosz Kosiorek <bartosz.kosiorek@tomtom.com> | 2019-02-08 13:28:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-03-05 13:55:28 (GMT) |
commit | 324d18bb3418aee8dcb63e28106ac0dac6abea71 (patch) | |
tree | 390a0ccc8c8bb955c0330af9bd66621a71ea2041 /Tests/RunCMake | |
parent | ebc94500c1726f393ac6119848d53deca47e1ccf (diff) | |
download | CMake-324d18bb3418aee8dcb63e28106ac0dac6abea71.zip CMake-324d18bb3418aee8dcb63e28106ac0dac6abea71.tar.gz CMake-324d18bb3418aee8dcb63e28106ac0dac6abea71.tar.bz2 |
cmake: Teach --build mode to support multiple targets
Fixes: #16136
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-jobs-stderr.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-stderr.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-first-result.txt (renamed from Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-result.txt) | 0 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-first-stderr.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-second-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-second-stderr.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 6 |
7 files changed, 12 insertions, 3 deletions
diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-jobs-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-jobs-stderr.txt new file mode 100644 index 0000000..3c2c808 --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-jobs-stderr.txt @@ -0,0 +1 @@ +(^$|^Warning: .* does not support parallel builds\. Ignoring parallel build command line option\.) diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-stderr.txt deleted file mode 100644 index f2cbaa6..0000000 --- a/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-stderr.txt +++ /dev/null @@ -1,3 +0,0 @@ -^'--target' may not be specified more than once\. -+ -Usage: cmake --build <dir> \[options\] \[-- \[native-options\]\] diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-result.txt b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-first-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-result.txt +++ b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-first-result.txt diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-first-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-first-stderr.txt new file mode 100644 index 0000000..40d9bec --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-first-stderr.txt @@ -0,0 +1,2 @@ +^Error: Building 'clean' and other targets together is not supported\. +Usage: cmake --build <dir> \[options\] \[-- \[native-options\]\] diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-second-result.txt b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-second-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-second-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-second-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-second-stderr.txt new file mode 100644 index 0000000..40d9bec --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-with-clean-second-stderr.txt @@ -0,0 +1,2 @@ +^Error: Building 'clean' and other targets together is not supported\. +Usage: cmake --build <dir> \[options\] \[-- \[native-options\]\] diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 23fb9ef..ff2a8a5 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -107,6 +107,12 @@ 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 --target CustomTarget2 --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 .. + ${CMAKE_COMMAND} --build BuildDir-build --target clean CustomTarget) + run_cmake_command(BuildDir--build-multiple-targets-with-clean-second ${CMAKE_COMMAND} -E chdir .. + ${CMAKE_COMMAND} --build BuildDir-build --target CustomTarget clean) run_cmake_command(BuildDir--build-jobs-bad-number ${CMAKE_COMMAND} -E chdir .. ${CMAKE_COMMAND} --build BuildDir-build -j 12ab) run_cmake_command(BuildDir--build-jobs-good-number ${CMAKE_COMMAND} -E chdir .. |