Skip to content

Commit

Permalink
Merge pull request nasa#585 from jphickey/fix-581-osal-cflag-propagation
Browse files Browse the repository at this point in the history
Fix nasa#581, Propagate the OSAL compile definitions to CFE build
  • Loading branch information
astrogeco authored Apr 14, 2020
2 parents d500291 + 436bc4b commit 9349100
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cmake/arch_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,20 @@ 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
# 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.
get_target_property(OSAL_COMPILE_DEFINITIONS osal INTERFACE_COMPILE_DEFINITIONS)
get_target_property(OSAL_INCLUDE_DIRECTORIES osal INTERFACE_INCLUDE_DIRECTORIES)

if (OSAL_COMPILE_DEFINITIONS)
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS "${OSAL_COMPILE_DEFINITIONS}")
endif (OSAL_COMPILE_DEFINITIONS)
if (OSAL_INCLUDE_DIRECTORIES)
include_directories(${OSAL_INCLUDE_DIRECTORIES})
endif (OSAL_INCLUDE_DIRECTORIES)

# Append the PSP and OSAL selections to the Doxyfile so it will be included
# in the generated documentation automatically.
# Also extract the "-D" options within CFLAGS and inform Doxygen about these
Expand Down

0 comments on commit 9349100

Please sign in to comment.