google/benchmark

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

Fechada

#1.856 aberto em 18 de set. de 2024

 (1 comentário) (0 reação) (0 responsável)C++ (1.539 forks)batch import
docshelp wanted

Métricas do repositório

Stars
 (7.968 estrelas)
Métricas de merge de PR
 (Mesclagem média 4d 2h) (19 fundiu PRs em 30d)

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.

Guia do colaborador