google/benchmark

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

Chiusa

#1856 aperta il 18 set 2024

 (1 commento) (0 reazioni) (0 assegnatari)C++ (1539 fork)batch import
docshelp wanted

Metriche repository

Star
 (7968 stelle)
Metriche merge PR
 (Merge medio 4g 2h) (19 PR mergiate in 30 g)

Descrizione

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.

Guida contributor