From 64b5867be3035caaaa2192a2bd66a273ecc6ab01 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 17 May 2021 19:51:38 +0200 Subject: [PATCH] hosted compiling with event translation --- bsp_hosted/fsfwconfig/CMakeLists.txt | 13 ++++++++++++- bsp_hosted/fsfwconfig/FSFWConfig.h | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/bsp_hosted/fsfwconfig/CMakeLists.txt b/bsp_hosted/fsfwconfig/CMakeLists.txt index a906098f..fc961da8 100644 --- a/bsp_hosted/fsfwconfig/CMakeLists.txt +++ b/bsp_hosted/fsfwconfig/CMakeLists.txt @@ -6,5 +6,16 @@ target_include_directories(${TARGET_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) +# If a special translation file for object IDs exists, compile it. +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/objects/translateObjects.cpp") + target_sources(${TARGET_NAME} PRIVATE + objects/translateObjects.cpp + ) +endif() - +# If a special translation file for events exists, compile it. +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/objects/translateObjects.cpp") + target_sources(${TARGET_NAME} PRIVATE + events/translateEvents.cpp + ) +endif() diff --git a/bsp_hosted/fsfwconfig/FSFWConfig.h b/bsp_hosted/fsfwconfig/FSFWConfig.h index 3174d596..e48895d9 100644 --- a/bsp_hosted/fsfwconfig/FSFWConfig.h +++ b/bsp_hosted/fsfwconfig/FSFWConfig.h @@ -25,7 +25,7 @@ //! If FSFW_OBJ_EVENT_TRANSLATION is set to one, //! additional output which requires the translation files translateObjects //! and translateEvents (and their compiled source files) -#define FSFW_OBJ_EVENT_TRANSLATION 0 +#define FSFW_OBJ_EVENT_TRANSLATION 1 #if FSFW_OBJ_EVENT_TRANSLATION == 1 //! Specify whether info events are printed too.