Complete the following steps to prepare the project with CMake GUI:
Install AOCL-BLAS, AOCL-LAPACK, and AOCL-Utils.
Define the environment variable
AOCL_ROOTto point to the AOCL Libs installation:$ set AOCL_ROOT="C:\Program Files\AMD\AOCL-Windows"
For the cases where
AOCL_ROOTcannot be exported by placing AOCL-BLAS, AOCL-LAPACK, and AOCL-Utils libraries in the same path, define the following variables during CMake configuration in cmake-gui to point to the corresponding libraries and headers:AOCL_BLIS_LIBAOCL_LIBFLAMEAOCL_UTILS_LIBAOCL_BLIS_INCLUDE_DIRAOCL_LIBFLAME_INCLUDE_DIRAOCL_UTILS_INCLUDE_DIR
Launch CMake GUI using the Windows command line:
$ cmake-guiSet the source (folder containing the AOCL-Sparse source code) and build (folder in which the project files will be generated) folder paths. It is not recommended to use the folder named build as it is already used for Linux build system.
Click on the Configure button to prepare the project options.
Set the generator to Visual Studio 17 2022 and the platform toolset to clangCl:
Figure 17.1 Specify Generator#
Update the options based on the project requirements. All the available options are listed in AOCL-Sparse - CMake Build Options. Select the available and recommended options as follows:
Figure 17.2 AOCL-Sparse CMake Config Options#
Click the Generate button and then Open Project.
Complete the following steps in Microsoft Visual Studio GUI:
Open the AOCL-Sparse Visual Studio project from the build folder using the
aoclsparse.slnfile or the Open Project button in CMake GUI.To generate the AOCL-Sparse binaries, choose the appropriate build configuration Debug or Release and then build the AOCL-Sparse project. The library files would be generated at
<build_dir>\library\Release.