提交 40452e72 编写于 作者: Z Zhen Wang 提交者: ZhenWang

add the clhpp dependency.

上级 bdf5e1fd
......@@ -29,11 +29,6 @@ ExternalProject_Add(
-DBUILD_EXAMPLES=OFF
-DBUILD_TESTS=OFF
-DCMAKE_INSTALL_PREFIX=${OPENCL_CLHPP_INSTALL_DIR}
${OPTIONAL_ARGS}
${EXTERNAL_OPTIONAL_ARGS}
CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${GTEST_INSTALL_DIR}
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
-DCMAKE_BUILD_TYPE:STRING=${THIRD_PARTY_BUILD_TYPE}
)
ADD_DEPENDENCIES(opencl_clhpp opencl_headers)
......@@ -15,7 +15,7 @@
INCLUDE(ExternalProject)
SET(OPENCL_HEADERS_SRCS_DIR ${THIRD_PARTY_PATH}/opencl-headers)
SET(OPENCL_HEADERS_INCLUDE_DIR "${OPENCL_HEADERS_SRCS_DIR}/src/opencl_headers/opencl20" CACHE PATH "opencl-headers include directory." FORCE)
SET(OPENCL_HEADERS_INCLUDE_DIR "${OPENCL_HEADERS_SRCS_DIR}/src/opencl_headers" CACHE PATH "opencl-headers include directory." FORCE)
INCLUDE_DIRECTORIES(${OPENCL_HEADERS_INCLUDE_DIR})
......
......@@ -6,7 +6,7 @@ find_library(opencl-lib
NAMES OpenCL)
message(STATUS "The OpenCL library path : ${opencl-lib}")
add_compile_options(-fno-strict-aliasing)
add_compile_options(-fno-strict-aliasing -Wno-ignored-qualifiers)
cc_library(cl_tool SRCS cl_tool.cc)
cc_library(cl_half SRCS cl_half.cc)
......@@ -14,6 +14,7 @@ cc_library(cl_engine SRCS cl_engine.cc DEPS cl_tool)
cc_library(cl_context SRCS cl_context.cc DEPS cl_engine)
cc_library(cl_helper SRCS cl_helper.cc DEPS cl_context)
cc_library(cl_image_converter SRCS cl_image_converter.cc DEPS cl_half lite_tensor)
cc_library(cl_image SRCS cl_image.cc DEPS cl_half lite_tensor cl_image_converter)
cc_library(cl_image SRCS cl_image.cc DEPS cl_half lite_tensor cl_image_converter cl_engine)
cc_test(test_cl_runtime SRCS cl_test.cc DEPS cl_engine cl_context)
target_link_libraries(test_cl_runtime ${opencl-lib})
add_dependencies(cl_tool opencl_clhpp)
......@@ -14,7 +14,7 @@ limitations under the License. */
#pragma once
#include <CL/cl.h>
#include "paddle/fluid/lite/opencl/cl2_header.h"
namespace paddle {
namespace lite {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册