mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-11-25 21:21:37 +00:00
build(test): drop the GTest::Main link and dead CMake code
- each test suite has its own main() in runner.cxx, so GTest::Main was linked but not used - remove the commented-out add_test() and set_tests_properties() calls that gtest_discover_tests() replaced Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -61,7 +61,8 @@ function(add_testsuite suitename)
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
list(INSERT testsuite_LINKS 0 GTest::Main GTest::GTest)
|
||||
# runner.cxx defines main(), so do not link GTest::Main
|
||||
list(INSERT testsuite_LINKS 0 GTest::GTest)
|
||||
set(target "testsuite_${suitename}")
|
||||
|
||||
add_executable(${target} ${testsuite_SOURCES})
|
||||
@@ -85,15 +86,10 @@ function(add_testsuite suitename)
|
||||
fairmq_target_tidy(TARGET ${target})
|
||||
endif()
|
||||
|
||||
# add_test(NAME "${suitename}" WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND ${target})
|
||||
if(testsuite_TIMEOUT)
|
||||
# set_tests_properties("${suitename}" PROPERTIES TIMEOUT ${testsuite_TIMEOUT})
|
||||
else()
|
||||
if(NOT testsuite_TIMEOUT)
|
||||
set(testsuite_TIMEOUT 10)
|
||||
endif()
|
||||
if(testsuite_RUN_SERIAL)
|
||||
# set_tests_properties("${suitename}" PROPERTIES RUN_SERIAL ${testsuite_RUN_SERIAL})
|
||||
else()
|
||||
if(NOT testsuite_RUN_SERIAL)
|
||||
set(testsuite_RUN_SERIAL OFF)
|
||||
endif()
|
||||
gtest_discover_tests(${target}
|
||||
|
||||
Reference in New Issue
Block a user