-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use CMake #3455
Comments
@davids5 do you have some performance number from PX4 CMake compared with NuttX Makefile? |
@xiaoxiang781216 I have the slides from the 2019 Trip to meet with you. Shall I post them here? |
From CI standpoint here are 73 build of NuttX (1.5M SLOC )including PX4 (6M SLOC) in 12m 13s done as work flows |
Those are impressive times! |
Current PX4/NuttX is a bit more complex because the underlying NuttX build is still with Make, but PX4 parallelizes it per NuttX library (via cmake). The build history from my previous attempt (PX4/NuttX#46) has been lost, but it was drastically faster per build (multiple times faster). EDIT: I will verify the numbers for current comparison, but recursive Makefile usage seems to be a huge contributor to the difference. |
The number is great. The out of tree is also very useful. |
@dagar I saw you already done a huge work((PX4/NuttX#46), I am postive to integrate your work into mainline to simplify the daily work in PX4 and NuttX community. @v01d should we come up a detailed propose and send to dev@ for discussion? |
If you want you can send email to mailing list linking here, so that we do not split the discussion. |
@xiaoxiang781216 do you want to send an email linking to this issue? |
Ok, I will send an email in this weekend. |
I'm onboard with this. All I've wanted for years now was to be able to consume NuttX and NuttX-apps in a larger project directly from cmake. I mean, I do it now - but it's not clean by any means - mostly because of the in-source building. Out of tree building is probably the #1 benefit for doing this, IMO. But I think the benefits list is actually pretty long. |
+1
It is a good move. Build speed will increase and we should be able to get
CI times down to allow a review-merge cycle that does not span hours or
days. We may also benefit from reducing the circular dependencies to a
minimum.
*From:* Anthony Merlino ***@***.***
*Sent:* Saturday, April 10, 2021 7:06 PM
*To:* apache/incubator-nuttx
*Cc:* David Sidrane; Mention
*Subject:* Re: [apache/incubator-nuttx] Use CMake (#3455)
I'm onboard with this. All I've wanted for years now was to be able to
consume NuttX and NuttX-apps in a larger project directly from cmake. I
mean, I do it now - but it's not clean by any means - mostly because of the
in-source building. Out of tree building is probably the #1
<#1> benefit for doing this,
IMO. But I think the benefits list is actually pretty long.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3455 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAO3BXIK4INH3PCCOCBWGRLTID7X7ANCNFSM42O4HLAA>
.
|
Given the positive feedback so far I decided to start building the POC in the hopes that this helps move the decision forward. I'll try to continue a bit more and maybe open a draft PR soon, mostly for visbility, as it will take quite some time to ensure this is mergeable (and even so, I would pospone merging until other big changes are done). I mostly added new files and not touched existing makefiles, which will allow for easy rebasing as time goes on. I also would like some input in some points I haven't yet addressed correctly. |
Nice! I expect that many known issues will be resolved by migrating to CMake:
|
really looking forward to that. |
Any progress of this topic? |
The work is inactive for a while. From the feedback, the community want to support both method. Welcome to contrib. |
cmake support merge to the master, let's close this issue now. |
I'm opening this issue to discuss whether there would be interest in eventually migrating the build system to CMake. The motivation is in part a recent message by @dagar where he asked about this. But furthermore, the build system is sometimes quite a pain to maintain, and is extremely complex to fully understand.
The benefits of migrating towards CMake could be the following:
Furthermore, it can help alleviate issues that we face:
From the technical standpoint, migration would be indeed a lot of work but not necessarily hard. @dagar has already done prior work on this (on older version of NuttX). See here:
In general, the approach is more or less like this:
The idea would be to do this work in a separate branch and initially reach a minimal POC (support one board for example, and most of the complexity such as different platforms, kernel build, etc.). This can then be iterated until the user experience is right and then finally extended to all boards/arch.
@dagar has offered to help and I would also like to do so. At the moment, we would like to assess whether the community at least feels this is worthy of an attempt so we can slowly start heading this direction (we could aim for a major release of NuttX, so this is not rushed either).
The text was updated successfully, but these errors were encountered: