-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
29 lines (27 loc) · 924 Bytes
/
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.10)
project(minigdbstub)
# GoogleTest
set(CMAKE_CXX_STANDARD 11)
find_package(GTest REQUIRED)
set(TESTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests)
add_executable(minigdbstub_tests)
target_sources(minigdbstub_tests PRIVATE
${TESTS_DIR}/test_breakpoint.cpp
${TESTS_DIR}/test_mem.cpp
${TESTS_DIR}/test_recv.cpp
${TESTS_DIR}/test_regs.cpp
${TESTS_DIR}/test_send.cpp
)
target_include_directories(minigdbstub_tests PRIVATE ${CMAKE_SOURCE_DIR})
if (MSVC)
target_compile_options(minigdbstub_tests PRIVATE "/WX")
else()
target_compile_options(minigdbstub_tests PRIVATE "-Wall")
target_compile_options(minigdbstub_tests PRIVATE "-Werror")
# Certain tests dont use all of the stub's functions - silence this
target_compile_options(minigdbstub_tests PRIVATE "-Wno-unused-function")
endif()
target_link_libraries(minigdbstub_tests
GTest::GTest
GTest::Main
)