-
Notifications
You must be signed in to change notification settings - Fork 61
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
Replace cl.hpp with cl2.hpp #187
Conversation
* Added OpenCL-CLHPP repository as external project for library and samples projects. * Modified all source files of library and samples to reflect the usage of cl2.hpp header.
I have built the changes on the following compiler configuration
and the changes built successfully. |
@kknox looks like travis is still on Mavericks which seems to be the cause of the failure. We can hook up clSparse into arrayfire's jenkins for now if you are interested. |
`USE_SYSTEM_CL2HPP` cmake option has been added to the project build options. This is a boolean variable, which is set to `OFF` by default. The default behavior is to clone the `OpenCL-CLHPP` repository and generate the cl2.hpp header. When the cmake option `USE_SYSTEM_CL2HPP` is set to `ON` the cl2.hpp header is expected to be available in system paths so that the build process automatically picks it up.
I have added option to use |
Reviewed 18 of 24 files at r1, 7 of 7 files at r2. .gitignore, line 34 [r2] (raw file):
This is mostly a pet peeve of mine, but I do not like any generated files to be mixed in with the source, even if it's whitelisted in the .gitignore. I feel these are the types of exceptions that belong in a fork, not in upstream. I can't find below where you generate code in 'builld/', so this may be moot. Can you revert this change? samples/sample-axpy.cpp, line 28 [r2] (raw file):
I really like that the system specific pre-processor guards can be eliminated here. Thanks for this simplification! src/clsparseTimer/CMakeLists.txt, line 65 [r2] (raw file):
Why is this necessary? I would prefer to use the standard add_compiler_export_flags? I see above in a comment that you say it's deprecated? Can you provide material that I can read? src/library/CMakeLists.txt, line 254 [r2] (raw file):
Why is this necessary? I would prefer to use the standard add_compiler_export_flags? Comments from Reviewable |
According to this travis page, we can opt-in to a more recent version of mac osx. Can you update the .travis.yml file on your next commit to include |
|
@kknox On latest versions of CMake, you get the following warning when you use that function:
Now I am not sure when these options were added, but v3.0.2 seems to definitely have those options. If you are willing to change the minimum CMake requirement to 3.0, this can be fixed in the proper manner. |
You can see that the documentation mention that function is obsolete at the end of this page: |
I'm not advocating that you change your build layout, and I don't feel like you are doing anything wrong, but it's a specific requirement of your build environment and doesn't need to live upstream. I advocate its up to the user to decide where to compile, and this change encourages otherwise.
Thank you for the heads up. I like your suggestion with regard to target properties, so could you refactor the code into: set_target_properties(target PROPERTIES CXX_VISIBILITY_PRESET hidden)
set_target_properties(target PROPERTIES VISIBILITY_INLINES_HIDDEN ON ) My understanding is that this will do the right things on windows, and should also work for cmake 2.8.12. I think we would be good all around. |
`osx_image: xcode8` image of travis ci doesn't come with cmake preinstalled althought earlier versions do. Hence, added the cmake installation command to before install stage.
@kknox All platform builds pass now. |
@9prady9 can you rebase the PR to have fewer commits ? |
This may not matter if @kknox wants to squash the commits while merging. |
This looks great now; if you want to rebase, go ahead. If you are find with a merge/squash, i'll do that at the end of my business day. Thank you for your contribution |
Reviewed 4 of 4 files at r3. Comments from Reviewable |
@kknox pradeep is working on Indian time. I think it's fine if you merge + squash it :) |
OpenCL-CLHPP
repository as external project and usecl2.hpp
header instead of currentcl.hpp
header.USE_SYSTEM_CL2HPP
to use headers installed on the system. By default this value shall beOFF
which results in download and generation of the headers fromOpenCL-CLHPP
repository.This change is