link to benchmark directly for tests that aren't link_main_test (#1576)

This commit is contained in:
dominic 2023-03-14 13:35:32 +00:00 committed by GitHub
parent 46d3c84518
commit efc89f0b52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ target_link_libraries(output_test_helper PRIVATE benchmark::benchmark)
macro(compile_benchmark_test name)
add_executable(${name} "${name}.cc")
target_link_libraries(${name} benchmark::benchmark_main ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(${name} benchmark::benchmark ${CMAKE_THREAD_LIBS_INIT})
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "NVHPC")
target_compile_options( ${name} PRIVATE --diag_suppress partial_override )
endif()