session subprocess tr-getopt utils variant watchdir watchdir@generic)
set(TP ${TR_NAME}-test-${T})
if(T MATCHES "^([^@]+)@.+$")
- string(REPLACE "@" "_" TP "${TP}")
+ string(REPLACE "@" "-" TP "${TP}")
+ string(REPLACE "@" "-" T_NAME "${T}")
set(${TP}_TEST_BASENAME "${CMAKE_MATCH_1}")
else()
+ set(T_NAME "${T}")
set(${TP}_TEST_BASENAME "${T}")
endif()
add_executable(${TP} ${${TP}_TEST_BASENAME}-test.c ${${T}-test_ADD_SOURCES})
if(DEFINED ${T}-test_DEFINITIONS)
target_compile_definitions(${TP} PRIVATE ${${T}-test_DEFINITIONS})
endif()
- add_test(NAME ${T} COMMAND ${TP})
+ add_test(NAME ${T_NAME}-test COMMAND ${TP})
set_property(TARGET ${TP} PROPERTY FOLDER "UnitTests")
endforeach()