8e0f4fc8d0
Add Coverage.cmake with gcovr integration, detecting Clang vs GCC and wrapping llvm-cov gcov in a build-dir script to handle paths with spaces on Windows. Update README and AGENTS.md with the new one-command-per-block documentation rule.
29 lines
611 B
CMake
29 lines
611 B
CMake
cmake_minimum_required(VERSION 3.21)
|
|
project(ctdd VERSION 0.1.0)
|
|
|
|
# CMake configuration
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/deps")
|
|
|
|
# Platform flags
|
|
include(Platform)
|
|
include(Flags)
|
|
|
|
include(Coverage)
|
|
|
|
# Example Library
|
|
add_subdirectory(ctdd)
|
|
|
|
# Main executable
|
|
add_executable(main main.c)
|
|
target_include_directories(main PRIVATE .)
|
|
target_compile_features(main PRIVATE c_std_23)
|
|
target_link_libraries(main PRIVATE ctdd_str ctdd_report ctdd_logger ctdd_log_write)
|
|
|
|
# Testing
|
|
enable_testing()
|
|
add_subdirectory(tests)
|
|
|
|
# IDE configuration
|
|
include(IDE)
|