-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
57 lines (49 loc) · 1.46 KB
/
CMakeLists.txt
File metadata and controls
57 lines (49 loc) · 1.46 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
ADD_SUBDIRECTORY(${LEMON_DIR} ./lemon)
SET(LEMON_INCLUDE_DIRS
${LEMON_DIR}
${CMAKE_BINARY_DIR}/benchmarks/lemon
)
SET(LEMON_LIBRARIES lemon)
UNSET(LEMON_ROOT_DIR CACHE)
UNSET(LEMON_DIR CACHE)
UNSET(LEMON_INCLUDE_DIR CACHE)
UNSET(LEMON_LIBRARY CACHE)
INCLUDE_DIRECTORIES(
${LEMON_INCLUDE_DIRS}
)
add_custom_command(OUTPUT graph.o
COMMAND ${GraphMLIR_BINARY_DIR}/graph-opt ${GraphMLIR_EXAMPLES_DIR}/graph.mlir
-lower-graph -lower-affine -convert-scf-to-cf
-test-vector-multi-reduction-lowering-patterns
-convert-vector-to-llvm
-convert-memref-to-llvm
-convert-func-to-llvm='emit-c-wrappers=1'
-reconcile-unrealized-casts |
${LLVM_MLIR_BINARY_DIR}/mlir-translate --mlir-to-llvmir |
${LLVM_MLIR_BINARY_DIR}/llc -mtriple=${GraphMLIR_OPT_TRIPLE} -mattr=${GraphMLIR_OPT_ATTR}
--filetype=obj -o ${GraphMLIR_BINARY_DIR}/../benchmarks/graph.o
DEPENDS graph-opt)
add_library(graph STATIC graph.o)
SET_TARGET_PROPERTIES(
graph
PROPERTIES
LINKER_LANGUAGE C)
add_executable(graph-processing-benchmark
FloydWarshall.cpp
BoostFloydWarshall.cpp
GraphMlirFloydWarshallBenchmark.cpp
LemonBFS.cpp
MinSpanningTree.cpp
LemonMinSpanningTree.cpp
BoostMinSpanningTree.cpp
GraphMlirMinSpanningTree.cpp
Main.cpp
)
find_package(Boost 1.40 COMPONENTS program_options REQUIRED)
target_link_libraries(graph-processing-benchmark
PRIVATE
${LEMON_LIBRARIES}
Boost::program_options
graph
GoogleBenchmark
)