New in version v21.10.00.
Allow projects to find or build spdlog via CPM with built-in tracking of these dependencies for correct export support.
Uses the version of spdlog specified in the version file for consistency across all RAPIDS projects.
rapids_cpm_spdlog( [FMT_OPTION <fmt-option-name>] [BUILD_EXPORT_SET <export-name>] [INSTALL_EXPORT_SET <export-name>] [<CPM_ARGS> ...])
.. versionadded:: v23.04.00
Spdlog depends on the fmt library and offers multiple ways of handling this dependency when spdlog is built. This option only controls the behavior when spdlog is fetched and built, NOT when an installed spdlog is found on the system.
This option can be set to: BUNDLED, EXTERNAL_FMT, EXTERNAL_FMT_HO, or STD_FORMAT. If set to BUNDLED, then spdlog will use its own bundled version of fmt. If set to EXTERNAL_FMT then spdlog will use the fmt::fmt target and be linked with the fmt library. If set to EXTERNAL_FMT_HO then spdlog will use the fmt::fmt-header-only target and be linked with a header only fmt library. If set to STD_FORMAT then spdlog will use std::format instead of the fmt library.
Defaults to EXTERNAL_FMT_HO.
Record that a
CPMFindPackage()for spdlog is required in our build directory export set.
Record that a
find_dependency()for spdlog is required in our install directory export set.
Installation of spdlog will occur if an INSTALL_EXPORT_SET is provided, and spdlog
is added to the project via
add_subdirectory by CPM.
Any arguments after CPM_ARGS will be forwarded to the underlying spdlog
spdlog::spdlog, spdlog::spdlog_header_only targets will be created
spdlog_SOURCE_DIRis set to the path to the source directory of spdlog.
spdlog_BINARY_DIRis set to the path to the build directory of spdlog.
spdlog_ADDEDis set to a true value if spdlog has not been added before.
spdlog_VERSIONis set to the version of spdlog specified by the versions.json.
spdlog_fmt_targetis set to the fmt target used, if used