google/benchmark

CMake: Difference between benchmark::benchmark and benchmark::benchmark_main

已關閉

#1,856 建立於 2024年9月18日

 (1 則留言) (0 個反應) (0 位負責人)C++ (1,539 個分叉)batch import
docshelp wanted

倉庫指標

星標
 (7,968 顆星)
PR 合併指標
 (平均合併 4天 2小時) (30 天內合併 19 個 PR)

描述

Hi, I saw that on https://github.com/google/benchmark?tab=readme-ov-file#usage-with-cmake the Readme indicates that I should link against both benchmark::benchmark and benchmark::benchmark_main when using CMake. What's the difference between the two? Wouldn't it be enough to just link against benchmark::benchmark_main?

Thanks.

貢獻者指南