[FIXUP] cmake: Improve interface libraries code#72
Closed
hebasto wants to merge 51 commits into
Closed
Conversation
Owner
Author
|
Thanks for the renames. LGTM. |
Co-authored-by: Cory Fields <cory-nospam-@coryfields.com> Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
Co-authored-by: Cory Fields <cory-nospam-@coryfields.com>
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
sedited
reviewed
Jan 9, 2024
| if(HARDENING) | ||
| add_library(hardening INTERFACE) | ||
| add_library(hardening_interface INTERFACE) | ||
| target_link_libraries(core_interface INTERFACE hardening_interface) |
Owner
Author
There was a problem hiding this comment.
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.
sedited
approved these changes
Jan 9, 2024
Owner
Author
|
Added a few minor fixes and improvements I found during rearranging the commit history. |
2dfd297 to
6b6394c
Compare
Owner
Author
Please see #76. That PR is expected to got, not this one. There must be zero diff between them. |
67ceebb to
203a3ab
Compare
Owner
Author
|
Closing. See #76 (comment). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We use interface libraries to encapsulate global / common / group build options. However, the current
cmake-stagingbranch has a few issues:corelibrary 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_interfacehelper function shouldn't belong to theProcessConfigurationsmodule.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.