CMake/Tests/RunCMake/add_test/CMP0110-Common.cmake
Deniz Bahadir a20987732b add_test: Allow special characters in test name (w/ policy CMP0110)
Restore the change from commit f84af8e270 (add_test: Allow special
characters in test name, 2020-05-16, v3.18.0-rc1~142^2) that had to be
reverted by commit f84af8e270 (add_test: Allow special characters in
test name, 2020-05-16, v3.18.0-rc1~142^2) for compatibility.

Add policy CMP0110 to make the change in a compatible way.
Also, support even more characters than before by generating the
test scripts using bracket arguments around the test names.

Fixes: #19391
Signed-off-by: Deniz Bahadir <dbahadir@benocs.com>
2020-08-12 10:44:07 -04:00

10 lines
213 B
CMake

include(CTest)
add_test(
NAME "${TEST_NAME}"
COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_LIST_DIR}/CMP0110-Test.cmake"
)
set_property(
TEST "${TEST_NAME}"
PROPERTY ENVIRONMENT CMAKE_add_test_ENVVAR=1
)