From 6051fbc6bdad77e3c5127b6c965a7a2ff915bb50 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Wed, 10 Mar 2021 13:38:30 -0500 Subject: [PATCH] Fix #972, clean up remaining comments and fix userguide build The userguide build needs to include fsw/inc from all modules --- cmake/arch_build.cmake | 4 ---- cmake/global_functions.cmake | 40 ------------------------------------ cmake/mission_build.cmake | 17 +++++++-------- 3 files changed, 9 insertions(+), 52 deletions(-) diff --git a/cmake/arch_build.cmake b/cmake/arch_build.cmake index 70ad70455..b8355c174 100644 --- a/cmake/arch_build.cmake +++ b/cmake/arch_build.cmake @@ -76,11 +76,7 @@ function(add_psp_module MOD_NAME MOD_SRC_FILES) target_compile_definitions(${MOD_NAME} PRIVATE _CFE_PSP_MODULE_ - # $ ) - #target_include_directories(${MOD_NAME} PRIVATE - # $ - #) endfunction(add_psp_module) diff --git a/cmake/global_functions.cmake b/cmake/global_functions.cmake index f6acabaa2..0571b06b7 100644 --- a/cmake/global_functions.cmake +++ b/cmake/global_functions.cmake @@ -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 $) - 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) diff --git a/cmake/mission_build.cmake b/cmake/mission_build.cmake index dd5965fc6..c8961a293 100644 --- a/cmake/mission_build.cmake +++ b/cmake/mission_build.cmake @@ -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