Only check OpenCL if CUDA enabled #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
During the initial CMake configuration for this project, the OpenCL header would be detected, but the proper configuration would not be set for the build. This caused a failed attempt to build /stencils/3axis_cl.cpp because CL/opencl.hpp could not be found.
This is resolved when CUDA is installed. When CMake detects the CUDA compiler and headers, the correct environment is set for OpenCL as well. A change was made to only attempt detection of OpenCL when CUDA was found.
This is likely a problem with the OpenCL detection within CMake and optimally would be fixed in that package. Combined with the fact that bricklib OpenCL currently only works with CUDA, the best place to make this fix was within this library.