Skip to content

Commit

Permalink
[opencl] Simplify OpenCL configuration in CMake
Browse files Browse the repository at this point in the history
and add a message without failing if not found
  • Loading branch information
elpaso committed Aug 8, 2018
1 parent 9ff8779 commit 82b60df
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions CMakeLists.txt
Expand Up @@ -34,12 +34,9 @@ option(USE_OPENCL "Use OpenCL" ON)
if (USE_OPENCL)
FIND_PACKAGE(OpenCL)
if(${OpenCL_FOUND})
SET (USE_OPENCL TRUE CACHE BOOL "Use OpenCL")
IF(USE_OPENCL)
SET(HAVE_OPENCL TRUE)
ENDIF(USE_OPENCL)
else(${OpenCL_FOUND})
MESSAGE(FATAL_ERROR "Couldn't find OpenCL")
SET(HAVE_OPENCL TRUE)
else(${OpenCL_FOUND})
MESSAGE(STATUS "Couldn't find OpenCL: support DISABLED")
endif(${OpenCL_FOUND})
endif(USE_OPENCL)

Expand Down

0 comments on commit 82b60df

Please sign in to comment.