Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot specify custom PSP directory using psp_MISSION_DIR #1921

Closed
astrogeco opened this issue Aug 31, 2021 · 1 comment · Fixed by #1864 or #1885
Closed

Cannot specify custom PSP directory using psp_MISSION_DIR #1921

astrogeco opened this issue Aug 31, 2021 · 1 comment · Fixed by #1864 or #1885

Comments

@astrogeco
Copy link
Contributor

astrogeco commented Aug 31, 2021

Describe the bug

Originally discussed in #1864 by @jbohren-hbr

Cannot specify "non-standard" psp source directory via the environment variable $CFS_APP_PATH or the cmake variable ${psp_SEARCH_PATH}.

The cFE cmake build infrastructure uses the environment / cmake variable $CFS_APP_PATH
as well as the cmake meta-variable pattern ${${APP}_SEARCH_PATH} to locate apps and other modules (such as psp), and subsequently sets the variable pattern ${${APP}_MISSION_DIR} (see mission_build.cmake lines 202-222).

# Now search for the rest of CFS applications/libraries/modules - these may exist in
# any directory within the search path.
foreach(APP ${MISSION_DEPS})
set (APPFOUND FALSE)
foreach(APPSRC ${MISSION_MODULE_SEARCH_PATH} ${${APP}_SEARCH_PATH})
if (NOT IS_ABSOLUTE "${APPSRC}")
set(APPSRC "${MISSION_SOURCE_DIR}/${APPSRC}")
endif()
if(IS_DIRECTORY "${APPSRC}/${APP}")
set(APPFOUND "${APPSRC}/${APP}")
break()
endif()
endforeach()
if (APPFOUND)
get_filename_component(${APP}_MISSION_DIR "${APPFOUND}" ABSOLUTE)
message(STATUS "Module '${APP}' found at ${${APP}_MISSION_DIR}")
else()
message("** Module ${APP} NOT found **")
math(EXPR APP_MISSING_COUNT "${APP_MISSING_COUNT} + 1")
endif()
endforeach()

However, the resulting variable ${psp_MISSION_DIR} is not used in process_arch() in arch_build.cmake line 588 when including a target platform's build_options.cmake file. This causes a cmake configuration failure when trying to use a non-standard psp location.

cFE/cmake/arch_build.cmake

Lines 587 to 589 in 5e41330

# Include any specific compiler flags or config from the selected PSP
include(${MISSION_SOURCE_DIR}/psp/fsw/${CFE_SYSTEM_PSPNAME}/make/build_options.cmake)

To Reproduce
Build with psp in non-standard location, with the CFS_APP_PATH environment variable set

Expected behavior
${psp_MISSION_DIR} is used in process_arch() in arch_build.cmake for a successful build

System observed on:
System(s) tested on

Hardware: PC
OS: Ubuntu 18.04
Versions: cFE v6.8.0-rc1+dev933

Reporter Info
@jbohren-hbr

@jbohren-hbr
Copy link
Contributor

@astrogeco thanks for retroactively creating the issue! This is all accurate.

astrogeco added a commit that referenced this issue Aug 31, 2021
…-psp-mission-dir

Fix #1921, support for non-standard psp source directory
astrogeco pushed a commit to astrogeco/cFE that referenced this issue Sep 1, 2021
@skliper skliper added this to the 7.0.0 milestone Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants