-
Notifications
You must be signed in to change notification settings - Fork 6
[FIXUP] cmake: Improve interface libraries code #72
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
Conversation
Thanks for the renames. LGTM. |
Co-authored-by: Cory Fields <[email protected]> Co-authored-by: Vasil Dimov <[email protected]>
Co-authored-by: Cory Fields <[email protected]>
To configure CMake for cross-compiling, use `--toolchain depends/${HOST}/share/toolchain.cmake` command-line option.
Keep this commit at the top when rebasing.
7f844c1
to
1e6c90f
Compare
|
||
if(HARDENING) | ||
add_library(hardening INTERFACE) | ||
add_library(hardening_interface INTERFACE) | ||
target_link_libraries(core_interface INTERFACE hardening_interface) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this moved up here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make both lines visually connected. The benefit of interface libraries (EDIT: in comparison to keeping build options in variables) is that the target_link_libraries
command might be placed anywhere after the add_library
one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ACK 1e6c90f
Added a few minor fixes and improvements I found during rearranging the commit history. |
2dfd297
to
6b6394c
Compare
Please see #76. That PR is expected to got, not this one. There must be zero diff between them. |
67ceebb
to
203a3ab
Compare
Closing. See #76 (comment). |
We use interface libraries to encapsulate global / common / group build options. However, the current
cmake-staging
branch has a few issues:core
library is referenced in the "cmake: Check system symbols" commit, which comes before introducing it in the "cmake: Add platform-specific definitions and properties" one.get_target_interface
helper function shouldn't belong to theProcessConfigurations
module.This PR fixes all issues mentioned above.
Unfortunately, I failed to put this PR changes into the fixup / autosquash routine. So the plan is to undraft it just after the next sync to the master branch, then merge this PR and adjust the commit history in the following one.