From b5c8be609f0f62043f9e81c5bb4de27a22b64905 Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Tue, 2 Jun 2020 14:00:40 -0400 Subject: [PATCH] Fix #711, Relative paths, typos, better dependency MISSION_CORE_MODULES now set early (mission_build.cmake) allowing override or append in user config. Fixed typos in cfe_msg.h, and moved local to module until APIs are cleaned up (still available as include) Moving towards a module file structure --- fsw/cfe-core/src/msg/CMakeLists.txt | 14 +++++++++----- fsw/cfe-core/src/{ => msg}/inc/cfe_msg.h | 4 ++-- fsw/cfe-core/src/msg/{ => src}/cfe_msg_checksum.c | 0 fsw/cfe-core/src/msg/{ => src}/cfe_msg_fc.c | 0 fsw/cfe-core/src/msg/{ => src}/cfe_msg_time.c | 0 5 files changed, 11 insertions(+), 7 deletions(-) rename fsw/cfe-core/src/{ => msg}/inc/cfe_msg.h (98%) rename fsw/cfe-core/src/msg/{ => src}/cfe_msg_checksum.c (100%) rename fsw/cfe-core/src/msg/{ => src}/cfe_msg_fc.c (100%) rename fsw/cfe-core/src/msg/{ => src}/cfe_msg_time.c (100%) diff --git a/fsw/cfe-core/src/msg/CMakeLists.txt b/fsw/cfe-core/src/msg/CMakeLists.txt index dbb801f28..3e39e0672 100644 --- a/fsw/cfe-core/src/msg/CMakeLists.txt +++ b/fsw/cfe-core/src/msg/CMakeLists.txt @@ -14,9 +14,13 @@ ################################################################## # Add the basic set of files which are always built -set(CFE_ALL_MODULE_SRCS ${CFE_ALL_MODULE_SRCS} - ${CMAKE_CURRENT_SOURCE_DIR}/cfe_msg_checksum.c - ${CMAKE_CURRENT_SOURCE_DIR}/cfe_msg_fc.c - ${CMAKE_CURRENT_SOURCE_DIR}/cfe_msg_time.c - PARENT_SCOPE +set(MODULE_SRCS + src/cfe_msg_checksum.c + src/cfe_msg_fc.c + src/cfe_msg_time.c ) + +add_library(${MODULE_NAME} STATIC ${MODULE_SRCS}) + +# Add to includes for header dependency resolution across modules +target_include_directories(${MODULE_NAME} PUBLIC inc) diff --git a/fsw/cfe-core/src/inc/cfe_msg.h b/fsw/cfe-core/src/msg/inc/cfe_msg.h similarity index 98% rename from fsw/cfe-core/src/inc/cfe_msg.h rename to fsw/cfe-core/src/msg/inc/cfe_msg.h index 965d68380..028b9f4d4 100644 --- a/fsw/cfe-core/src/inc/cfe_msg.h +++ b/fsw/cfe-core/src/msg/inc/cfe_msg.h @@ -105,7 +105,7 @@ void CFE_MSG_GenerateChecksum(CFE_SB_MsgPtr_t MsgPtr); bool CFE_MSG_ValidateChecksum(CFE_SB_MsgPtr_t MsgPtr); /**@}*/ -/** @defgropu CFEAPIMSGCmdCode cFE Message Command Code APIs +/** @defgroup CFEAPIMSGCmdCode cFE Message Command Code APIs * @{ */ @@ -158,7 +158,7 @@ uint16 CFE_MSG_GetCmdCode(CFE_SB_MsgPtr_t MsgPtr); /**@}*/ -/** @defgropu CFEAPIMSGTime cFE Message Time APIs +/** @defgroup CFEAPIMSGTime cFE Message Time APIs * @{ */ diff --git a/fsw/cfe-core/src/msg/cfe_msg_checksum.c b/fsw/cfe-core/src/msg/src/cfe_msg_checksum.c similarity index 100% rename from fsw/cfe-core/src/msg/cfe_msg_checksum.c rename to fsw/cfe-core/src/msg/src/cfe_msg_checksum.c diff --git a/fsw/cfe-core/src/msg/cfe_msg_fc.c b/fsw/cfe-core/src/msg/src/cfe_msg_fc.c similarity index 100% rename from fsw/cfe-core/src/msg/cfe_msg_fc.c rename to fsw/cfe-core/src/msg/src/cfe_msg_fc.c diff --git a/fsw/cfe-core/src/msg/cfe_msg_time.c b/fsw/cfe-core/src/msg/src/cfe_msg_time.c similarity index 100% rename from fsw/cfe-core/src/msg/cfe_msg_time.c rename to fsw/cfe-core/src/msg/src/cfe_msg_time.c