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

FindVexCL.cmake script #20

Merged
merged 3 commits into from
Jan 17, 2013
Merged

FindVexCL.cmake script #20

merged 3 commits into from
Jan 17, 2013

Conversation

raedwulf
Copy link
Contributor

I wrote a simple cmake script for finding the include headers - and it gets installed to /usr/share/vexcl/cmake/Modules.

Maybe useful for developers.

@ddemidov
Copy link
Owner

How will user find the findvexcl script?

Besides, the scripts only looks into standard include paths plus a user-defined path. Is this better than setting include_dirs manually?

@raedwulf
Copy link
Contributor Author

It was intended for the user to copy it into their project - because there's no real standard way of finding it... unless we copy it into /usr/share/cmake/Modules (but I do not think this is recommended - I have only noticed one project doing this on my system).

This allows for some shortcuts once you have FindVexCL.cmake in your module path:
For example:

find_package(VexCL REQUIRED) # automatically ensures that the headers must be included or else the build fails
######
find_package(VexCL)
if(VEXCL_FOUND) # this is automatically set after find_package
     # Do something if VexCL is found
endif()

These sort of checks need to be done manually otherwise - I don't know if this would best live in VexCL, but I find it generally useful.

@neapel
Copy link
Contributor

neapel commented Jan 17, 2013

When VexCL is installed through the CMake install target, the installation path could be hardcoded into FindVexCL.cmake using the configure_file command.

@ddemidov
Copy link
Owner

I think the intention is to copy the FindVexCL.cmake into ones project, same as we do with FindOpenCL.cmake. Hardcoded path would not help here.

ddemidov added a commit that referenced this pull request Jan 17, 2013
@ddemidov ddemidov merged commit 960d1cd into ddemidov:master Jan 17, 2013
@ddemidov
Copy link
Owner

For the same reason I am not sure if FindVexCL.cmake should be installed with the rest of the files.

@raedwulf
Copy link
Contributor Author

I agree, yes. Thanks!

@raedwulf
Copy link
Contributor Author

I guess it doesn't have to be installed - but it is in /usr/share/vexcl - where the examples live as well. Perhaps add a CMakeLists option to disable it?

@ddemidov
Copy link
Owner

Lets keep it with the examples then

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

Successfully merging this pull request may close these issues.

3 participants