mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
testbuild.sh: CMake Added -DNXTMPDIR
- It is now possible to create folder for third-party packages in CMake as well. (Aligned with Make) Signed-off-by: simbit18 <simbit18@gmail.com>
This commit is contained in:
+13
-2
@@ -35,6 +35,7 @@ MAKE=make
|
|||||||
unset testfile
|
unset testfile
|
||||||
unset HOPTION
|
unset HOPTION
|
||||||
unset STORE
|
unset STORE
|
||||||
|
unset NXTMPDIR
|
||||||
unset JOPTION
|
unset JOPTION
|
||||||
PRINTLISTONLY=0
|
PRINTLISTONLY=0
|
||||||
GITCLEAN=0
|
GITCLEAN=0
|
||||||
@@ -42,6 +43,7 @@ SAVEARTIFACTS=0
|
|||||||
CHECKCLEAN=1
|
CHECKCLEAN=1
|
||||||
CODECHECKER=0
|
CODECHECKER=0
|
||||||
NINJACMAKE=0
|
NINJACMAKE=0
|
||||||
|
STORECMAKE=0
|
||||||
RUN=0
|
RUN=0
|
||||||
|
|
||||||
case $(uname -s) in
|
case $(uname -s) in
|
||||||
@@ -150,6 +152,7 @@ while [ ! -z "$1" ]; do
|
|||||||
;;
|
;;
|
||||||
-S )
|
-S )
|
||||||
STORE+=" $1"
|
STORE+=" $1"
|
||||||
|
STORECMAKE=1
|
||||||
;;
|
;;
|
||||||
--codechecker )
|
--codechecker )
|
||||||
CODECHECKER=1
|
CODECHECKER=1
|
||||||
@@ -200,6 +203,14 @@ if [ ${NINJACMAKE} -eq 1 ]; then
|
|||||||
cmakelist=`grep "^[C|c][M|m][A|a][K|k][E|e]" $testfile | cut -d',' -f2 || true`
|
cmakelist=`grep "^[C|c][M|m][A|a][K|k][E|e]" $testfile | cut -d',' -f2 || true`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ${STORECMAKE} -eq 1 ]; then
|
||||||
|
NXTMPDIR="ON"
|
||||||
|
echo "NXTMPDIR store is enabled"
|
||||||
|
else
|
||||||
|
NXTMPDIR="OFF"
|
||||||
|
echo "NXTMPDIR store is disabled"
|
||||||
|
fi
|
||||||
|
|
||||||
cd $nuttx || { echo "ERROR: failed to CD to $nuttx"; exit 1; }
|
cd $nuttx || { echo "ERROR: failed to CD to $nuttx"; exit 1; }
|
||||||
|
|
||||||
function exportandimport {
|
function exportandimport {
|
||||||
@@ -342,8 +353,8 @@ function configure_default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function configure_cmake {
|
function configure_cmake {
|
||||||
if ! cmake -B build -DBOARD_CONFIG=$config -GNinja 1>/dev/null; then
|
if ! cmake -B build -DBOARD_CONFIG=$config -DNXTMPDIR="$NXTMPDIR" -GNinja 1>/dev/null; then
|
||||||
cmake -B build -DBOARD_CONFIG=$config -GNinja
|
cmake -B build -DBOARD_CONFIG=$config -DNXTMPDIR="$NXTMPDIR" -GNinja
|
||||||
fail=1
|
fail=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user