rapids_export_cpm

Added in version v21.06.00.

Record a given <PackageName> found by CPMFindPackage is required for a given export set

rapids_export_cpm( (BUILD|INSTALL)
                    <PackageName>
                    <ExportSet>
                    CPM_ARGS <standard cpm args>
                    [GLOBAL_TARGETS <targets...>]
                    )

Records a given <PackageName> found by CPMFindPackage is required for a given export set. When the associated rapids_export(BUILD|INSTALL) or rapids_export_write_dependencies(BUILD|INSTALL) command is invoked the generated information will include a CPMFindPackage() call for <PackageName>.

BUILD

Will record <PackageName> is part of the build directory export set

INSTALL

Will record <PackageName> is part of the build directory export set

Note

It is an anti-pattern to use this command with INSTALL as most CMake based projects should be installed, and rapids_export_package(INSTALL() used to find it. Only use rapids_export_cpm(INSTALL() when the above pattern doesn’t work for some reason.