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

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


The following commit(s) were added to refs/heads/master by this push:
     new b2f7ead2d apps/examples/udp: Update CMAKEList.txt for UDP tests under 
CMAKE
b2f7ead2d is described below

commit b2f7ead2dd0bb37392c2095bcd6cc0dcb04e6922
Author: zhangkai25 <[email protected]>
AuthorDate: Sat Feb 8 13:44:04 2025 +0800

    apps/examples/udp: Update CMAKEList.txt for UDP tests under CMAKE
    
    add Update CMAKEList.txt for UDP tests under CMAKE
    
    Signed-off-by: zhangkai25 <[email protected]>
---
 examples/udp/CMakeLists.txt | 57 ++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 56 insertions(+), 1 deletion(-)

diff --git a/examples/udp/CMakeLists.txt b/examples/udp/CMakeLists.txt
index 996b9a9be..b3cbdf166 100644
--- a/examples/udp/CMakeLists.txt
+++ b/examples/udp/CMakeLists.txt
@@ -21,5 +21,60 @@
 # 
##############################################################################
 
 if(CONFIG_EXAMPLES_UDP)
-  nuttx_add_application(NAME udp)
+
+  # Basic UDP networking test
+
+  set(CSRCS udp_cmdline.c)
+
+  if(CONFIG_EXAMPLES_UDP_NETINIT)
+    list(APPEND CSRCS udp_netinit.c)
+  endif()
+
+  # Target 1 Files
+
+  if(CONFIG_EXAMPLES_UDP_SERVER1)
+    list(APPEND CSRCS udp_server.c)
+  else()
+    list(APPEND CSRCS udp_client.c)
+  endif()
+
+  nuttx_add_application(
+    NAME
+    ${CONFIG_EXAMPLES_UDP_PROGNAME1}
+    PRIORITY
+    ${CONFIG_EXAMPLES_UDP_PRIORITY1}
+    STACKSIZE
+    ${CONFIG_EXAMPLES_UDP_STACKSIZE1}
+    MODULE
+    ${CONFIG_EXAMPLES_UDP}
+    INCLUDE_DIRECTORIES
+    ${CMAKE_BINARY_DIR}/include/nuttx
+    SRCS
+    udp_target1.c
+    ${CSRCS})
+
+  # Target 2 Files
+
+  if(CONFIG_EXAMPLES_UDP_TARGET2)
+    if(CONFIG_EXAMPLES_UDP_SERVER1)
+      list(APPEND CSRCS udp_client.c)
+    else()
+      list(APPEND CSRCS udp_server.c)
+    endif()
+
+    nuttx_add_application(
+      NAME
+      ${CONFIG_EXAMPLES_UDP_PROGNAME2}
+      PRIORITY
+      ${CONFIG_EXAMPLES_UDP_PRIORITY2}
+      STACKSIZE
+      ${CONFIG_EXAMPLES_UDP_STACKSIZE2}
+      MODULE
+      ${CONFIG_EXAMPLES_UDP}
+      INCLUDE_DIRECTORIES
+      ${CMAKE_BINARY_DIR}/include/nuttx
+      SRCS
+      udp_target2.c
+      ${CSRCS})
+  endif()
 endif()

Reply via email to