chore: rename targets and add ENABLE_TESTING option
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.
This commit is contained in:
+7
-2
@@ -5,6 +5,9 @@ project(celrs VERSION 0.1.0)
|
||||
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)
|
||||
@@ -18,8 +21,10 @@ add_subdirectory(celrs)
|
||||
add_subdirectory(tools)
|
||||
|
||||
# Testing
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
if (ENABLE_TESTING)
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
# IDE configuration
|
||||
include(IDE)
|
||||
|
||||
Reference in New Issue
Block a user