-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
66 lines (46 loc) · 1.72 KB
/
CMakeLists.txt
File metadata and controls
66 lines (46 loc) · 1.72 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#-DBOOST_ROOT=/home/kuba/External/boost_1_55_0 -DBoostCompute_DIR=/home/kuba/External/compute/cmake -DCMAKE_BUILD_TYPE=Release
project(ComputeCL)
cmake_minimum_required(VERSION 2.8)
ADD_DEFINITIONS(
-std=c++11 # support for new cpp standard
)
# directory with external Find*.cmake files
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake_modules)
add_definitions(-D__CL_ENABLE_EXCEPTIONS)
#add_definitions(-DCL_USE_DEPRECATED_OPENCL_1_1_APIS)
# find OpenCL
find_package(OpenCL REQUIRED)
include_directories(SYSTEM ${OPENCL_INCLUDE_DIRS})
# find Boost
#set(Boost_DEBUG 1)
find_package(Boost 1.55 REQUIRED)
link_directories(${Boost_LIBRARY_DIRS})
include_directories(${Boost_INCLUDE_DIRS})
message(STATUS "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
message(STATUS "Boost_LIBRARY_DIRS: ${Boost_LIBRARY_DIRS}")
set(BoostCompute_INCLUDE_DIRS "/home/kuba/External/compute/include")
include_directories(SYSTEM ${BoostCompute_INCLUDE_DIRS})
set(SRC_LIST
main.cpp
)
set(INC_LIST
include/matrix_operations/Transpose.h
include/matrix_operations/ExtractDiagonal.h
include/primitves/Gather.h
include/utils/Timer.h
include/utils/MatrixUtils.h
include/utils/StorageType.h
include/utils/cmd_options/CommandLineOptions.h
include/io/MatrixMarket.h
include/io/Print.h
include/datatypes/ClMatrixBase.h
include/datatypes/ClMatrixCOO.h
include/iterator/SortIterator.h
)
set(libname computecl)
include_directories(include)
add_library("${libname}" SHARED ${SRC_LIST} ${INC_LIST})
#add_executable(${PROJECT_NAME} ${SRC_LIST} ${INC_LIST})
target_link_libraries("${libname}" ${OPENCL_LIBRARIES} ${BOOST_LIBRARIES} -lboost_program_options)
add_subdirectory(tests)
add_subdirectory(benchmarks)