Skip to content

Commit

Permalink
Fix #718, add user-specified extra modules to build
Browse files Browse the repository at this point in the history
Add a new setting that can be set in targets.cmake, to
enable users to add extra custom functions/modules to
CFE core itself.

This can be used, among other things, for future support
of a modular/customizable message header structure.
  • Loading branch information
jphickey committed May 27, 2020
1 parent d217ca3 commit 45689e1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion cmake/arch_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,16 @@ function(process_arch SYSVAR)
include_directories(${MISSION_SOURCE_DIR}/cfe/fsw/cfe-core/src/inc)
include_directories(${MISSION_SOURCE_DIR}/cfe/cmake/target/inc)

# propagate any OSAL interface compile definitions and include directories to this build
# propagate any dependency interface compile definitions and include directories to this build
# This is set as a directory property here at the top level so it will apply to all code.
# This includes MODULE libraries that do not directly/statically link with OSAL but still
# should be compiled with these flags.
foreach(DEPENDENCY ${MISSION_DEPS})
if (IS_DIRECTORY "${${DEPENDENCY}_MISSION_DIR}/inc")
include_directories("${${DEPENDENCY}_MISSION_DIR}/inc")
endif()
endforeach()

get_target_property(OSAL_COMPILE_DEFINITIONS osal INTERFACE_COMPILE_DEFINITIONS)
get_target_property(OSAL_INCLUDE_DIRECTORIES osal INTERFACE_INCLUDE_DIRECTORIES)

Expand Down
2 changes: 1 addition & 1 deletion cmake/mission_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function(prepare)
# so this is run in a loop until the list of unfound apps is empty
string(REPLACE ":" ";" CFS_APP_PATH "$ENV{CFS_APP_PATH}")
list(APPEND CFS_APP_PATH "apps" "apps/CFS" "libs" "psp/fsw/modules")
set(MISSION_DEPS "cfe-core" "osal")
set(MISSION_DEPS "cfe-core" "osal" ${MISSION_CORE_MODULES})
set(APP_MISSING_COUNT 0)

# Set the search path of those dependency components which are fixed
Expand Down
1 change: 1 addition & 0 deletions cmake/target/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ endif (TGT${TGTID}_APPLIST)
# This depends on whether any special features are included or not
set(CFE_LINK_WHOLE_LIBS
${CFE_CORE_TARGET}
${MISSION_CORE_MODULES}
psp-${CFE_SYSTEM_PSPNAME}
osal
)
Expand Down

0 comments on commit 45689e1

Please sign in to comment.