mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 08:08:24 -05:00
tests: Preserve empty arguments in test command lines
This will now preserve empty values in the TEST_LAUNCHER and CROSSCOMPILING_EMULATOR target properties for tests added by: - The add_test() command. - The ExternalData_Add_Test() command from the ExternalData module. - The gtest_add_tests() or gtest_discover_tests() commands from the GoogleTest module. For the gtest_add_tests() and gtest_discover_tests() commands, empty elements in the values passed after the EXTRA_ARGS keyword are also now preserved. Policy CMP0178 is added to provide backward compatibility with the old behavior where empty values were silently discarded from the above cases. Fixes: #26337
This commit is contained in:
@@ -1012,6 +1012,10 @@ function(matlab_add_unit_test)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# The ${${prefix}_TEST_ARGS} and ${${prefix}_UNPARSED_ARGUMENTS} used below
|
||||
# should have semicolons escaped, so empty arguments should be preserved.
|
||||
# There's also no target used for the command, so we don't need to do
|
||||
# anything here for CMP0178.
|
||||
add_test(NAME ${${prefix}_NAME}
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
"-Dtest_name=${${prefix}_NAME}"
|
||||
|
||||
Reference in New Issue
Block a user