Update README after PR 2200 (#2381)

PR2200 made the presence of spirv-as and spirv-val mandatory.

Reflect this fact in the Readme and update the example build
instructions
This commit is contained in:
AlexGalazin-IMG
2025-05-06 17:41:41 +01:00
committed by GitHub
parent 3f7889bdbd
commit d3b043a891

View File

@@ -14,6 +14,9 @@ Compiling the CTS requires the following CMake configuration options to be set:
* `CL_INCLUDE_DIR` Points to the unified
[OpenCL-Headers](https://github.com/KhronosGroup/OpenCL-Headers).
* `CL_LIB_DIR` Directory containing the OpenCL library to build against.
* `SPIRV_TOOLS_DIR` Directory containing the `spirv-as` and `spirv-val` binaries
to be used in the CTS build process. Alternatively, the location to these binaries
can be provided via the `PATH` variable.
* `OPENCL_LIBRARIES` Name of the OpenCL library to link.
It is advised that the [OpenCL ICD-Loader](https://github.com/KhronosGroup/OpenCL-ICD-Loader)
@@ -29,16 +32,26 @@ a build, and compile.
git clone https://github.com/KhronosGroup/OpenCL-CTS.git
git clone https://github.com/KhronosGroup/OpenCL-Headers.git
git clone https://github.com/KhronosGroup/OpenCL-ICD-Loader.git
git clone https://github.com/KhronosGroup/SPIRV-Tools.git
git clone https://github.com/KhronosGroup/SPIRV-Headers.git SPIRV-Tools/external/spirv-headers
git clone https://github.com/google/effcee.git SPIRV-Tools/external/effcee
git clone https://github.com/google/re2.git SPIRV-Tools/external/re2
mkdir OpenCL-ICD-Loader/build
cmake -S OpenCL-ICD-Loader -B OpenCL-ICD-Loader/build \
-DOPENCL_ICD_LOADER_HEADERS_DIR=$PWD/OpenCL-Headers
cmake --build ./OpenCL-ICD-Loader/build --config Release
mkdir SPIRV-Tools/build
cmake -S SPIRV-Tools -B SPIRV-Tools/build -DSPIRV_SKIP_TESTS=ON
cmake --build SPIRV-Tools/build --config Release
mkdir OpenCL-CTS/build
cmake -S OpenCL-CTS -B OpenCL-CTS/build \
-DCL_INCLUDE_DIR=$PWD/OpenCL-Headers \
-DCL_LIB_DIR=$PWD/OpenCL-ICD-Loader/build \
-DSPIRV_TOOLS_DIR=$PWD/SPIRV-Tools/build/tools/ \
-DOPENCL_LIBRARIES=OpenCL
cmake --build OpenCL-CTS/build --config Release
```