google/benchmark

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

Geschlossen

#1.856 geöffnet am 18.09.2024

 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)C++ (1.539 Forks)batch import
docshelp wanted

Repository-Metriken

Stars
 (7.968 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 4T 2h) (19 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide