33 lines
754 B
CMake
33 lines
754 B
CMake
cmake_minimum_required(VERSION 4.0.0)
|
|
project(gwatch VERSION 0.0.1 LANGUAGES CXX)
|
|
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
find_package(cxxopts CONFIG REQUIRED)
|
|
find_package(Catch2 CONFIG REQUIRED)
|
|
find_package(libdwarf CONFIG REQUIRED)
|
|
|
|
add_executable(gwatch src/main.cpp src/symbol.cpp src/tracer.cpp)
|
|
target_link_libraries(gwatch PRIVATE cxxopts::cxxopts libdwarf::dwarf)
|
|
|
|
enable_testing()
|
|
|
|
add_executable(gwatch_tests
|
|
tests/test_main.cpp
|
|
tests/test_symbol.cpp
|
|
tests/test_tracer.cpp
|
|
tests/test_integration.cpp
|
|
src/symbol.cpp
|
|
src/tracer.cpp
|
|
)
|
|
|
|
target_link_libraries(gwatch_tests PRIVATE
|
|
Catch2::Catch2WithMain
|
|
libdwarf::dwarf
|
|
)
|
|
|
|
include(CTest)
|
|
include(Catch)
|
|
catch_discover_tests(gwatch_tests)
|