Files
xahaud/cmake
John Freeman a390b10045 Enforce levelization in libxrpl with CMake (#5111)
Adds two CMake functions:

* add_module(library subdirectory): Declares an OBJECT "library" (a CMake abstraction for a collection of object files) with sources from the given subdirectory of the given library, representing a module. Isolates the module's headers by creating a subdirectory in the build directory, e.g. .build/tmp123, that contains just a symlink, e.g. .build/tmp123/basics, to the module's header directory, e.g. include/xrpl/basics, in the source directory, and putting .build/tmp123 (but not include/xrpl) on the include path of the module sources. This prevents the module sources from including headers not explicitly linked to the module in CMake with target_link_libraries.
* target_link_modules(library scope modules...): Links the library target to each of the module targets, and removes their sources from its source list (so they are not compiled and linked twice).

Uses these functions to separate and explicitly link modules in libxrpl:

    Level 01: beast
    Level 02: basics
    Level 03: json, crypto
    Level 04: protocol
    Level 05: resource, server
2025-06-19 23:06:46 +09:00
..
2025-06-17 18:22:13 +09:00
2025-06-17 21:45:05 +09:00
2025-06-17 18:22:13 +09:00
2025-06-17 18:22:13 +09:00
2025-06-17 18:22:13 +09:00
2025-06-17 18:22:13 +09:00
2025-06-17 18:22:13 +09:00
2025-06-17 23:58:07 +09:00
2025-06-17 18:22:13 +09:00
2025-06-17 18:22:13 +09:00
2025-06-17 18:22:13 +09:00
2025-06-17 18:22:13 +09:00
2025-06-17 18:22:13 +09:00
2025-06-17 18:22:13 +09:00
2025-06-17 21:45:05 +09:00

These are modules and sources that support our CMake build.

== FindBoost.cmake ==

In order to facilitate updating to latest releases of boost, we've made a local copy of the FindBoost cmake module in our repo. The latest official version can generally be obtained here.

The latest version provided by Kitware can be tailored for use with the version of CMake that it ships with (typically the next upcoming CMake release). As such, the latest version from the repository might not work perfectly with older versions of CMake - for instance, the latest version might use features or properties only available in the version of CMake that it ships with. Given this, it's best to test any updates to this module with a few different versions of cmake.