anchao opened a new pull request, #6718:
URL: https://github.com/apache/incubator-nuttx/pull/6718

   ## Summary
   
   enhance cmake build system
   
   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
   ```
   
   Change-Id: I1146598134fc7ad1e5d96f6f154e49ed0ac7ce79
   Signed-off-by: chao.an <[email protected]>
   
   
   ## 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to