Added CMake presets for Boost, AWS SDK C++ and main application#55
Merged
percona-ysorokin merged 1 commit intomainfrom Mar 22, 2025
Merged
Added CMake presets for Boost, AWS SDK C++ and main application#55percona-ysorokin merged 1 commit intomainfrom
percona-ysorokin merged 1 commit intomainfrom
Conversation
All 3 projects now have the following CMake presets
* 'debug_gcc13' - Debug configuration for GCC 13 toolset
* 'release_gcc13' - RelWithDebInfo configuration for GCC 13 toolset
* 'asan_gcc13' - Debug configuration with Address Sanitizer enabled for GCC 13 toolset
* 'debug_clang17' - Debug configuration for Clang 17 toolset
* 'release_clang17' - RelWithDebInfo configuration for Clang 17 toolset
* 'asan_clang17' - Debug configuration with Address Sanitizer enabled for Clang 17 toolset
For each project ('boost', 'aws-sdk-cpp' and 'percona-binlog-server')
you can now enter its source directory
cd <project_name>
and run
cmake . --preset <preset_name>
and a new directory
<project_name>-build-<preset_name> will appear alongside <project_name>
After that, in order to build, you can run
cmake --build <project_name>-build-<preset_name> --parallel
And finally, to install it you can run
cmake --install <project_name>-build-<preset_name>
CMakePresets.json for the main project is put into the root of the source tree, alongside CMakeLists.txt.
For Boost and AWS SDK C++ the files are put into the
'extra/cmake_presets' directory under corresponding subdirectories.
Before starting configuring Boost / AWS SDK C++ these files need to
be copied / symlinked into the roots of those project source trees.
Significantly reworked GitHub Actions .yml file.
* In order to keep build options in one place, GitHub Actions now also
use CMake presets.
* Fetching main project's source code is now performed before building
dependency libraries. It is necessary because we need to have access
to the dependency libraries CMakePresets.json files earlier.
* Added "Info CMake" action that prints CMake version
Changed the way how we instruct main application to look for Boost
libraries during the configuration stage. Instead of specifying
'Boost_ROOT', we now use 'CMAKE_PREFIX_PATH' to specify a path
where CMake can find 'BoostConfig.cmake'. This helps to avoid some
CMake warnings generated in newer (>=3.30.0) versions of cmake.
Updated build instructions in README.md to reflect CMake presets
changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All 3 projects now have the following CMake presets
For each project ('boost', 'aws-sdk-cpp' and 'percona-binlog-server') you can now enter its source directory
cd <project_name>
and run
cmake . --preset <preset_name>
and a new directory
<project_name>-build-<preset_name> will appear alongside <project_name> After that, in order to build, you can run
cmake --build <project_name>-build-<preset_name> --parallel And finally, to install it you can run
cmake --install <project_name>-build-<preset_name>
CMakePresets.json for the main project is put into the root of the source tree, alongside CMakeLists.txt. For Boost and AWS SDK C++ the files are put into the 'extra/cmake_presets' directory under corresponding subdirectories. Before starting configuring Boost / AWS SDK C++ these files need to be copied / symlinked into the roots of those project source trees.
Significantly reworked GitHub Actions .yml file.
Changed the way how we instruct main application to look for Boost libraries during the configuration stage. Instead of specifying 'Boost_ROOT', we now use 'CMAKE_PREFIX_PATH' to specify a path where CMake can find 'BoostConfig.cmake'. This helps to avoid some CMake warnings generated in newer (>=3.30.0) versions of cmake.
Updated build instructions in README.md to reflect CMake presets changes.