Skip to content

iox-2343 Add Findacl.cmake to setup libacl dependency - #2537

Open
Functionhx wants to merge 2 commits into
eclipse-iceoryx:mainfrom
Functionhx:iox-2343-find-acl-cmake-module
Open

iox-2343 Add Findacl.cmake to setup libacl dependency#2537
Functionhx wants to merge 2 commits into
eclipse-iceoryx:mainfrom
Functionhx:iox-2343-find-acl-cmake-module

Conversation

@Functionhx

@Functionhx Functionhx commented Jul 12, 2026

Copy link
Copy Markdown

Notes for Reviewer

Simple CMake find module to replace hardcoded -lacl. Tested with non-standard install prefixes.

Pre-Review Checklist for the PR Author

  1. Code follows the coding style of CONTRIBUTING.md
  2. Tests follow the best practice for testing
  3. Changelog updated in the unreleased section
  4. Branch follows the naming format (iox-2343-find-acl-cmake-module)
  5. Commits messages are according to this guideline
    • Commit messages have the issue ID (iox-#123 commit text)
    • Commit author matches [Eclipse Contributor Agreement][eca] (and ECA is signed)
  6. Update the PR title
  7. Relevant issues are linked
  8. Add sensible notes for the reviewer
  9. All checks have passed (except task-list-completed)
  10. Assign PR to reviewer

References

Fixes #2343.
Replaces #2536 (closed due to branch rename).

Checklist for the PR Reviewer

  • Consider a second reviewer for complex new features or larger refactorings
  • Commits are properly organized and messages are according to the guideline
  • Code according to our coding style and naming conventions
  • Unit tests have been written for new behavior
  • Public API changes are documented via doxygen
  • Copyright owner are updated in the changed files
  • All touched (C/C++) source code files from iceoryx_hoofs have been added to ./clang-tidy-diff-scans.txt
  • PR title describes the changes

Post-review Checklist for the PR Author

  1. All open points are addressed and tracked via issues

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>
@Functionhx
Functionhx force-pushed the iox-2343-find-acl-cmake-module branch from 4435505 to 794641f Compare July 12, 2026 04:54
elBoberido
elBoberido previously approved these changes Jul 13, 2026

@elBoberido elBoberido left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.87%. Comparing base (bc57364) to head (0754030).

Additional details and impacted files

Impacted file tree graph

@@           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           
Flag Coverage Δ
unittests 77.70% <ø> (ø)
unittests_timing 15.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@elBoberido

Copy link
Copy Markdown
Member

@Functionhx it seems Ubuntu does not like the changes

@Functionhx

Copy link
Copy Markdown
Author

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.

OK,I'll dig deeper in version2,do my best to make meaningful contribution to it!

@elBoberido elBoberido left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@Functionhx
Functionhx force-pushed the iox-2343-find-acl-cmake-module branch from fbcaf8b to 0754030 Compare July 17, 2026 06:02
@Functionhx

Copy link
Copy Markdown
Author

Thank for your remind,Now the ECA Passed!

@elBoberido

Copy link
Copy Markdown
Member

@Functionhx can you also please adjust the last commit message with the prepended issue number, similar to the first commit message.

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 this pull request may close these issues.

Use a Findacl.cmake to setup the dependency to libacl

2 participants