-
Notifications
You must be signed in to change notification settings - Fork 135
IGNITE-27263 C++ Client: Create cmake config file #7300
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
Conversation
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.
Pull request overview
This PR implements CMake package configuration support for the Apache Ignite C++ Client and ODBC libraries, enabling consumers to find and use these libraries via CMake's find_package() mechanism. The implementation includes config file generation, component-based discovery, pkg-config support, and comprehensive integration tests.
Changes:
- Added CMake config files (ignite-config.cmake.in and ignite-config-version.cmake.in) for package discovery
- Created pkg-config (.pc) files for both client and ODBC components
- Modified library CMakeLists to export targets with proper namespaces and include directories
- Added three integration test configurations to verify package discovery in different scenarios
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/platforms/cpp/CMakeLists.txt | Added package config generation, version file creation, and installation rules |
| modules/platforms/cpp/cmake/ignite-config.cmake.in | Package configuration template for component-based discovery |
| modules/platforms/cpp/cmake/ignite-config-version.cmake.in | Version compatibility template (currently unused) |
| modules/platforms/cpp/pkgconfig/*.pc.in | Pkg-config templates for client and ODBC libraries |
| modules/platforms/cpp/pkgconfig/CMakeLists.txt | Build rules for pkg-config file generation |
| modules/platforms/cpp/ignite/client/CMakeLists.txt | Export configuration for client library with namespaced targets |
| modules/platforms/cpp/ignite/odbc/CMakeLists.txt | Export configuration for ODBC library with namespaced targets |
| modules/platforms/cpp/ignite/common/CMakeLists.txt | Updated include directory configuration for exportable targets |
| modules/platforms/cpp/ignite/protocol/CMakeLists.txt | Changed link visibility to PUBLIC for dependencies |
| modules/platforms/cpp/ignite/tuple/CMakeLists.txt | Removed redundant install command |
| modules/platforms/cpp/cmake/dependencies.cmake | Fixed path reference for config file |
| modules/platforms/cpp/tests/package-test/*.cpp | Simple linkage test programs for client and ODBC |
| modules/platforms/cpp/tests/package-test/*/CMakeLists.txt | Test configurations for three integration scenarios |
| modules/platforms/cpp/tests/package-test/README.md | Documentation for package tests |
| modules/platforms/cpp/tests/fake_server/CMakeLists.txt | Added explicit msgpack-c dependency |
| modules/platforms/cpp/ignite/odbc/config/config_tools_test.cpp | Fixed include path |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9109e50 to
488ecaa
Compare
This PR adds cmake config files suitable for the
find_package()cmake routine.This PR covers 3 different cases:
Also INSTALL_IGNITE_FILES option removed in this PR because it does not have much sense. Installation controlled by the called target and not an option. Also, install calls needed in the cmake to generate and export cmake targets files properly.
Cmake config files will be added to the installation packages in the next task: https://issues.apache.org/jira/browse/IGNITE-27579
Thank you for submitting the pull request.
To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:
The Review Checklist
- There is a single JIRA ticket related to the pull request.
- The web-link to the pull request is attached to the JIRA ticket.
- The JIRA ticket has the Patch Available state.
- The description of the JIRA ticket explains WHAT was made, WHY and HOW.
- The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
Notes