summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2020-11-30 17:34:19 (GMT)
committerBrad King <brad.king@kitware.com>2020-12-01 14:04:08 (GMT)
commit1b6c5333a0b4a56eaf8b010084e18a40e473c2e3 (patch)
tree432b467bda279cb7508cddbc9831adf6ed6a6966 /Tests/RunCMake/CommandLine/RunCMakeTest.cmake
parent7137dff083a1868bcc9d22fe6fe7d052abb06513 (diff)
downloadCMake-1b6c5333a0b4a56eaf8b010084e18a40e473c2e3.zip
CMake-1b6c5333a0b4a56eaf8b010084e18a40e473c2e3.tar.gz
CMake-1b6c5333a0b4a56eaf8b010084e18a40e473c2e3.tar.bz2
cmake: Error out on unknown arguments starting with `-`.
Fixes: #21521
Diffstat (limited to 'Tests/RunCMake/CommandLine/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index bb40c52..51754fc 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -3,6 +3,8 @@ cmake_minimum_required(VERSION 3.1)
include(RunCMake)
run_cmake_command(NoArgs ${CMAKE_COMMAND})
+run_cmake_command(InvalidArg1 ${CMAKE_COMMAND} -invalid)
+run_cmake_command(InvalidArg2 ${CMAKE_COMMAND} --invalid)
run_cmake_command(Wizard ${CMAKE_COMMAND} -i)
run_cmake_command(C-no-arg ${CMAKE_COMMAND} -B DummyBuildDir -C)
run_cmake_command(C-no-file ${CMAKE_COMMAND} -B DummyBuildDir -C nosuchcachefile.txt)