Skip to content

Provide benchmark:: Aliased CMake LibraryΒ #921

Closed
@jwillikers

Description

@jwillikers

It's common to provide an aliased version of libraries that include the import prefix to make switching between find_package and add_subdirectory calls effortless. Because the benchmark::benchmark and benchmark::benchmark_main targets do not have aliased targets, users must switch between benchmark::benchmark and benchmark in target_link_libraries.
Adding an aliased library with CMake is as easy as:

add_library(benchmark::benchmark ALIAS benchmark)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions