[CMake] Fix RPATH issues in build system#138
[CMake] Fix RPATH issues in build system#138zacharyvincze wants to merge 6 commits intoROCm:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates rocCV’s CMake packaging/build configuration to improve in-tree runnable artifacts (tests/samples/benchmarks/python module) by standardizing output directories and setting build/install RPATHs, while also tightening roccv’s exported dependency surface.
Changes:
- Standardize runtime/library output locations for tests, samples, benchmarks, and the Python module.
- Add/adjust
BUILD_RPATHandINSTALL_RPATHto improve runtime library discovery (especially for ROCm/LLVM libs). - Make OpenMP a private dependency of
roccvand expose C++20 via target compile features; addroccv_VERSIONin the package config.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/roccv/cpp/CMakeLists.txt | Redirect test executables to bin/tests/... and add build RPATH. |
| src/CMakeLists.txt | Make OpenMP private, publish C++20 requirement, and revise build/install RPATHs for libroccv. |
| samples/CMakeLists.txt | Set samples output dir and build RPATH in the sample helper function. |
| samples/cropandresize/cpp/CMakeLists.txt | Set sample app output dir and build RPATH. |
| benchmarks/CMakeLists.txt | Set benchmark output dir and build RPATH. |
| python/CMakeLists.txt | Set python module output dir and adjust build/install RPATH. |
| cmake/roccvConfig.cmake.in | Export roccv_VERSION and remove OpenMP as a transitive dependency. |
| CHANGELOG.md | Mark 0.5.0 as “Unreleased” and document OpenMP visibility change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Review: [CMake] Fix RPATH issues in build systemThis PR improves the build system configuration: Changes:
Assessment: LGTM - Build system improvements are always welcome. Proper RPATH handling makes the library more portable and easier to use. Moving OpenMP to private linkage is correct - consumers should not need to link it transitively. Would benefit from CI testing on different Linux distributions to ensure the RPATH logic works across environments. |
Changes
OpenMPdependency to private for roccv target.binandlibfolders in build tree.