You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/07/27 08:23:00 UTC
[GitHub] [incubator-nuttx-apps] anchao opened a new pull request, #1236: add CMake build system support
anchao opened a new pull request, #1236:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1236
## Summary
enhance cmake build system (Enhance #3704)
1. Update all CMakeLists.txt to adapt to new layout
2. Fix cmake build break
3. Update all new file license
4. Fully compatible with current compilation environment(use configure.sh or cmake as you choose)
------------------
How to test
```
From within nuttx/. Configure:
$ cmake -B build -DNUTTX_BOARD=arm/imx6/sabre-6quad -DNUTTX_CONFIG=smp -GNinja
$ cmake -B build -DNUTTX_BOARD=arm/tiva/lm3s6965-ek -DNUTTX_CONFIG=qemu-flat -GNinja
$ cmake -B build -DNUTTX_BOARD=sim/sim/sim -DNUTTX_CONFIG=nsh -GNinja
This uses ninja generator (install with sudo apt install ninja-build). To build:
$ cmake --build build
menuconfig:
$ cmake --build build -t menuconfig
```
------------------
Compilation speed:
```
| lm3s6965-ek/qemu-flat:
| Orignal : $ time `./tools/configure.sh lm3s6965-ek/qemu-flat > /dev/null && make -j16 > /dev/null`
| CMake : $ time `cmake -B build -DNUTTX_BOARD=arm/tiva/lm3s6965-ek -DNUTTX_CONFIG=qemu-flat > /dev/null;cmake --build build -j16 > /dev/null`
| CMake(Ninja): $ time `cmake -B build -DNUTTX_BOARD=arm/tiva/lm3s6965-ek -DNUTTX_CONFIG=qemu-flat -GNinja > /dev/null;cmake --build build -j16 > /dev/null`
|
| Orignal CMake CMake(Ninja)
| real 0m9.982s 0m4.739s 0m4.475s
| user 1m5.336s 0m41.846s 0m37.434s
| sys 0m16.428s 0m9.239s 0m7.998s
|
|
| Orignal : $ time `./tools/configure.sh sabre-6quad/smp > /dev/null && make -j16 > /dev/null`
| CMake : $ time `cmake -B build -DNUTTX_BOARD=arm/imx6/sabre-6quad -DNUTTX_CONFIG=smp > /dev/null;cmake --build build -j16 > /dev/null`
| CMake(Ninja): $ time `cmake -B build -DNUTTX_BOARD=arm/imx6/sabre-6quad -DNUTTX_CONFIG=smp -GNinja > /dev/null;cmake --build build -j16 > /dev/null`
|
| Orignal CMake CMake(Ninja)
| real 0m10.921s 0m3.936s 0m3.616s
| user 0m51.603s 0m32.621s 0m29.102s
| sys 0m13.720s 0m8.075s 0m6.460s
```
Signed-off-by: chao.an <an...@xiaomi.com>
## Impact
N/A
## Testing
cmake -B build -DNUTTX_BOARD=sim/sim/sim -DNUTTX_CONFIG=nsh -GNinja
cmake -B build -DNUTTX_BOARD=arm/imx6/sabre-6quad -DNUTTX_CONFIG=smp -GNinja
cmake -B build -DNUTTX_BOARD=arm/tiva/lm3s6965-ek -DNUTTX_CONFIG=qemu-flat -GNinja
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] xiaoxiang781216 merged pull request #1236: add CMake build system support
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #1236:
URL: https://github.com/apache/nuttx-apps/pull/1236
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] davids5 commented on pull request #1236: add CMake build system support
Posted by GitBox <gi...@apache.org>.
davids5 commented on PR #1236:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1236#issuecomment-1196523506
@anchao Nice! - what are the times for `touch`ing one file and rebuilding
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] anchao commented on pull request #1236: add CMake build system support
Posted by GitBox <gi...@apache.org>.
anchao commented on PR #1236:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1236#issuecomment-1197660408
> @anchao Nice! - what are the times for `touch`ing one file and rebuilding
the rebuilding time depends on whether the file has changed, please pick the changes and try it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] davids5 commented on pull request #1236: add CMake build system support
Posted by GitBox <gi...@apache.org>.
davids5 commented on PR #1236:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1236#issuecomment-1197921746
Of course it depends on the file, I already know it is way faster, but besides the advantage shoring not only the CI cycle it will shorten the dev cycle and that is were the ROI on this is massive. I was hoping you would showcase that herein to make it very clear to all the project members.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx-apps] anchao commented on pull request #1236: add CMake build system support
Posted by "anchao (via GitHub)" <gi...@apache.org>.
anchao commented on PR #1236:
URL: https://github.com/apache/nuttx-apps/pull/1236#issuecomment-1627947736
> In order to avoid confusion, I think the following comments should be added to the top-level `CMakeLists.txt`:
...
> @anchao WDYT?
Hi, @midokura-xavi92 san,
Thank you! I submitted your suggestions in a new PR https://github.com/apache/nuttx-apps/pull/1826 , since cmake has been merged into the mainline, community welcomes more developers to enhance it together, I think you can send the PR directly if you have any suggestions, thanks again!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org