nuttx/libs/libc/stdlib
chao an 6ee9ec7656 build: add initial 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 -DBOARD_CONFIG=sim/nsh -GNinja
cmake -B build -DBOARD_CONFIG=sim:nsh -GNinja
cmake -B build -DBOARD_CONFIG=sabre-6quad/smp -GNinja
cmake -B build -DBOARD_CONFIG=lm3s6965-ek/qemu-flat -GNinja

(or full path in custom board) :
cmake -B build -DBOARD_CONFIG=$PWD/boards/sim/sim/sim/configs/nsh -GNinja

This uses ninja generator (install with sudo apt install ninja-build). To build:

$ cmake --build build

menuconfig:

$ cmake --build build -t menuconfig

--------------------------

2. cmake/build: reformat the cmake style by cmake-format

https://github.com/cheshirekow/cmake_format

$ pip install cmakelang

$ for i in `find -name CMakeLists.txt`;do cmake-format $i -o $i;done
$ for i in `find -name *\.cmake`;do cmake-format $i -o $i;done

Co-authored-by: Matias N <matias@protobits.dev>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:50:48 +08:00
..
CMakeLists.txt build: add initial cmake build system 2023-07-08 13:50:48 +08:00
Kconfig libs\libc\stdlib\Kconfig: Fix indentation 2023-05-18 15:43:22 +03:00
lib_abort.c lib_abort.c: Change call to userspace exit() into syscall _exit() 2023-02-22 01:10:39 +08:00
lib_abs.c
lib_aligned_alloc.c
lib_atexit.c libc: Move on_exit and __cxa_atexit in lib_atexit.c 2023-01-25 14:31:37 +02:00
lib_atof.c
lib_atoi.c
lib_atol.c
lib_atoll.c
lib_bsearch.c
lib_checkbase.c
lib_div.c
lib_exit.c sched/tls: remove PTHREAD_CLEANUP from Kconfig 2023-06-14 12:00:48 +08:00
lib_getprogname.c
lib_itoa.c
lib_labs.c
lib_ldiv.c
lib_llabs.c
lib_lldiv.c
lib_mblen.c libc/wchar: remove unnecessary config 2022-07-27 00:36:49 +08:00
lib_mbstowcs.c libc/wchar: remove unnecessary config 2022-07-27 00:36:49 +08:00
lib_mbtowc.c libc/wchar: support wchar 2022-07-27 00:36:49 +08:00
lib_mkdtemp.c
lib_mkstemp.c
lib_mktemp.c Replace nxsem API when used as a lock with nxmutex API 2022-10-17 15:59:46 +09:00
lib_openpty.c change strcpy to strlcpy 2023-02-24 12:15:40 +08:00
lib_posix_memalign.c
lib_ptsname.c
lib_ptsnamer.c
lib_qsort.c libc/qsort: fix invalid-pointer-pair if enable detect_invalid_pointer_pairs=2 2023-05-08 13:43:28 +02:00
lib_rand48.c stdlib: generate uniformly distributed pseudo-random numbers 2023-01-04 20:53:05 +08:00
lib_rand.c
lib_realpath.c
lib_srand.c
lib_strtol.c
lib_strtold.c fix a bug of strtof 2023-02-22 01:20:21 +08:00
lib_strtoll.c
lib_strtoul.c
lib_strtoull.c
lib_unlockpt.c
lib_valloc.c
lib_wcstombs.c libc/wchar: remove unnecessary config 2022-07-27 00:36:49 +08:00
lib_wctomb.c libc/wchar: support wchar 2022-07-27 00:36:49 +08:00
Make.defs Remove the tail spaces from all files except Documentation 2023-02-26 13:24:24 -08:00