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.

贡献者指南