-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
138 lines (107 loc) · 5.05 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
cmake_minimum_required(VERSION 3.12)
#get options and compiling env
include(cmake/options.cmake)
project(GraphPathFinder)
project(GraphPathFinder LANGUAGES CXX)
#set C++ standard to C++20
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
############################
###get external projects
############################
include(cmake/fmt.cmake)
include(cmake/tbb.cmake)
include(cmake/namedtype.cmake)
include(cmake/expected.cmake)
# needed for multithreading
find_package(Threads REQUIRED)
#############################################
## library with all the logic which
## can later be easily linked against test
#############################################
add_library(GraphPathFinderLib INTERFACE)
target_sources(GraphPathFinderLib
INTERFACE
${CMAKE_CURRENT_LIST_DIR}/include/concepts/BackwardConnections.hpp
${CMAKE_CURRENT_LIST_DIR}/include/concepts/BackwardEdges.hpp
${CMAKE_CURRENT_LIST_DIR}/include/concepts/DistanceOracle.hpp
${CMAKE_CURRENT_LIST_DIR}/include/concepts/EdgeWeights.hpp
${CMAKE_CURRENT_LIST_DIR}/include/concepts/Edges.hpp
${CMAKE_CURRENT_LIST_DIR}/include/concepts/ForwardConnections.hpp
${CMAKE_CURRENT_LIST_DIR}/include/concepts/NodeLevels.hpp
${CMAKE_CURRENT_LIST_DIR}/include/concepts/Nodes.hpp
${CMAKE_CURRENT_LIST_DIR}/include/concepts/Parseable.hpp
${CMAKE_CURRENT_LIST_DIR}/include/concepts/Path.hpp
${CMAKE_CURRENT_LIST_DIR}/include/concepts/PathOracle.hpp
${CMAKE_CURRENT_LIST_DIR}/include/concepts/Sortable.hpp
${CMAKE_CURRENT_LIST_DIR}/include/concepts/Permutable.hpp
${CMAKE_CURRENT_LIST_DIR}/include/concepts/Utils.hpp
${CMAKE_CURRENT_LIST_DIR}/include/common/BackwardEdgeView.hpp
${CMAKE_CURRENT_LIST_DIR}/include/common/BasicGraphTypes.hpp
${CMAKE_CURRENT_LIST_DIR}/include/common/EmptyBase.hpp
${CMAKE_CURRENT_LIST_DIR}/include/common/Parsing.hpp
${CMAKE_CURRENT_LIST_DIR}/include/common/Range.hpp
${CMAKE_CURRENT_LIST_DIR}/include/common/Tokenizer.hpp
${CMAKE_CURRENT_LIST_DIR}/include/utils/MinMax.hpp
${CMAKE_CURRENT_LIST_DIR}/include/utils/Permutation.hpp
${CMAKE_CURRENT_LIST_DIR}/include/graphs/common/LevelBase.hpp
${CMAKE_CURRENT_LIST_DIR}/include/graphs/common/WeightBase.hpp
${CMAKE_CURRENT_LIST_DIR}/include/graphs/nodes/LatLngBase.hpp
${CMAKE_CURRENT_LIST_DIR}/include/graphs/nodes/FMINode.hpp
${CMAKE_CURRENT_LIST_DIR}/include/graphs/nodes/SimpleMapNode.hpp
${CMAKE_CURRENT_LIST_DIR}/include/graphs/edges/FMIEdge.hpp
${CMAKE_CURRENT_LIST_DIR}/include/graphs/edges/ShortcutBase.hpp
${CMAKE_CURRENT_LIST_DIR}/include/graphs/edges/SimpleEdge.hpp
${CMAKE_CURRENT_LIST_DIR}/include/graphs/edges/SrcBase.hpp
${CMAKE_CURRENT_LIST_DIR}/include/graphs/edges/TrgBase.hpp
${CMAKE_CURRENT_LIST_DIR}/include/graphs/edges/WeightedEdge.hpp
${CMAKE_CURRENT_LIST_DIR}/include/graphs/offsetarray/OffsetArray.hpp
${CMAKE_CURRENT_LIST_DIR}/include/graphs/offsetarray/OffsetArrayBackwardGraph.hpp
${CMAKE_CURRENT_LIST_DIR}/include/graphs/offsetarray/OffsetArrayForwardGraph.hpp
${CMAKE_CURRENT_LIST_DIR}/include/graphs/offsetarray/OffsetArrayNodes.hpp
${CMAKE_CURRENT_LIST_DIR}/include/graphs/offsetarray/OffsetArrayEdges.hpp
${CMAKE_CURRENT_LIST_DIR}/include/graphs/Path.hpp
${CMAKE_CURRENT_LIST_DIR}/include/parsing/offsetarray/Parser.hpp
${CMAKE_CURRENT_LIST_DIR}/include/algorithms/pathfinding/dijkstra/DijkstraQueue.hpp
${CMAKE_CURRENT_LIST_DIR}/include/algorithms/pathfinding/dijkstra/Dijkstra.hpp
${CMAKE_CURRENT_LIST_DIR}/include/algorithms/pathfinding/ch/CHDijkstraBackwardHelper.hpp
${CMAKE_CURRENT_LIST_DIR}/include/algorithms/pathfinding/ch/CHDijkstraForwardHelper.hpp
${CMAKE_CURRENT_LIST_DIR}/include/algorithms/pathfinding/ch/CHDijkstra.hpp
${CMAKE_CURRENT_LIST_DIR}/include/algorithms/distoracle/dijkstra/Dijkstra.hpp
${CMAKE_CURRENT_LIST_DIR}/include/algorithms/distoracle/ch/CHDijkstraBackwardHelper.hpp
${CMAKE_CURRENT_LIST_DIR}/include/algorithms/distoracle/ch/CHDijkstraForwardHelper.hpp
${CMAKE_CURRENT_LIST_DIR}/include/algorithms/distoracle/ch/CHDijkstra.hpp
${CMAKE_CURRENT_LIST_DIR}/include/algorithms/distoracle/hublabels/HubLabelLookup.hpp
${CMAKE_CURRENT_LIST_DIR}/include/algorithms/distoracle/hublabels/HubLabelCalculator.hpp
${CMAKE_CURRENT_LIST_DIR}/include/algorithms/distoracle/PHAST.hpp
)
# add the dependencies of the target to enforce
# the right order of compiling
add_dependencies(GraphPathFinderLib fmt-project)
add_dependencies(GraphPathFinderLib tbb-project)
add_dependencies(GraphPathFinderLib namedtype-project)
add_dependencies(GraphPathFinderLib expected-lite-project)
# make headers available
target_include_directories(GraphPathFinderLib INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/include
fmt
tbb
${NAMEDTYPE_INCLUDE_DIR}
${EXPECTED_LITE_INCLUDE_DIR}
)
#link against libarys
target_link_libraries(GraphPathFinderLib INTERFACE
${CMAKE_THREAD_LIBS_INIT}
fmt
tbb)
if (BUILD_TESTS)
enable_testing()
add_subdirectory(test)
endif (BUILD_TESTS)
if (BUILD_EXAMPLES)
add_subdirectory(examples)
endif (BUILD_EXAMPLES)
if (BUILD_BENCHMARKS)
add_subdirectory(benchmark)
endif (BUILD_BENCHMARKS)