Copy link
Copy Markdown
Contributor
Fixes CMake Generator Expression Issue with a system with no OpenCL installed compiles arrayfire without the OpenCL backend
Description
- Is this a new feature or a bug fix?: Bug Fix
- Why these changes are necessary: Fixes CMake Build
- Potential impact on specific hardware, software or backends: Allows building non OpenCL ArrayFire backends without OpenCL installed in Linux
- New functions and their functionality: None
- Can this PR be backported to older versions?: Yes
- Future changes not implemented in this PR: None
Fixes: #3528
Changes to Users
- No options added to the build
- No action required by the user
Checklist
- Rebased on latest master
- Code compiles
- Tests pass
- Functions added to unified API
- Functions documented
Copy link
Copy Markdown
Is it also necessary to remove the space in the cmake expressions on lines 46-47?
$<$<BOOL:${OpenCL_FOUND}>:${CMAKE_CURRENT_SOURCE_DIR}/opencl.cpp>
$<$<BOOL:${CUDA_FOUND}>:${CMAKE_CURRENT_SOURCE_DIR}/cuda.cpp>
Copy link
Copy Markdown
Contributor Author
@HugoPhibbs It's not necessary. The problem reported was caused due to cmake generator expressions behaving weirdly with whitespace. See documentation. But I'll update those lines too, for consistency.