Skip to content
Snippets Groups Projects
Commit 2d13ddbc authored by Adel Ejjeh's avatar Adel Ejjeh
Browse files

update hpvm-rt cmakelists.txt to detect opencl installation.

parent 142a4c28
No related branches found
No related tags found
No related merge requests found
...@@ -2,17 +2,18 @@ add_definitions(-DNUM_CORES=8) ...@@ -2,17 +2,18 @@ add_definitions(-DNUM_CORES=8)
SET(CMAKE_C_COMPILER ${CMAKE_BINARY_DIR}/bin/clang) SET(CMAKE_C_COMPILER ${CMAKE_BINARY_DIR}/bin/clang)
SET(CMAKE_CXX_COMPILER ${CMAKE_BINARY_DIR}/bin/clang++) SET(CMAKE_CXX_COMPILER ${CMAKE_BINARY_DIR}/bin/clang++)
SET(CMAKE_CXX_STANDARD 11)
# Defines ${OpenCL_INCLUDE_DIRS} and ${OpenCL_LIBRARY} if found
find_package(OpenCL REQUIRED)
add_llvm_library(hpvm-rt.ll hpvm-rt.cpp add_llvm_library(hpvm-rt.ll hpvm-rt.cpp
DEPENDS DEPENDS
clang clang
llvm-dis llvm-dis
) )
target_compile_options(hpvm-rt.ll PUBLIC -flto)
target_include_directories(hpvm-rt.ll PRIVATE ${OpenCL_INCLUDE_DIRS})
target_compile_options(hpvm-rt.ll PUBLIC -flto ) target_link_directories(hpvm-rt.ll PRIVATE ${OpenCL_LIBRARY})
target_compile_options(hpvm-rt.ll PUBLIC -std=c++11)
add_custom_target(hpvm-rt.cpp.o ALL add_custom_target(hpvm-rt.cpp.o ALL
COMMAND ar -x ${CMAKE_BINARY_DIR}/lib/libhpvm-rt.ll.a COMMAND ar -x ${CMAKE_BINARY_DIR}/lib/libhpvm-rt.ll.a
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment