[Build] Syntax error in CMake generator expression for OpenCL
envgap__arrayfire__arrayfire-3528
01 / FAILURE SIGNATURE
As reported upstream
Removing the space character fixes the error, i.e.:
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
f4db00f2cc57272f16f0e7e8534f65c2a895cfda- Manifest
src/api/unified/CMakeLists.txt- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
arrayfire/arrayfire #3528 · read the original issue
https://github.com/arrayfire/arrayfire/blob/4061db86e66306995175a14cf906c55c35373918/src/api/unified/CMakeLists.txt#L85
In case OpenCL is not found, the evaluation is broken, as apparently CMake is unhappy due to the extra space after the colon.
With the extra space CMake fails to do lazy evaluation of the right-hand side, and complains about the non-existing OpenCL::OpenCL target.
Removing the space character fixes the error, i.e.:
` $<$<BOOL:${OpenCL_FOUND}>:$<TARGET_PROPERTY:OpenCL::OpenCL,INTERFACE_INCLUDE_DIRECTORIES>>`
BTW, the "OpenCL_Found" check here and elsewhere is probably wrong, and should use "AF_BUILD_OPENCL" instead.04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]