[toranj] add cmake option to build script (#4374)

This commit adds a `cmake` option to the `build.sh` to configure and
build OpenThread NCP/CLI for FTD/MTD/RCP modes using cmake/ninja.
This commit is contained in:
Abtin Keshavarzian
2019-12-11 09:26:32 -08:00
committed by Jonathan Hui
parent c75533fd15
commit db1f7d2eac
+9
View File
@@ -39,6 +39,7 @@ display_usage() {
echo " ncp : Build OpenThread NCP FTD mode with POSIX platform"
echo " rcp : Build OpenThread RCP (NCP in radio mode) with POSIX platform"
echo " posix-app : Build OpenThread POSIX App NCP"
echo " cmake : Configure and build OpenThread using cmake/ninja (RCP and NCP) only"
echo ""
echo "Options:"
echo " -c/--enable-coverage Enable code coverage"
@@ -131,6 +132,14 @@ case ${build_config} in
make -j 8 || die
;;
cmake)
echo "===================================================================================================="
echo "Building OpenThread (NCP/CLI for FTD/MTD/RCP mode) with POSIX platform using cmake"
echo "===================================================================================================="
cmake -GNinja -DOT_PLATFORM=posix -DOT_CONFIG=../tests/toranj/openthread-core-toranj-config.h . || die
ninja || die
;;
*)
echo "Error: Unknown configuration \"$1\""
display_usage