summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-10-19 14:25:30 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-10-19 14:26:31 (GMT)
commitbd080f64bacf781b1287e1d381139e52fd30075f (patch)
tree0bef1b9f683260dc147f65abec911ebea3aabb50 /Tests
parent91cc2f1eedb7c1c83f81b551768b8420d00fcd66 (diff)
parent747f80fe82b6045fca006ece601b2189bc547aac (diff)
downloadCMake-bd080f64bacf781b1287e1d381139e52fd30075f.zip
CMake-bd080f64bacf781b1287e1d381139e52fd30075f.tar.gz
CMake-bd080f64bacf781b1287e1d381139e52fd30075f.tar.bz2
Merge topic 'separate_arguments-no-args'
747f80fe82 separate_arguments: Fix crash on *_COMMAND with no arguments Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5382
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/separate_arguments/NativeCommand.cmake5
-rw-r--r--Tests/RunCMake/separate_arguments/UnixCommand.cmake5
-rw-r--r--Tests/RunCMake/separate_arguments/WindowsCommand.cmake5
3 files changed, 15 insertions, 0 deletions
diff --git a/Tests/RunCMake/separate_arguments/NativeCommand.cmake b/Tests/RunCMake/separate_arguments/NativeCommand.cmake
index 1cb009e..0051a79 100644
--- a/Tests/RunCMake/separate_arguments/NativeCommand.cmake
+++ b/Tests/RunCMake/separate_arguments/NativeCommand.cmake
@@ -17,3 +17,8 @@ if(NOT "${native_out}" STREQUAL "${native_exp}")
message(FATAL_ERROR "separate_arguments native-style failed. "
"Expected\n [${native_exp}]\nbut got\n [${native_out}]\n")
endif()
+
+separate_arguments(empty_out NATIVE_COMMAND)
+if(NOT empty_out STREQUAL "")
+ message(FATAL_ERROR "separate_arguments native-style failed on no arguments")
+endif()
diff --git a/Tests/RunCMake/separate_arguments/UnixCommand.cmake b/Tests/RunCMake/separate_arguments/UnixCommand.cmake
index 0b5767a..c56cd63 100644
--- a/Tests/RunCMake/separate_arguments/UnixCommand.cmake
+++ b/Tests/RunCMake/separate_arguments/UnixCommand.cmake
@@ -6,3 +6,8 @@ if(NOT "${unix_out}" STREQUAL "${unix_exp}")
message(FATAL_ERROR "separate_arguments unix-style failed. "
"Expected\n [${unix_exp}]\nbut got\n [${unix_out}]\n")
endif()
+
+separate_arguments(empty_out UNIX_COMMAND)
+if(NOT empty_out STREQUAL "")
+ message(FATAL_ERROR "separate_arguments unix-style failed on no arguments")
+endif()
diff --git a/Tests/RunCMake/separate_arguments/WindowsCommand.cmake b/Tests/RunCMake/separate_arguments/WindowsCommand.cmake
index 86aa14a..cd07494 100644
--- a/Tests/RunCMake/separate_arguments/WindowsCommand.cmake
+++ b/Tests/RunCMake/separate_arguments/WindowsCommand.cmake
@@ -6,3 +6,8 @@ if(NOT "${windows_out}" STREQUAL "${windows_exp}")
message(FATAL_ERROR "separate_arguments windows-style failed. "
"Expected\n [${windows_exp}]\nbut got\n [${windows_out}]\n")
endif()
+
+separate_arguments(empty_out WINDOWS_COMMAND)
+if(NOT empty_out STREQUAL "")
+ message(FATAL_ERROR "separate_arguments windows-style failed on no arguments")
+endif()