Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: Difference between benchmark::benchmark and benchmark::benchmark_main #1856

Open
martingalvan-volue opened this issue Sep 18, 2024 · 1 comment
Labels
docs documentation update needed help wanted

Comments

@martingalvan-volue
Copy link

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.

@martingalvan-volue martingalvan-volue changed the title [FR] CMake: Difference between benchmark::benchmark and benchmark::benchmark_main Sep 18, 2024
@LebedevRI
Copy link
Collaborator

The text above that CMake group is correct. Especially with CMake, linking to either one is sufficient,
benchmark::benchmark_main will pull in the benchmark::benchmark.

@LebedevRI LebedevRI added help wanted docs documentation update needed labels Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs documentation update needed help wanted
Projects
None yet
Development

No branches or pull requests

2 participants