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

Prefer keyword signature of CMake command target_link_libraries #2515

Closed
mloskot opened this issue Feb 4, 2021 · 4 comments · Fixed by #2533
Closed

Prefer keyword signature of CMake command target_link_libraries #2515

mloskot opened this issue Feb 4, 2021 · 4 comments · Fixed by #2533

Comments

@mloskot
Copy link
Member

mloskot commented Feb 4, 2021

This task is about a slight modernisation of the CMake configuration to use the keyword-based signatures.
The keyword signatures also make it explicit if a dependency is a build requirement and/or usage requirement.

The plain and keyword calls to target_link_libraries (and possibly other target_* commands) can not be mixed as per https://cmake.org/cmake/help/latest/policy/CMP0023.html
Otherwise, CMake issues errors

The plain signature for `target_link_libraries` has already been used with the target "xxx". 
All uses of `target_link_libraries with` a target must be either all-keyword or all-plain.

References

@kbevers
Copy link
Member

kbevers commented Feb 7, 2021

@mloskot Is this something you want to take a stab at? If so, it would be good get that done in time for 8.0.0RC1 which will be prepared around February 20th.

@mloskot
Copy link
Member Author

mloskot commented Feb 7, 2021

@kbevers Yes, I'm going to work on it this week

@kbevers
Copy link
Member

kbevers commented Feb 7, 2021

Awesome!

@mloskot
Copy link
Member Author

mloskot commented Feb 14, 2021

@kbevers I covered this in PR #2533

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants