← 返回首页
Fix for issue 3528: cmake generator expression space removed by edwinsolisf · Pull Request #3554 · arrayfire/arrayfire · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

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

Merged
christophe-murphy merged 1 commit into
arrayfire:masterfrom
edwinsolisf:issue3528
Aug 30, 2024
Merged

Fix for issue 3528: cmake generator expression space removed#3554
christophe-murphy merged 1 commit into
arrayfire:masterfrom
edwinsolisf:issue3528

Conversation

Copy link
Copy Markdown
Contributor

edwinsolisf commented May 31, 2024
edited
Loading

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.

christophe-murphy merged commit 773c96b into arrayfire:master Aug 30, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Footer

© 2026 GitHub, Inc.