iox-2343 Add Findacl.cmake to setup libacl dependency - #2537
Conversation
Replace the hardcoded ACL_LIB=acl (which is passed as raw -lacl) with a proper Findacl.cmake module that uses find_package(acl). This allows the build system to detect libacl at configure time and supports non-standard install locations via CMAKE_PREFIX_PATH. The Findacl.cmake module: - Locates sys/acl.h via find_path - Locates libacl via find_library - Creates imported target acl::libacl - Uses FindPackageHandleStandardArgs for REQUIRED/QUIET support The iceoryx_platform CMakeLists.txt now adds its cmake/ directory to CMAKE_MODULE_PATH, calls find_package(acl REQUIRED) when IOX_PLATFORM_FEATURE_ACL is ON, and links against acl::libacl instead of the raw library name. Test Plan: Verified cmake configuration with the following command: cmake ../iceoryx_meta -DBUILD_TEST=OFF -DBINDING_C=OFF -DEXAMPLES=OFF -DINTROSPECTION=OFF Configuration succeeded with libacl found via Findacl.cmake. Signed-off-by: Functionhx <2994114386@qq.com>
4435505 to
794641f
Compare
elBoberido
left a comment
There was a problem hiding this comment.
Looks good. If the CI is green, this can be merged.
But be aware that there mist probably won't be any new major release of iceoryx classic, since our focus has fully shifted to iceoryx2, which is more robust, performant and feature rich than iceoryx classic.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2537 +/- ##
=======================================
Coverage 77.87% 77.87%
=======================================
Files 446 446
Lines 16301 16301
Branches 2320 2320
=======================================
Hits 12695 12695
Misses 2759 2759
Partials 847 847
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
@Functionhx it seems Ubuntu does not like the changes |
OK,I'll dig deeper in version2,do my best to make meaningful contribution to it! |
elBoberido
left a comment
There was a problem hiding this comment.
Looks good. Can you check your last commit. It seems it was committed with an email address that is not connected to an ECA. Also, the format of the commit message needs adjustments.
Install Findacl.cmake alongside package config files and add find_dependency(acl) to Config.cmake.in before including the exported targets file, so that acl::libacl target is available when downstream consumers use find_package(iceoryx_platform). Fixes CI failures on Ubuntu where the installed package config referenced acl::libacl but the target was never created. Signed-off-by: Yuchen Fan <functionhx@gmail.com>
fbcaf8b to
0754030
Compare
|
Thank for your remind,Now the ECA Passed! |
|
@Functionhx can you also please adjust the last commit message with the prepended issue number, similar to the first commit message. |
Notes for Reviewer
Simple CMake find module to replace hardcoded -lacl. Tested with non-standard install prefixes.
Pre-Review Checklist for the PR Author
iox-#123 commit text)References
Fixes #2343.
Replaces #2536 (closed due to branch rename).
Checklist for the PR Reviewer
Post-review Checklist for the PR Author