974b33e827
Rename library targets from celrs_* to cel* (celcrsf, celserial, cellogger, cellog) and add cel:: namespace aliases. Add cel::cel umbrella target that links all core libraries. Add ENABLE_TESTING option (default ON) to gate Unity/CMock fetch and test targets for downstream consumers.
31 lines
514 B
CMake
31 lines
514 B
CMake
cmake_minimum_required(VERSION 3.21)
|
|
project(celrs VERSION 0.1.0)
|
|
|
|
# CMake configuration
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/deps")
|
|
|
|
# Options
|
|
option(ENABLE_TESTING "Build unit tests" ON)
|
|
|
|
# Platform flags
|
|
include(Platform)
|
|
include(Flags)
|
|
|
|
include(Coverage)
|
|
|
|
# Core Library
|
|
add_subdirectory(celrs)
|
|
|
|
# Tools
|
|
add_subdirectory(tools)
|
|
|
|
# Testing
|
|
if (ENABLE_TESTING)
|
|
enable_testing()
|
|
add_subdirectory(tests)
|
|
endif()
|
|
|
|
# IDE configuration
|
|
include(IDE)
|