Skip to content

Commit

Permalink
Fix nasa#972, clean up remaining comments and fix userguide build
Browse files Browse the repository at this point in the history
The userguide build needs to include fsw/inc from all modules
  • Loading branch information
jphickey committed Mar 10, 2021
1 parent 6160310 commit 6051fbc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 52 deletions.
4 changes: 0 additions & 4 deletions cmake/arch_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,7 @@ function(add_psp_module MOD_NAME MOD_SRC_FILES)

target_compile_definitions(${MOD_NAME} PRIVATE
_CFE_PSP_MODULE_
# $<TARGET_PROPERTY:psp_module_api,INTERFACE_COMPILE_DEFINITIONS>
)
#target_include_directories(${MOD_NAME} PRIVATE
# $<TARGET_PROPERTY:psp_module_api,INTERFACE_INCLUDE_DIRECTORIES>
#)

endfunction(add_psp_module)

Expand Down
40 changes: 0 additions & 40 deletions cmake/global_functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -264,43 +264,3 @@ function(read_targetconfig)
endforeach(SYSVAR ${TGTSYS_LIST})

endfunction(read_targetconfig)

##################################################################
#
# FUNCTION: get_current_cflags
#
# Convert the input string, which is a simple text string of compiler flags such
# as CMAKE_C_FLAGS or CMAKE_CXX_FLAGS, and convert it to a list of individual options
#
# In addition, the "-I" options from include_directories() and -D options from
# add_definitions() will be added to the output list. The contents of these will be
# obtained via the properities of the current source directory.
#
function(get_current_cflags OUTPUT_LIST)

message(FATAL_ERROR "BROKEN!")

# Start by converting the supplied string to a list
set(FLAGLIST)
foreach (FLGSTR ${ARGN})
string(REGEX REPLACE " +" ";" TEMPFLG ${FLGSTR})
list(APPEND FLAGLIST ${TEMPFLG})
endforeach (FLGSTR ${ARGN})

# Append any compile definitions from the CFE API
get_target_property(CURRENT_DEFS cfe_app INTERFACE_COMPILE_DEFINITIONS)
message("DEFS=${CURRENT_DEFS}")
foreach(DEF $<TARGET_PROPERTY:cfe_app,INTERFACE_COMPILE_DEFINITIONS>)
list(APPEND FLAGLIST "-D${DEF}")
endforeach(DEF ${CURRENT_DEFS})

# Append any include directories from the CFE API
get_target_property(CURRENT_INCDIRS cfe_app INTERFACE_INCLUDE_DIRECTORIES)
message("INCDIRS=${CURRENT_INCDIRS}")
foreach(INC ${CURRENT_INCDIRS})
list(APPEND FLAGLIST "-I${INC}")
endforeach(INC ${CURRENT_INCDIRS})

set(${OUTPUT_LIST} ${FLAGLIST} PARENT_SCOPE)

endfunction(get_current_cflags OUTPUT_LIST INPUT_FLAGS)
17 changes: 9 additions & 8 deletions cmake/mission_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -280,21 +280,22 @@ function(prepare)
# have the documentation associated with each macro definition.
configure_file("${osal_MISSION_DIR}/osconfig.h.in"
"${CMAKE_BINARY_DIR}/doc/osconfig-example.h")

# The user guide should include the doxygen from the _public_ API files from CFE + OSAL
# NOTE: the userguide is built against the headers of the default core apps. Even if
# an alternate version of the module is in use, it should adhere to the same interface.
file(GLOB MISSION_USERGUIDE_HEADERFILES
"${es_MISSION_DIR}/fsw/inc/*.h"
"${evs_MISSION_DIR}/fsw/inc/*.h"
"${fs_MISSION_DIR}/fsw/inc/*.h"
"${sb_MISSION_DIR}/fsw/inc/*.h"
"${tbl_MISSION_DIR}/fsw/inc/*.h"
"${time_MISSION_DIR}/fsw/inc/*.h"
set(SUBMODULE_HEADER_PATHS
"${osal_MISSION_DIR}/src/os/inc/*.h"
"${psp_MISSION_DIR}/psp/fsw/inc/*.h"
)
foreach(MODULE core_api es evs fs msg sb tbl time)
list(APPEND SUBMODULE_HEADER_PATHS "${${MODULE}_MISSION_DIR}/fsw/inc/*.h")
endforeach()
file(GLOB MISSION_USERGUIDE_HEADERFILES
${SUBMODULE_HEADER_PATHS}
"${CMAKE_BINARY_DIR}/doc/osconfig-example.h"
)

string(REPLACE ";" " \\\n" MISSION_USERGUIDE_HEADERFILES "${MISSION_USERGUIDE_HEADERFILES}")

# OSAL API GUIDE include PUBLIC API
Expand Down

0 comments on commit 6051fbc

Please sign in to comment.