google/benchmark

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

Open

#1856 opened on Sep 18, 2024

View on GitHub
 (1 comment) (0 reactions) (0 assignees)C++ (7,968 stars) (1,539 forks)batch import
docshelp wanted

Description

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