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

Fix #739, add global module list and mission default file #740

Closed
wants to merge 2 commits into from

Conversation

jphickey
Copy link
Contributor

Describe the contribution
Add more hooks for additional flexibility when adding modular code blobs into the build.

Three new directives are added:

  • MISSION_CORE_MODULES : for modular components which are direct dependencies of CFE core and/or extend its functionality.

  • MISSION_GLOBAL_APPLIST : for applications/libraries which should be built for every target, as if they were listed in every TGTx_APPLIST setting.

  • MISSION_GLOBAL_STATIC_APPLIST : same as above but for the TGTx_STATIC_APPLIST setting.

This also simplifies/reworks the search path to remove some logic that was never really utilized.

Fixes #739
Also Fixes #718 (supercedes/includes previous PR #720)

Testing performed
Build, sanity check CFE and unit test.
Tested adding modules to the new lists and confirm the modules are found and built as expected.

Expected behavior changes
Users have additional flexibility when configuring/customizing their CFE build.

System(s) tested on
Ubuntu 20.04

Additional context
The initial intent with MISSION_CORE_MODULES is to provide a simple place for something like #711.

The initial intent with MISSION_GLOBAL_APPLIST is that we can easily tack on extra libraries when unit testing is enabled, e.g.

if (ENABLE_UNIT_TESTS)
   list(APPEND MISSION_GLOBAL_APPLIST cfe_assert)
endif (ENABLE_UNIT_TESTS)

This will automatically build the assert library for every target when unit testing is turned on, but it is still up the user to actually load it, but that can be done at runtime - it doesn't change the core CFE environment.

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

Add more hooks for additional flexibility when adding
modular code blobs into the build.

Three new directives are added:

MISSION_CORE_MODULES, for modular components which are
direct dependencies of CFE core and/or extend its functionality.

MISSION_GLOBAL_APPLIST, for applications/libraries which
should be built for every target, as if they were listed
in every TGTx_APPLIST setting.

MISSION_GLOBAL_STATIC_APPLIST, same as above but for the
TGTx_STATIC_APPLIST setting.

This also simplifies/reworks the search path to remove
some logic that was never really utilized.
cmake/mission_build.cmake Outdated Show resolved Hide resolved
@skliper
Copy link
Contributor

skliper commented Jun 15, 2020

Another suggestion - how about also adding in a line to arch_build.cmake after the "widely-used public headers" block to include any of the module target interface includes?

This allows users to more easily find (and configure, if they choose)
the standard search path for modular code items.

Also print the search path as part of the status messages.
@skliper
Copy link
Contributor

skliper commented Jun 16, 2020

Another suggestion - how about also adding in a line to arch_build.cmake after the "widely-used public headers" block to include any of the module target interface includes?

Opinions on this? Would add what I need, and seems to make general sense.

@jphickey
Copy link
Contributor Author

Another suggestion - how about also adding in a line to arch_build.cmake after the "widely-used public headers" block to include any of the module target interface includes?

Opinions on this? Would add what I need, and seems to make general sense.

Yeah I am not sure I'm interpreting this correctly -- sounds like this be basically adding include_directories for public APIs from all modulles all the time?

This makes for some potentially very large include paths... I'd prefer that code modules expressly declare the items they depend on in their CMakeLists.txt file... this has been in the form of an explicit include_directories to this point but I think interface targets could work nicely for that.

At any rate - either way it doesn't seem directly related to the defaults file being proposed in this PR - maybe we can open a new ticket to discuss it?

@skliper
Copy link
Contributor

skliper commented Jun 17, 2020

At any rate - either way it doesn't seem directly related to the defaults file being proposed in this PR - maybe we can open a new ticket to discuss it?

True, good plan. It was more of a quick fix idea vs the preferred interface targets.

@astrogeco
Copy link
Contributor

astrogeco commented Jun 24, 2020

@skliper @jphickey do we want to add this to today's list for discussion?

@jphickey
Copy link
Contributor Author

This has been rebased and is now part of #751. Closing this PR.

@jphickey jphickey closed this Jun 26, 2020
@jphickey jphickey deleted the fix-739-generic-module-path branch October 14, 2020 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement generic location for CFE modules Add user-specified extra modules to build system
3 participants