Skip to content

Commit

Permalink
Fix nasa#711, Relative paths, typos, better dependency
Browse files Browse the repository at this point in the history
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
  • Loading branch information
skliper committed Jul 2, 2020
1 parent 77215ea commit a0f3e15
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 7 deletions.
6 changes: 6 additions & 0 deletions cmake/mission_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ function(initialize_globals)
set(MISSION_SOURCE_DIR ${MISSION_SOURCE_DIR} CACHE PATH "Top level mission source directory")
endif(NOT DEFINED MISSION_SOURCE_DIR)

# Default core modules, set early so it can be appended or replaced from user configuration
if (NOT DEFINED MISSION_CORE_MODULES)
set(MISSION_CORE_MODULES msg CACHE PATH "Mission core modules")
endif (NOT DEFINED MISSION_CORE_MODULES)

# The configuration should be in a subdirectory named "<mission>_defs". If there is one
# and only one of these, this is assumed to be it. If there is more than one then the
# user MUST specify which one is intended to be used by setting MISSIONCONFIG in the environment
Expand Down Expand Up @@ -248,6 +253,7 @@ function(prepare)
"MISSION_APPS"
"MISSION_PSPMODULES"
"MISSION_DEPS"
"MISSION_CORE_MODULES"
"ENABLE_UNIT_TESTS"
)
foreach(APP ${MISSION_DEPS})
Expand Down
14 changes: 9 additions & 5 deletions fsw/cfe-core/src/msg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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
* @{
*/

Expand Down Expand Up @@ -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
* @{
*/

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit a0f3e15

Please sign in to comment.