feat(cpp): improve CMake configuration for portable distribution and …#906
feat(cpp): improve CMake configuration for portable distribution and …#906shivendra-dev54 wants to merge 10 commits intoapache:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #906 +/- ##
=========================================
Coverage 80.60% 80.60%
Complexity 615 615
=========================================
Files 94 94
Lines 10709 10709
Branches 1055 1055
=========================================
Hits 8632 8632
Misses 1837 1837
Partials 240 240
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@yangxk1 can you please give this a look |
The current CI has some issues. Maybe we should fix the CI first before considering merging the existing PRs. What do you think? |
|
After #908 merged , the CI can pass. |
…ists merged to fix the github workflows
|
@yangxk1 |
Reason for this PR
This PR addresses #810 to improve the portability and installation of the GraphAr C++ library. The current setup makes it difficult for downstream projects to use
find_package(graphar), which this update resolves by modernizing the CMake export logic.What changes are included in this PR?
graphar::grapharnamespace viainstall(EXPORT).PUBLICvisibility to ensure proper propagation to consumers.GNUInstallDirsfor standard-compliant paths.CMAKE_INSTALL_RPATHusing$ORIGIN(Linux) and@loader_path(macOS) to ensure the library is relocatable.graphar-config.in.cmakeusing@PACKAGE_INIT@andfind_dependencyfor robust downstream resolution.GRAPHAR_LIBRARIESandGRAPHAR_INCLUDE_DIRvariables.Are these changes tested?
ctest).make installgenerates a valid relocatable file structure.find_package(graphar REQUIRED).Are there any user-facing changes?
Yes. Users can now integrate GraphAr into their own projects using the standard CMake pattern: