-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
55 lines (44 loc) · 1.32 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 2.8)
add_subdirectory(${CMAKE_SOURCE_DIR}/benchme/)
#PRPA
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/)
find_package(Boost COMPONENTS graph program_options REQUIRED)
find_package(TBB)
include_directories(${TBB_INCLUDE_DIRS})
add_definitions(${TBB_DEFINITIONS})
include_directories(${Boost_INCLUDE_DIR})
set(PROJECT_NAME prpa)
set(${PROJECT_NAME} CXX)
cmake_policy(SET CMP0042 NEW)
#CXX
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror -std=c++14 -pedantic -O3")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
#INCLUDE
set(PROJECT_INCLUDE src/)
include_directories(${PROJECT_INCLUDE})
file(GLOB PROJECT_SRC_FILES
${CMAKE_CURRENT_SOURCE_DIR}/src/loader/*.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/graph/*.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/spanner/*.cc
)
add_library(_${PROJECT_NAME} SHARED ${PROJECT_SRC_FILES})
add_executable(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/src/main.cc)
target_link_libraries(${PROJECT_NAME}
_${PROJECT_NAME})
target_link_libraries(_${PROJECT_NAME}
${Boost_PROGRAM_OPTIONS_LIBRARY}
${TBB_LIBRARIES})
add_custom_target(
greedy
DEPENDS
${PROJECT_NAME}
COMMAND
./${PROJECT_NAME} --greedy --data ../dataset/us_cities.csv --t 1.5 --trace
)
add_custom_target(
wspd
DEPENDS
${PROJECT_NAME}
COMMAND
./${PROJECT_NAME} --wspd --data ../dataset/us_cities.csv --t 1.5 --trace
)