19.2.4. Configure the Build Options - 5.2 English - 57404

AOCL User Guide (57404)

Document ID
57404
Release Date
2025-12-29
Version
5.2 English

There are multiple CMake options you can configure. The following sections explain the CMake options to:

  1. Include or exclude individual AOCL libraries (see CMake Options to Select Libraries).

  2. Provide the source code for the selected libraries by using one of the following options:

    1. Setting the path of the AOCL libraries source code (see CMake Options to Set Library Source Path)

    2. Setting the GIT repository and tag or branch name (see CMake Options to Set GIT Repository and Tag/Branch)

  3. Static or Shared Library:

    1. Static Library -DBUILD_SHARED_LIBS=OFF

    2. Shared Library -DBUILD_SHARED_LIBS=ON (default)

  4. Select Data Type (LP64 or ILP64):

    1. LP64 -DENABLE_ILP64=OFF (default)

    2. ILP64 -DENABLE_ILP64=ON

  5. Enable or disable threading:

    1. Multithreading -DENABLE_MULTITHREADING=ON

    2. Single threading -DENABLE_MULTITHREADING=OFF (default)

  6. Link Desired OpenMP library using -DOpenMP_libomp_LIBRARY=<path to OpenMP library> when, -DENABLE_MULTITHREADING=ON.

Here is an example of a configuration command:

Linux

$ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF
-DENABLE_ILP64=OFF -DENABLE_AOCL_BLAS=ON -DENABLE_AOCL_UTILS=ON
-DENABLE_AOCL_LAPACK=ON -DENABLE_MULTITHREADING=ON -DOpenMP_libomp_LIBRARY=""
-DCMAKE_INSTALL_PREFIX=$PWD/install_package

Windows

$ cmake -S . -B build -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release
-DBUILD_SHARED_LIBS=OFF -DENABLE_ILP64=OFF -DENABLE_AOCL_BLAS=ON
-DENABLE_AOCL_UTILS=ON -DENABLE_AOCL_LAPACK=ON -DENABLE_MULTITHREADING=ON
-TClangCl -DCMAKE_INSTALL_PREFIX=%CD%/install_package
-DCMAKE_CONFIGURATION_TYPES=Release