Skip to content

Documentation error or CMake error when linking #333

Closed

Description

@ashley-b

When trying to link to this library the docs say the target name should be CpuFeature::cpu_features
https://github.com/google/cpu_features/tree/main/cmake
But it is exported as CpuFeatures

NAMESPACE CpuFeatures::

Internal it is correct
add_library(CpuFeature::cpu_features ALIAS cpu_features)

So am unsure if this is a bug or a documentation error

Activity

  1. Mizux commented on Sep 14, 2023

    @Mizux
    Collaborator

    Typo issue ! Good catch I would go with the 's' and change the ALIAS so for installed cpu_features it won't change but for using add_subdirectory()/FetchContent() you'll have to change if using the alias...

    note: doc

    3- Add the `CpuFeature::cpu_features` target to the `target_link_libraries()` section of

    CI Sample using the install "export"

    target_link_libraries(sample PRIVATE CpuFeatures::cpu_features)

  2. added
    bug
    cmake
    on Sep 14, 2023
  3. added 2 commits that reference this issue on Sep 14, 2023
    c481901
    982ae38
  4. added this to the v0.9.0 milestone on Sep 14, 2023
  5. gchatelet commented on Sep 14, 2023

    @gchatelet
    Collaborator

    Thx for noticing @ashley-b !

  6. added a commit that references this issue on Feb 17, 2024
    688decf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugcmakedocumentation

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions