-
Notifications
You must be signed in to change notification settings - Fork 179
Fix clockid include #1626
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
Merged
Fix clockid include #1626
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: fcitx/fcitx5
Length of output: 43046
🏁 Script executed:
Repository: fcitx/fcitx5
Length of output: 21724
🌐 Web query:
CMake target_link_libraries PRIVATE INTERFACE PUBLIC INTERFACE_INCLUDE_DIRECTORIES exported targets include directories💡 Result:
In CMake, the keywords PRIVATE, PUBLIC, and INTERFACE define how dependencies and their usage requirements (such as include directories) are propagated to other targets [1][2]. When using target_link_libraries, these keywords control the visibility of the link dependency and the propagation of its usage requirements [1][3]. PRIVATE The dependency is used only by the target itself for its own implementation [2][3]. It is not part of the target's public link interface, so consumers of the target do not need to link against this dependency, nor do they inherit its usage requirements (such as INTERFACE_INCLUDE_DIRECTORIES) [1][2]. INTERFACE The dependency is not linked into the target itself, but it is part of the target's link interface [1][3]. This means consumers of the target will inherit the dependency's usage requirements (including its INTERFACE_INCLUDE_DIRECTORIES) and will link against it, but the target itself does not use it for its own implementation [2][3]. PUBLIC This is a combination of PRIVATE and INTERFACE [2]. The dependency is linked into the target, and it is also part of the target's public link interface [1][3]. Consequently, both the target and any consumers of the target will link against it and inherit its usage requirements [1][2]. INTERFACE_INCLUDE_DIRECTORIES and Exported Targets The INTERFACE_INCLUDE_DIRECTORIES property is key to how CMake handles transitive usage requirements [4][5]. When a target is exported via install(EXPORT) or export, CMake automatically generates IMPORTED targets [5]. These generated targets carry the appropriate usage requirements—such as INTERFACE_INCLUDE_DIRECTORIES—so that when a consumer links to these imported targets using target_link_libraries, CMake automatically provides the correct include paths required to compile against the dependency [4][5]. Best Practices It is highly recommended to always specify one of these keywords when using target_link_libraries, as relying on the legacy keywordless signature (which defaults to PUBLIC) can lead to unintended propagation of dependencies and headers [6][3]. When setting include directories, use target_include_directories with the same scoping keywords (PRIVATE, PUBLIC, INTERFACE) to ensure the target's own headers are properly exposed to its consumers [7][8]. Avoid hard-coding absolute paths to dependencies in your export configurations; instead, rely on the INTERFACE_INCLUDE_DIRECTORIES properties of the imported dependency targets themselves [7][5][8].
Citations:
Make
Pthread::Pthreadpart of Fcitx5Utils’ public usage requirements.src/lib/fcitx-utils/CMakeLists.txt:153linksPthread::PthreadwithPRIVATE, so downstream targets that only consumeFcitx5::Utilsdo not inherit${PTHREAD_INCLUDE_DIR}. The public headers include<pthread.h>under_WIN32atsrc/lib/fcitx-utils/event.h,src/lib/fcitx-utils/event_libuv.h, andsrc/lib/fcitx-utils/eventloopinterface.h, so usePUBLIChere or link consumers directly.📍 Affects 3 files
src/lib/fcitx-utils/event.h#L19-L22(this comment)src/lib/fcitx-utils/event_libuv.h#L22-L25src/lib/fcitx-utils/eventloopinterface.h#L19-L22🤖 Prompt for AI Agents