Skip to content
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

FindOpenCL.cmake mismatch with the official cmake module #2594

Closed
ddemidov opened this issue Apr 21, 2017 · 6 comments
Closed

FindOpenCL.cmake mismatch with the official cmake module #2594

ddemidov opened this issue Apr 21, 2017 · 6 comments

Comments

@ddemidov
Copy link
Contributor

CMake since v3.1 includes FindOpenCL.cmake.

The problem with the one that is included with HPX is that the official module exports OpenCL_INCLUDE_DIRS and OpenCL_LIBRARIES, while HPX one exports OPENCL_INCLUDE_DIRS and OPENCL_LIBRARIES (note the difference in capitalization). Both modules export OpenCL_FOUND though, so, when a project depends both on OpenCL and HPX, different set of variables will be available, depending on which comes first in CMakeLists.txt: find_package(OpenCL) or find_package(HPX). This may lead to interesting results when one expects one or the other naming convention.

I could try and replace OPENCL_* variable names with OpenCL_* ones throughout HPX cmake files. Would that be acceptable?

@ddemidov
Copy link
Contributor Author

Less intrusive option would be to just export both sets of variables from HPX FindOpenCL module.

@hkaiser
Copy link
Member

hkaiser commented Apr 21, 2017

Currently, none of the code in HPX depends on OpenCL. This file is an artifact, afaics. @mcopik Is that correct?

@hkaiser
Copy link
Member

hkaiser commented Apr 21, 2017

Moreover, none of the HPX cmake build system imports the FindOpenCL file. So I think it is safe to simply remove the file from HPX.

@hkaiser
Copy link
Member

hkaiser commented Apr 22, 2017

This was fixed by merging #2595

@hkaiser hkaiser closed this as completed Apr 22, 2017
@hkaiser hkaiser added this to the 1.0.0 milestone Apr 22, 2017
@ddemidov
Copy link
Contributor Author

Thanks!

@mcopik
Copy link
Contributor

mcopik commented Apr 26, 2017

@hkaiser Everything should be fine, CMake and SYCL have their own scripts for OpenCL. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants