CMake support

dpctl comes with the configuration file dpctl-config.cmake which is installed on the standard search path CMake uses to search for packages.

To build your extension that leverages dpctl, include the following line in your CMake script:

find_package("Dpctl" REQUIRED)

The “Dpctl” package exports the following variables:

Dpctl_INCLUDE_DIR

Location of headers for using dpctl in extensions

Dpctl_TENSOR_INCLUDE_DIR

Location of headers implementing SYCL kernels powering dpctl.tensor

An example of “CMakeLists.txt” file for building an extension could be found in examples/pybind11 folder in the project repository, or in sample-data-parallel-extensions repository.