blob: b0ecf39ab67d4ab1499a3aa058df37fa88a8ab6a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
include_directories (${Coal_SOURCE_DIR}/include
${Coal_SOURCE_DIR}/src
${LLVM_INCLUDE_DIR}
${GALLIUM_INCLUDE_DIRS}
${CLANG_INCLUDE_DIRS}
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
set(COAL_SRC_FILES
api/api_command.cpp api/api_device.cpp
api/api_event.cpp api/api_kernel.cpp
api/api_platform.cpp api/api_program.cpp
api/api_context.cpp
api/api_enqueue.cpp api/api_flush.cpp
api/api_memory.cpp api/api_profiling.cpp
api/api_sampler.cpp api/api_gl.cpp
core/device.cpp
core/context.cpp
compiler/compiler.cpp)
add_library(OpenCL SHARED ${COAL_SRC_FILES})
SET(LIBRARY_OUTPUT_PATH ${COAL_BINARY_DIR}/lib)
SET_TARGET_PROPERTIES(OpenCL PROPERTIES
VERSION ${${PROJECT_NAME}_VERSION}
SOVERSION ${${PROJECT_NAME}_SOVERSION} )
#message(STATUS "some project ${${PROJECT_NAME}_VERSION}")
set_source_files_properties( ${COAL_SRC_FILES}
PROPERTIES COMPILE_FLAGS ${LLVM_COMPILE_FLAGS})
set_target_properties(OpenCL
PROPERTIES LINK_FLAGS ${LLVM_LDFLAGS})
TARGET_LINK_LIBRARIES(OpenCL
${CLANG_LIBS}
${LLVM_LIBS_CORE}
${GALLIUM_LIBS}
)
add_subdirectory(tools)
|