Fix for Github issue #78
authorMatthew Bentham <matthew.bentham@arm.com>
Thu, 11 Oct 2018 08:47:01 +0000 (09:47 +0100)
committerMatthew Bentham <matthew.bentham@arm.com>
Mon, 22 Oct 2018 15:57:53 +0000 (16:57 +0100)
Always use the Compute Library OpenCL stubs for linking,
but do not add the location to the runtime library path.

Change-Id: Ifc2fbec20183af1babf1167a8711e6709ad33210

cmake/GlobalConfig.cmake

index 61ce4cd..9d7dab0 100644 (file)
@@ -278,12 +278,9 @@ if(ARMCOMPUTECL)
               PATHS ${ARMCOMPUTE_ROOT}/include
               NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
 
-    find_library(OPENCL_LIBRARIES OpenCL)
-    if (NOT OPENCL_LIBRARIES)
-        # Link against libOpenCL in opencl-1.2-stubs, but don't search there at runtime
-        link_libraries(-L${ARMCOMPUTE_BUILD_DIR}/opencl-1.2-stubs)
-        set(OPENCL_LIBRARIES OpenCL)
-    endif()
+    # Link against libOpenCL in opencl-1.2-stubs, but don't search there at runtime
+    link_libraries(-L${ARMCOMPUTE_BUILD_DIR}/opencl-1.2-stubs)
+    set(OPENCL_LIBRARIES OpenCL)
 
     include_directories(${OPENCL_INCLUDE})