Disable gtest discovery to run tests per-program not per-case (#432)

* disable gtest discovery to run tests per-program not per-case

* register cmake target to ctest

[ROCm/composable_kernel commit: 79aa3fb179]
This commit is contained in:
Anthony Chang
2022-11-03 06:58:08 +08:00
committed by GitHub
parent fe367bc917
commit c182247999

View File

@@ -26,7 +26,7 @@ function(add_gtest_executable TEST_NAME)
# suppress gtest warnings
target_compile_options(${TEST_NAME} PRIVATE -Wno-global-constructors -Wno-undef)
target_link_libraries(${TEST_NAME} PRIVATE gtest_main)
gtest_discover_tests(${TEST_NAME})
add_test(NAME ${TEST_NAME} COMMAND $<TARGET_FILE:${TEST_NAME}> )
rocm_install(TARGETS ${TEST_NAME} COMPONENT tests)
endfunction(add_gtest_executable TEST_NAME)