From 49dec5b48cb3ccb426cc2c65e07eb4d8775976a6 Mon Sep 17 00:00:00 2001 From: chao an Date: Tue, 25 Jul 2023 11:44:48 +0800 Subject: [PATCH] cmake/build: fix build break on cmake Signed-off-by: chao an --- arch/sim/src/sim/CMakeLists.txt | 4 ++++ fs/driver/CMakeLists.txt | 3 ++- fs/rpmsgfs/CMakeLists.txt | 10 +++++++++- net/socket/CMakeLists.txt | 1 + 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/arch/sim/src/sim/CMakeLists.txt b/arch/sim/src/sim/CMakeLists.txt index 84d6fd6760..3e31209c50 100644 --- a/arch/sim/src/sim/CMakeLists.txt +++ b/arch/sim/src/sim/CMakeLists.txt @@ -110,6 +110,10 @@ else() list(APPEND STDLIBS rt) endif() +if(CONFIG_LIBM_TOOLCHAIN) + list(APPEND STDLIBS m) +endif() + if(CONFIG_RPTUN) list(APPEND SRCS sim_rptun.c) endif() diff --git a/fs/driver/CMakeLists.txt b/fs/driver/CMakeLists.txt index fd35b53ca1..18b3f97da0 100644 --- a/fs/driver/CMakeLists.txt +++ b/fs/driver/CMakeLists.txt @@ -32,7 +32,8 @@ if(NOT CONFIG_DISABLE_MOUNTPOINT) fs_openblockdriver.c fs_closeblockdriver.c fs_blockpartition.c - fs_findmtddriver.c) + fs_findmtddriver.c + fs_closemtddriver.c) if(CONFIG_MTD) list(APPEND SRCS fs_registermtddriver.c fs_unregistermtddriver.c diff --git a/fs/rpmsgfs/CMakeLists.txt b/fs/rpmsgfs/CMakeLists.txt index 2d49c53b63..e36a6c7003 100644 --- a/fs/rpmsgfs/CMakeLists.txt +++ b/fs/rpmsgfs/CMakeLists.txt @@ -18,6 +18,14 @@ # # ############################################################################## +set(SRCS) + if(CONFIG_FS_RPMSGFS) - target_sources(fs PRIVATE rpmsgfs.c rpmsgfs_client.c rpmsgfs_server.c) + list(APPEND SRCS rpmsgfs.c rpmsgfs_client.c) endif() + +if(CONFIG_FS_RPMSGFS_SERVER) + list(APPEND SRCS rpmsgfs_server.c) +endif() + +target_sources(fs PRIVATE ${SRCS}) diff --git a/net/socket/CMakeLists.txt b/net/socket/CMakeLists.txt index 0c661fc4f1..ec45c8a9c2 100644 --- a/net/socket/CMakeLists.txt +++ b/net/socket/CMakeLists.txt @@ -36,6 +36,7 @@ set(SRCS net_close.c recvmsg.c sendmsg.c + shutdown.c net_dup2.c net_sockif.c net_poll.c