Intel® oneAPI Collective Communications Library (oneCCL) Developer Guide and Reference
ID
772609
Date
3/24/2025
Public
A newer version of this document is available. Customers should click here to go to the newest version.
Visible to Intel only — GUID: GUID-6669DE7B-B572-4EAD-B0DA-1D5162F07B42
Use oneCCL package from CMake
oneCCLConfig.cmake and oneCCLConfigVersion.cmake are included into oneCCL distribution.
With these files, you can integrate oneCCL into a user project with the find_package command. Successful invocation of find_package(oneCCL <options>) creates imported target oneCCL that can be passed to the target_link_libraries command.
For example:
project(Foo) add_executable(foo foo.cpp) # Search for oneCCL find_package(oneCCL REQUIRED) # Connect oneCCL to foo target_link_libraries(foo oneCCL)
oneCCLConfig files generation
To generate oneCCLConfig files for oneCCL package, use the provided cmake/scripts/config_generation.cmake file:
cmake [-DOUTPUT_DIR=<output_dir>] -P cmake/script/config_generation.cmake