Skip to content

Fix for issue 3528: cmake generator expression space removed #3554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

edwinsolisf
Copy link
Contributor

@edwinsolisf edwinsolisf commented May 31, 2024

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

@HugoPhibbs
Copy link

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>

@edwinsolisf
Copy link
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.

@christophe-murphy christophe-murphy merged commit 773c96b into arrayfire:master Aug 30, 2024
2 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Build] Syntax error in CMake generator expression for OpenCL
3 participants