All Services in PurePhone are dependent to Service.hpp from module-sys
Table of Contents
Services documentation is available in module-sys here.
testservice-test in module-servicesinclude/service-test/ to service-test
PUBLIC library includePRIVATE library includes and librariesinclude/service-test/ServiceTest.hpp - this file will be your service declarationServiceTest.cpp - this file will be your service entry point and definitionmodule-services/CMakeLists.txt$<$<BOOL:${ENABLE_SERVICE_TEST}>:service-test> in target_link_libraries(${TARGET} ...${TARGET}Main.cpp (i.e. PurePhoneMain.cpp) - all services have ENABLE_SERVICE_{SERVICE_NAME} definition exportedNOTE: There are no other rules of thumb in terms of folders
project(service-test)
message("${PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}" )
set(SOURCES ServiceTest.cpp)
add_library(${PROJECT_NAME} STATIC ${SOURCES})
target_include_directories(${PROJECT_NAME}
PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)
target_link_libraries(${PROJECT_NAME}
PRIVATE
PUBLIC
)
if (${ENABLE_TESTS})
add_subdirectory(test)
endif ()
option(ENABLE_SERVICE_TEST "Enable service test" OFF)
Please see the SystemManager services synchronization documentation
Documentation: settings::Settings
Documentation timers
Documentation: third party libraries
Documentation: unit tests gathering cmake
Documentation service manifest
While we can enable and disable services, we do not have proper separation for services and API definition. This means that whole system compilation will depend on:
See service-test example for ready to copy service example