This commit is contained in:
parent
01b510df22
commit
323008a1b0
1 changed files with 36 additions and 40 deletions
|
@ -16,10 +16,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||||
|
|
||||||
include(FindPkgConfig)
|
include(FindPkgConfig)
|
||||||
|
|
||||||
if (NOT WIN32)
|
set(APP_SOURCES
|
||||||
|
|
||||||
add_executable(
|
|
||||||
kek
|
|
||||||
breakpoint.cpp
|
breakpoint.cpp
|
||||||
breakpoint_and.cpp
|
breakpoint_and.cpp
|
||||||
breakpoint_memory.cpp
|
breakpoint_memory.cpp
|
||||||
|
@ -57,58 +54,43 @@ add_executable(
|
||||||
utils.cpp
|
utils.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (NOT WIN32)
|
||||||
|
add_executable(
|
||||||
|
kek
|
||||||
|
${APP_SOURCES}
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(
|
||||||
|
kek-codecoverage
|
||||||
|
${APP_SOURCES}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_options(kek-codecoverage PRIVATE -fprofile-arcs -ftest-coverage)
|
||||||
|
target_link_options(kek-codecoverage PRIVATE -fprofile-arcs -ftest-coverage)
|
||||||
|
|
||||||
pkg_check_modules(NCURSES REQUIRED ncurses)
|
pkg_check_modules(NCURSES REQUIRED ncurses)
|
||||||
target_link_libraries(kek ${NCURSES_LIBRARIES})
|
target_link_libraries(kek ${NCURSES_LIBRARIES})
|
||||||
target_include_directories(kek PUBLIC ${NCURSES_INCLUDE_DIRS})
|
target_include_directories(kek PUBLIC ${NCURSES_INCLUDE_DIRS})
|
||||||
target_compile_options(kek PUBLIC ${NCURSES_CFLAGS_OTHER})
|
target_compile_options(kek PUBLIC ${NCURSES_CFLAGS_OTHER})
|
||||||
|
target_link_libraries(kek-codecoverage ${NCURSES_LIBRARIES})
|
||||||
|
target_include_directories(kek-codecoverage PUBLIC ${NCURSES_INCLUDE_DIRS})
|
||||||
|
target_compile_options(kek-codecoverage PUBLIC ${NCURSES_CFLAGS_OTHER})
|
||||||
|
|
||||||
pkg_check_modules(PANEL REQUIRED panel)
|
pkg_check_modules(PANEL REQUIRED panel)
|
||||||
target_link_libraries(kek ${PANEL_LIBRARIES})
|
target_link_libraries(kek ${PANEL_LIBRARIES})
|
||||||
target_include_directories(kek PUBLIC ${PANEL_INCLUDE_DIRS})
|
target_include_directories(kek PUBLIC ${PANEL_INCLUDE_DIRS})
|
||||||
target_compile_options(kek PUBLIC ${PANEL_CFLAGS_OTHER})
|
target_compile_options(kek PUBLIC ${PANEL_CFLAGS_OTHER})
|
||||||
|
target_link_libraries(kek-codecoverage ${PANEL_LIBRARIES})
|
||||||
|
target_include_directories(kek-codecoverage PUBLIC ${PANEL_INCLUDE_DIRS})
|
||||||
|
target_compile_options(kek-codecoverage PUBLIC ${PANEL_CFLAGS_OTHER})
|
||||||
endif (NOT WIN32)
|
endif (NOT WIN32)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
|
||||||
add_executable(
|
add_executable(
|
||||||
kek-win32
|
kek-win32
|
||||||
breakpoint.cpp
|
${APP_SOURCES}
|
||||||
breakpoint_and.cpp
|
|
||||||
breakpoint_memory.cpp
|
|
||||||
breakpoint_or.cpp
|
|
||||||
breakpoint_parser.cpp
|
|
||||||
breakpoint_register.cpp
|
|
||||||
bus.cpp
|
|
||||||
comm.cpp
|
|
||||||
comm_posix_tty.cpp
|
|
||||||
comm_tcp_socket_client.cpp
|
|
||||||
comm_tcp_socket_server.cpp
|
|
||||||
console.cpp
|
|
||||||
console_posix.cpp
|
|
||||||
cpu.cpp
|
|
||||||
dc11.cpp
|
|
||||||
debugger.cpp
|
|
||||||
device.cpp
|
|
||||||
disk_backend.cpp
|
|
||||||
disk_backend_file.cpp
|
|
||||||
disk_backend_nbd.cpp
|
|
||||||
error.cpp
|
|
||||||
kw11-l.cpp
|
|
||||||
loaders.cpp
|
|
||||||
log.cpp
|
|
||||||
main.cpp
|
|
||||||
memory.cpp
|
|
||||||
mmu.cpp
|
|
||||||
rk05.cpp
|
|
||||||
rl02.cpp
|
|
||||||
rp06.cpp
|
|
||||||
tm-11.cpp
|
|
||||||
tty.cpp
|
|
||||||
utils.cpp
|
|
||||||
win32.cpp
|
win32.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
endif (WIN32)
|
endif (WIN32)
|
||||||
|
|
||||||
include(CheckIPOSupported)
|
include(CheckIPOSupported)
|
||||||
|
@ -124,6 +106,7 @@ set(THREADS_PREFER_PTHREAD_FLAG TRUE)
|
||||||
find_package(Threads)
|
find_package(Threads)
|
||||||
if (NOT WIN32)
|
if (NOT WIN32)
|
||||||
target_link_libraries(kek Threads::Threads)
|
target_link_libraries(kek Threads::Threads)
|
||||||
|
target_link_libraries(kek-codecoverage Threads::Threads)
|
||||||
else ()
|
else ()
|
||||||
target_link_libraries(kek-win32 Threads::Threads)
|
target_link_libraries(kek-win32 Threads::Threads)
|
||||||
|
|
||||||
|
@ -132,7 +115,20 @@ endif ()
|
||||||
|
|
||||||
add_subdirectory(arduinojson)
|
add_subdirectory(arduinojson)
|
||||||
target_link_libraries(kek ArduinoJson)
|
target_link_libraries(kek ArduinoJson)
|
||||||
|
target_link_libraries(kek-codecoverage ArduinoJson)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_link_libraries(kek-win32 ArduinoJson)
|
target_link_libraries(kek-win32 ArduinoJson)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
add_custom_target(coverage
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E remove_directory coverage
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E make_directory coverage
|
||||||
|
COMMAND lcov --capture --directory . --output-file coverage.info
|
||||||
|
COMMAND genhtml coverage.info --output-directory coverage
|
||||||
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||||
|
)
|
||||||
|
add_custom_target(coverage_reset
|
||||||
|
COMMAND lcov --directory . --zerocounters
|
||||||
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||||
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue