summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2019-01-21 14:57:25 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2019-01-21 14:57:25 (GMT)
commitab3b549ee0dcd79607f8347a9b69c9b029590fbd (patch)
treecb4538dce956b74934597add4c69b46fe2d19bcf /Tests
parent02f7e997e939dbd0c753514edcd580083cebd37c (diff)
downloadCMake-ab3b549ee0dcd79607f8347a9b69c9b029590fbd.zip
CMake-ab3b549ee0dcd79607f8347a9b69c9b029590fbd.tar.gz
CMake-ab3b549ee0dcd79607f8347a9b69c9b029590fbd.tar.bz2
CROSSCOMPILING_EMULATOR: Fix test generation for empty value
If CROSSCOMPILING_EMULATOR was set to an empty string, and a test was generated with the executable as the command, CMake would segfault upon trying to generate the test file. Fix this. Fixes: #18819
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CrosscompilingEmulator/CrosscompilingEmulatorProperty.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/RunCMake/CrosscompilingEmulator/CrosscompilingEmulatorProperty.cmake b/Tests/RunCMake/CrosscompilingEmulator/CrosscompilingEmulatorProperty.cmake
index 1aeb510..2fdefc4 100644
--- a/Tests/RunCMake/CrosscompilingEmulator/CrosscompilingEmulatorProperty.cmake
+++ b/Tests/RunCMake/CrosscompilingEmulator/CrosscompilingEmulatorProperty.cmake
@@ -26,3 +26,9 @@ get_property(emulator TARGET target_without_emulator
if(NOT "${emulator}" STREQUAL "")
message(SEND_ERROR "Default CROSSCOMPILING_EMULATOR property not set to null")
endif()
+
+add_executable(target_with_empty_emulator simple_src_exiterror.cxx)
+set_property(TARGET target_with_empty_emulator PROPERTY CROSSCOMPILING_EMULATOR "")
+
+enable_testing()
+add_test(NAME test_target_with_empty_emulator COMMAND target_with_empty_emulator)