rapids_cpm_fmt

New in version v23.04.00.

Allow projects to find or build fmt via CPM with built-in tracking of these dependencies for correct export support.

Uses the version of fmt specified in the version file for consistency across all RAPIDS projects.

rapids_cpm_fmt( [BUILD_EXPORT_SET <export-name>]
                [INSTALL_EXPORT_SET <export-name>]
                [<CPM_ARGS> ...])
BUILD_EXPORT_SET

Record that a CPMFindPackage() for fmt is required in our build directory export set.

INSTALL_EXPORT_SET

Record that a find_dependency() for fmt is required in our install directory export set.

Note

Installation of fmt will occur if an INSTALL_EXPORT_SET is provided, and fmt is added to the project via add_subdirectory by CPM.

CPM_ARGS

Any arguments after CPM_ARGS will be forwarded to the underlying fmt CPMFindPackage`() call

Result Targets

fmt::fmt, fmt::fmt-header-only targets will be created

Result Variables

fmt_SOURCE_DIR is set to the path to the source directory of fmt. fmt_BINARY_DIR is set to the path to the build directory of fmt. fmt_ADDED is set to a true value if fmt has not been added before. fmt_VERSION is set to the version of fmt specified by the versions.json.