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

Implement psps without relying on aux_source_directory #135

Closed
matzipan opened this issue Feb 10, 2020 · 5 comments · Fixed by #148
Closed

Implement psps without relying on aux_source_directory #135

matzipan opened this issue Feb 10, 2020 · 5 comments · Fixed by #148
Assignees
Milestone

Comments

@matzipan
Copy link

Is your feature request related to a problem? Please describe.
The CMake documentation presents the following caveat for aux_source_directory:

It is tempting to use this command to avoid writing the list of source files for a library or executable target. While this seems to work, there is no way for CMake to generate a build system that knows when a new source file has been added.

Describe the solution you'd like
The targets should have a list of files that go into making the specific psps.

Requester Info
Andrei Zisu of Planetary Transportation Systems (Berlin, Germany).

@jphickey
Copy link
Contributor

I think this would be a good change, and it would make PSP's more modular and therefore more consistent with apps and the way everything else works. With this the change to do an out-of-tree PSP is also more straightforward and logical.

@jphickey
Copy link
Contributor

This is actually necessary in order to merge nasa/osal#312, so I'll do this.

@jphickey jphickey self-assigned this Mar 26, 2020
@skliper
Copy link
Contributor

skliper commented Mar 26, 2020

Would this along with the related source selection via cmake options make the psp module concept redundant?
Or does the concept of adding modules still give us something unique?

@jphickey
Copy link
Contributor

I actually liked the idea of going full-modular with PSP's. That is, the "psp name" simply translates to a list of modular components to build for platform support. I briefly experimented with this and I think it could work nicely.

That is, in my experiment, the PSP was defined like this:

set(pc-linux_MODULELIST
    pc-linux-startup
    virtual-1hz
    no-exceptions
    no-ssr
    no-watchdog
    port_stub
    ram_stub
    eeprom_stub
)

This is convenient in that any/all of those modules can exist out-of-tree, using the currently existing module/app search logic.

jphickey added a commit to jphickey/PSP that referenced this issue Mar 26, 2020
Do not use aux_source_directory to assemble a list of source files.
Instead, put a proper CMakeLists.txt file in each implementation
and build the implementation separately from the shared/common parts.

In addition to avoiding the aux_source_directory this allows PSP-specific
compile definitions to be set on a per-implementation basis because
it is defined separately.
@skliper
Copy link
Contributor

skliper commented Mar 27, 2020

I definitely like the single mechanism for defining the modules included the PSP as you show above, and using the existing search logic! Seems like a great simplification.

jphickey added a commit to jphickey/PSP that referenced this issue Mar 30, 2020
Do not use aux_source_directory to assemble a list of source files.
Instead, put a proper CMakeLists.txt file in each implementation
and build the implementation separately from the shared/common parts.

In addition to avoiding the aux_source_directory this allows PSP-specific
compile definitions to be set on a per-implementation basis because
it is defined separately.
astrogeco added a commit that referenced this issue Apr 14, 2020
Fix #135, Add separate CMakeLists.txt for each implementation
@astrogeco astrogeco added this to the 1.5.0 milestone Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants