Newer
Older
project(ecss_services)
# Set C++ version to c++17
set(CMAKE_CXX_STANDARD 17)
# Specify the directories for #includes
include_directories("${PROJECT_SOURCE_DIR}/inc" "${PROJECT_SOURCE_DIR}/lib/etl/include"
"${PROJECT_SOURCE_DIR}/lib/logger/inc")
add_custom_target(check
COMMAND ./cppcheck.sh
COMMAND ./clang-tidy.sh
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/ci")
# Allow the user to set the ECSS Configuration directory using the -DECSS_CONFIGURATION=... command line argument
set(ECSS_CONFIGURATION "${PROJECT_SOURCE_DIR}/inc/Platform/x86" CACHE PATH
"The include directory for the platform-specific ECSS configuration headers"
)
include_directories(${ECSS_CONFIGURATION})
# Specify the .cpp files common across all targets
add_library(common OBJECT
hiluluk
committed
src/Service.cpp
src/ServicePool.cpp
src/Helpers/PacketStore.cpp
src/Services/MemoryManagementService.cpp
src/Services/ParameterService.cpp
src/Services/RequestVerificationService.cpp
athatheo
committed
src/Services/LargePacketTransferService.cpp
src/Services/EventActionService.cpp
athatheo
committed
src/Services/TimeBasedSchedulingService.cpp
src/Services/FunctionManagementService.cpp
src/Services/StorageAndRetrievalService.cpp
src/Services/HousekeepingService.cpp
src/Services/ParameterStatisticsService.cpp
src/Services/OnBoardMonitoringService.cpp
src/Helpers/Statistic.cpp
src/Services/RealTimeForwardingControlService.cpp
src/Helpers/AllMessageTypes.cpp
file(GLOB_RECURSE x86_main_SRC "src/Platform/x86/*.cpp" "lib/logger/src/Platform/x86/*.cpp")
add_executable(ecss_services
$<TARGET_OBJECTS:common>
# Logs all levels of messages. This command can be added by other users of this
# library to override the respective log level.
target_compile_definitions(ecss_services PUBLIC LOGLEVEL_TRACE)
# Gather all the .cpp files corresponding to tests
file(GLOB test_SRC "test/**/*.cpp")
add_executable(tests
$<TARGET_OBJECTS:common>