Skip to content

Commit

Permalink
Use gtest_discover_tests instead of add_test
Browse files Browse the repository at this point in the history
  • Loading branch information
makxenov committed Apr 12, 2024
1 parent b4db39c commit ea56684
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/assigner/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ target_link_libraries(
${PROJECT_NAME}
GTest::gtest_main
)
add_test(NAME assigner_tests COMMAND assigner_tests)
set_tests_properties(assigner_tests PROPERTIES LABELS ASSIGNER)
gtest_discover_tests(assigner_tests PROPERTIES LABELS ASSIGNER)

add_custom_target(run_assigner_tests COMMAND ${CMAKE_CTEST_COMMAND} -L ASSIGNER --output-on-failure WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
add_dependencies(run_assigner_tests assigner_tests)

0 comments on commit ea56684

Please sign in to comment.