Skip to content

Commit

Permalink
Fix nasa#711, Adopted updated cmake model
Browse files Browse the repository at this point in the history
  • Loading branch information
skliper committed Aug 7, 2020
1 parent 3af2bb5 commit 2f79f37
Show file tree
Hide file tree
Showing 22 changed files with 24 additions and 14 deletions.
6 changes: 1 addition & 5 deletions cmake/arch_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,7 @@ function(initialize_globals)
unset(VARNAME)
unset(PARENTVARS)
set(MISSION_IMPORTED_VARS ${MISSION_IMPORTED_VARS} PARENT_SCOPE)

# Default core modules, set early so it can be appended or replaced from user configuration
# NOT cached so it can be changed with simple config update
set(MISSION_CORE_MODULES msg PARENT_SCOPE)


endfunction(initialize_globals)


Expand Down
1 change: 1 addition & 0 deletions cmake/mission_defaults.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ set(MISSION_CORE_MODULES
"cfe-core"
"osal"
"psp"
"msg"
)

# The "MISSION_GLOBAL_APPLIST" is a set of apps/libs that will be built
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,8 @@ else (MISSION_INCLUDE_CCSDSEXT_HEADER)
src/cfe_msg_initdefaulthdr_v1.c)
endif (MISSION_INCLUDE_CCSDSEXT_HEADER)

# Interface library (link to get public includes)
add_library(${MODULE_NAME}_interface INTERFACE)
target_include_directories(${MODULE_NAME}_interface INTERFACE inc_public)

# Module library
add_library(${MODULE_NAME} STATIC ${MODULE_SRCS})

# Link to get public includes
target_link_libraries(${MODULE_NAME} ${MODULE_NAME}_interface)
add_library(${DEP} STATIC ${MODULE_SRCS})

# Add private include
target_include_directories(${MODULE_NAME} PRIVATE inc_private)
target_include_directories(${DEP} PRIVATE private_inc)
20 changes: 20 additions & 0 deletions modules/msg/mission_build.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
###########################################################
#
# MSG mission build setup
#
# This file is evaluated as part of the "prepare" stage
# and can be used to set up prerequisites for the build,
# such as generating header files
#
###########################################################

# Generate the header definition files, use local default for this module)
generate_config_includefile(
FILE_NAME "cfe_msg_hdr.h"
FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/mission_inc/default_cfe_msg_hdr.h"
)

generate_config_includefile(
FILE_NAME "cfe_msg_sechdr.h"
FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/mission_inc/default_cfe_msg_sechdr.h"
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 2f79f37

Please sign in to comment.