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

Adding restrict_platform support for FPRIME_HAS_XYZ flags #3037

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

LeStarch
Copy link
Collaborator

Related Issue(s)
Has Unit Tests (y/n)
Documentation Included (y/n)

Change Description

restrict_platforms is a nice feature to prevent code from attempting to build on platforms that do not support a given module. However, ongoing work in the VxWorks area has shown that some platforms support features (e.g. SOCKETS) without the platform (e.g. VxWorks) in the restrict-to list nor the restrict-to pseudo list (e.g. Posix).

This implies that restrict_platforms should also support feature sets. This PR allows syntax like the following:

restrict_plarforms(SOCKETS)

and allows platform developers to set the corresponding flag

set(FPRIME_HAS_SOCKETS)

This will allow platforms to pass for code built on a feature set that isn't as clear cut as platform (e.g. Linux), toolchain (e.g. arm-linux), or Posix sudo-os.

Extending to the future, this could be used to allow code that is built on platforms with pre-supplied libraries installed (e.g. the platform and cross-compiler supply opencv). This could be represented as FPRIME_HAS_OPENCV.

Note: OPENCV here is a hypothetical example, and is not implemented in this PR.

@LeStarch LeStarch requested review from kevin-f-ortega and thomas-bc and removed request for kevin-f-ortega November 21, 2024 02:45
@LeStarch
Copy link
Collaborator Author

@thomas-bc and @kevin-f-ortega this PR is needed to build VxWorks w/ sockets when the VxWorks posix support layer is turned off.

Copy link
Collaborator

@kevin-f-ortega kevin-f-ortega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks! Just one question

@LeStarch LeStarch merged commit a819e33 into nasa:devel Nov 22, 2024
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants