Developer Guide

Developer Guide for Intel® oneAPI Math Kernel Library Linux*

ID 766690
Date 10/31/2024
Public
Document Table of Contents

Using the CMake Config File

Intel® oneAPI Math Kernel Library (oneMKL) ships with a CMake config file for easy integration of oneMKL into user-applications that already use CMake. This is a Config-mode file that you can use in find_package() macros. For different package modes, refer to find_package CMake documentation.

MKLConfig.cmake is in <MKLROOT>/lib/cmake/mkl. If CMake cannot find it by default, you can specify its path as -DMKL_DIR=<MKLROOT>/lib/cmake/mkl in the cmake configure command. The top of the file contains an up-to-date usage comment-block for reference, and you can unpack <MKLROOT>/share/doc/mkl/examples/*.tgz and then refer to <MKLROOT>/share/doc/mkl/examples/<type>/CMakeLists.txt for more details about how to consume MKLConfig.cmake in CMake projects.