This is an automated email from the ASF dual-hosted git repository.

lupyuen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit ce7326bf14568e03f2f2f6dafacf92bbfb63528c
Author: simbit18 <[email protected]>
AuthorDate: Thu Apr 16 14:47:15 2026 +0200

    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 <[email protected]>
---
 tools/testbuild.sh | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/tools/testbuild.sh b/tools/testbuild.sh
index 420d553a035..baeed8952e1 100755
--- a/tools/testbuild.sh
+++ b/tools/testbuild.sh
@@ -35,6 +35,7 @@ MAKE=make
 unset testfile
 unset HOPTION
 unset STORE
+unset NXTMPDIR
 unset JOPTION
 PRINTLISTONLY=0
 GITCLEAN=0
@@ -42,6 +43,7 @@ SAVEARTIFACTS=0
 CHECKCLEAN=1
 CODECHECKER=0
 NINJACMAKE=0
+STORECMAKE=0
 RUN=0
 
 case $(uname -s) in
@@ -150,6 +152,7 @@ while [ ! -z "$1" ]; do
     ;;
   -S )
     STORE+=" $1"
+    STORECMAKE=1
     ;;
   --codechecker )
     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`
 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; }
 
 function exportandimport {
@@ -342,8 +353,8 @@ function configure_default {
 }
 
 function configure_cmake {
-  if ! cmake -B build -DBOARD_CONFIG=$config -GNinja 1>/dev/null; then
-    cmake -B build -DBOARD_CONFIG=$config -GNinja
+  if ! cmake -B build -DBOARD_CONFIG=$config -DNXTMPDIR="$NXTMPDIR" -GNinja 
1>/dev/null; then
+    cmake -B build -DBOARD_CONFIG=$config -DNXTMPDIR="$NXTMPDIR" -GNinja
     fail=1
   fi
 

Reply via email to