]> granicus.if.org Git - transmission/commitdiff
Adjust test names in CMake to be in line with autoconf ones
authorMike Gelfand <mikedld@mikedld.com>
Sat, 2 Dec 2017 14:58:15 +0000 (17:58 +0300)
committerMike Gelfand <mikedld@mikedld.com>
Sat, 2 Dec 2017 14:58:15 +0000 (17:58 +0300)
libtransmission/CMakeLists.txt

index 96d73ad90320992d40c76a89e6701e51a0e1f80e..a4ba99ec0b091d3b28874eafd27c9fdf8269aa3c 100644 (file)
@@ -286,9 +286,11 @@ if(ENABLE_TESTS)
               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})
@@ -296,7 +298,7 @@ if(ENABLE_TESTS)
         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()