-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCMakeLists.txt
60 lines (47 loc) · 1.23 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
cmake_minimum_required(VERSION 3.0)
project(wakare)
include(FindProtobuf)
find_library(LIB_IPT ipt)
find_library(LIB_CAPSTONE capstone)
find_library(LIB_GFLAGS gflags)
find_library(LIB_SQLITE sqlite3)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS} -ggdb -fsanitize=address")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native")
set(CMAKE_CXX_STANDARD 14)
set(EXTRACTOR_SOURCES
src/extractor/main.cpp
src/extractor/perf_file.cpp
src/extractor/pt_extractor.cpp)
set(CONVERTER_SOURCES
src/converter/main.cpp
src/converter/streaming_backend.cpp
src/converter/text_backend.cpp
src/converter/sqlite_backend.cpp)
add_subdirectory(proto)
add_executable(wakare-extractor
${EXTRACTOR_SOURCES}
${PROTO_SRCS}
${PROTO_HDRS})
add_executable(wakare-converter
${CONVERTER_SOURCES}
${PROTO_SRCS}
${PROTO_HDRS})
target_include_directories(wakare-extractor
PUBLIC
include
proto)
target_include_directories(wakare-converter
PUBLIC
include
proto)
target_link_libraries(wakare-extractor
proto
"${LIB_IPT}"
"${LIB_CAPSTONE}"
"${LIB_GFLAGS}"
"${PROTOBUF_LIBRARY}")
target_link_libraries(wakare-converter
proto
"${PROTOBUF_LIBRARY}"
"${LIB_GFLAGS}"
"${LIB_SQLITE}")