-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
29 lines (24 loc) · 1.16 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
cmake_minimum_required (VERSION 3.0)
project (linux-debugger)
add_compile_options(-std=c++14)
include_directories(ext/libelfin ext/linenoise include)
add_executable(debugger src/symbol.cpp src/registers.cpp src/breakpoint.cpp src/debugger.cpp src/main.cpp ext/linenoise/linenoise.c)
set_target_properties(debugger
PROPERTIES COMPILE_FLAGS "-g -Wall -Wextra")
add_executable(hello tests/hello.cpp)
set_target_properties(hello
PROPERTIES COMPILE_FLAGS "-g -O0 -Wall -Wextra -gdwarf-4 -gstrict-dwarf"
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/out/hello)
add_executable(steps tests/steps.cpp)
set_target_properties(steps
PROPERTIES COMPILE_FLAGS "-g -O0 -Wall -Wextra -gdwarf-4 -gstrict-dwarf"
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/out/steps)
add_custom_target(
libelfin
COMMAND make
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/ext/libelfin
)
target_link_libraries(debugger
${PROJECT_SOURCE_DIR}/ext/libelfin/dwarf/libdwarf++.so
${PROJECT_SOURCE_DIR}/ext/libelfin/elf/libelf++.so)
add_dependencies(debugger libelfin)