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 #1284, add export targets and package script #1313

Merged
merged 1 commit into from
Oct 17, 2022

Conversation

jphickey
Copy link
Contributor

Checklist (Please check before submitting)

Describe the contribution
Adds optional "install" commands to CMake script, which is useful when building OSAL as a standalone software package. The public API and static libraries will be installed to the specified system location, and can then be used to compile and link external OSAL applications without the need for the original OSAL source or build trees.

Note this also installs the "osconfig.h" file as this does affect the binary formats of some items (i.e. size of items using OS_MAX_API_NAME and other similar structure members). The external application must be compiled using the same osconfig.h after installation.

Fixes #1284

Testing performed
Build OSAL with both CFE and standalone and run all tests (existing build)

Then run "make install" on standalone build to stage headers and library binaries to a build tree. Tested an external application to using find_package(NasaOsal) and building against the OSAL headers and binaries provided by that exported package.

Expected behavior changes
Exports a CMake package containing targets that can be used by OTHER builds without necessarily having the full OSAL source tree integrated into that project.

System(s) tested on
Ubuntu 22.04

Additional context
This is necessary when developing standalone (non-CFE) software that still uses OSAL to provide portability to different systems and/or does any unit testing (the exported packages includes UT assert).

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

Adds optional "install" commands to CMake script, which is useful when
building OSAL as a standalone software package.  The public API and
static libraries will be installed to the specified system location, and
can then be used to compile and link external OSAL applications without
the need for the original OSAL source or build trees.

Note this also installs the "osconfig.h" file as this does affect the
binary formats of some items (i.e. size of items using OS_MAX_API_NAME
and other similar structure members).  The external application must be
compiled using the same osconfig.h after installation.
@jphickey jphickey added the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label Oct 12, 2022
@dzbaker
Copy link
Collaborator

dzbaker commented Oct 13, 2022

CCB 13 October 2022: Approved pending workflow re-run.

dzbaker added a commit to nasa/cFS that referenced this pull request Oct 17, 2022
*Combines:*

cfe v7.0.0-rc4+dev197
osal v7.0.0-rc4+dev143
psp v1.6.0-rc4+dev61
elf2cfetbl v3.4.0-rc4+dev30
sch_lab v2.5.0-rc4+dev45

**Includes:**

*cFS*
- #589

*cFE*
- nasa/cFE#2165

*osal*
- nasa/osal#1311
- nasa/osal#1310
- nasa/osal#1313
- nasa/osal#1306
- nasa/osal#1309

*psp*
- nasa/PSP#365
- nasa/PSP#368

*sch_lab*
- nasa/sch_lab#126

*elf2cfetbl*
- nasa/elf2cfetbl#119

Co-authored-by: Avi Weiss <[email protected]>
Co-authored by: Joseph Hickey <[email protected]>
Co-authored by: Ariel Adams <[email protected]>
@dzbaker dzbaker mentioned this pull request Oct 17, 2022
2 tasks
@dzbaker dzbaker merged commit a2b5c2e into nasa:main Oct 17, 2022
dzbaker added a commit to nasa/cFS that referenced this pull request Oct 17, 2022
*Combines:*

cfe v7.0.0-rc4+dev197
osal v7.0.0-rc4+dev143
psp v1.6.0-rc4+dev61
elf2cfetbl v3.4.0-rc4+dev30
sch_lab v2.5.0-rc4+dev45

**Includes:**

*cFS*
- #589

*cFE*
- nasa/cFE#2165

*osal*
- nasa/osal#1311
- nasa/osal#1310
- nasa/osal#1313
- nasa/osal#1306
- nasa/osal#1309

*psp*
- nasa/PSP#365
- nasa/PSP#368

*sch_lab*
- nasa/sch_lab#126

*elf2cfetbl*
- nasa/elf2cfetbl#119

Co-authored-by: Avi Weiss <[email protected]>
Co-authored by: Joseph Hickey <[email protected]>
Co-authored by: Ariel Adams <[email protected]>
@jphickey jphickey deleted the fix-1284-install-export-tgt branch October 18, 2022 13:55
@dmknutsen dmknutsen added this to the Draco milestone Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) draco-rc4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Standalone OSAL build should export a package for use by other builds
3 participants