Skip to content

Generated CMake file hardcodes path to librt.so #824

Description

@pitrou

The file build/src/CMakeFiles/Export/lib/cmake/benchmark/benchmarkTargets.cmake which is generated when building gbenchmark contains the following code on Linux:

set_target_properties(benchmark::benchmark PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
  INTERFACE_LINK_LIBRARIES "-pthread;/usr/lib/x86_64-linux-gnu/librt.so"
)

Instead of hard-coding the path to librt.so it should probably use -lrt. This is causing issues for conda packages (see conda-forge/benchmark-feedstock#5 (comment)).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions