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

Documentation error or CMake error when linking #333

Closed
ashley-b opened this issue Sep 14, 2023 · 2 comments
Closed

Documentation error or CMake error when linking #333

ashley-b opened this issue Sep 14, 2023 · 2 comments
Assignees
Labels
bug Something isn't working cmake CMake related issue documentation
Milestone

Comments

@ashley-b
Copy link

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

@Mizux
Copy link
Collaborator

Mizux commented Sep 14, 2023

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)

@gchatelet
Copy link
Collaborator

Thx for noticing @ashley-b !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cmake CMake related issue documentation
Projects
None yet
Development

No branches or pull requests

3 participants