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

Add Ninja support #188

Merged
merged 20 commits into from
Jan 16, 2024
Merged

Add Ninja support #188

merged 20 commits into from
Jan 16, 2024

Conversation

thomas-bc
Copy link
Contributor

@thomas-bc thomas-bc commented Jan 5, 2024

Related Issue(s) nasa/fprime#2376
Has Unit Tests (y/n) CI int test
Documentation Included (y/n) y

Change Description

Add support for using the Ninja CMake Generator. Turns out not a lot of things needed changing, for one main reason: Ninja refreshes the build cache automatically when it detects changes or a missing target.

fprime-util generate --ninja generates a build cache using Ninja.

Testing/Review Recommendations

Beta release? I tested manually as much as I could, but I'm sure there's going to be edge cases.

@thomas-bc thomas-bc marked this pull request as ready for review January 9, 2024 23:57
# CMake 3.12+ supports parallel builds with -j
jobs = make_args.pop("--jobs", None)
if jobs is not None:
run_args.extend(["-j", str(jobs)])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note: try to not specify the -j flag when building without it.

src/fprime/fbuild/cmake.py Show resolved Hide resolved
src/fprime/util/cli.py Outdated Show resolved Hide resolved
src/fprime/fbuild/cli.py Show resolved Hide resolved
@thomas-bc thomas-bc merged commit d41baf3 into nasa:devel Jan 16, 2024
29 checks passed
@thomas-bc thomas-bc deleted the ninja-support branch January 16, 2024 17:54
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.

None yet

2 participants