From 67b69daa801365481c04ca35d2984b0a056df058 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期三, 30 十二月 2020 14:12:29 +0800
Subject: [PATCH] udpate

---
 test_net_socket/CMakeLists.txt |   17 +++++++++++++++++
 src/CMakeLists.txt             |    2 +-
 build.sh                       |    4 ++--
 CMakeLists.txt                 |   31 +++----------------------------
 4 files changed, 23 insertions(+), 31 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c4a8bee..15ec6a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,33 +9,8 @@
 
 
 
-# add the MathFunctions library
-# if(USE_MYMATH)
-#  add_subdirectory(MathFunctions)
-#  list(APPEND EXTRA_LIBS MathFunctions)
-# endif()
-
-# list(APPEND EXTRA_INCLUDES "${PROJECT_SOURCE_DIR}/include/usgcommon")
-# list(APPEND EXTRA_LIBS lib/usgcommon)
+list(APPEND EXTRA_INCLUDES "${PROJECT_SOURCE_DIR}/include/usgcommon")
+list(APPEND EXTRA_LIBS ${PROJECT_SOURCE_DIR}/lib/libusgcommon.a pthread)
 
 add_subdirectory(${PROJECT_SOURCE_DIR}/src)
-# list(APPEND EXTRA_LIBS shm_queue)
-
-
-# target_link_libraries(B_BUS PUBLIC ${EXTRA_LIBS})
-
-# add the binary tree to the search path for include files
-# so that we will find BusConfig.h
-# target_include_directories(B_BUS PUBLIC
-#                            "${PROJECT_BINARY_DIR}"
-#                             ${EXTRA_INCLUDES}
-#                            )
-
-# add the executable
-# add_executable(B_BUS B_BUS.cxx)
-# add the install targets
-# install(TARGETS B_BUS DESTINATION bin)
-# install(FILES "${PROJECT_BINARY_DIR}/BusConfig.h"
-#   DESTINATION include
-#   )
- 
+add_subdirectory(${PROJECT_SOURCE_DIR}/test_net_socket)
\ No newline at end of file
diff --git a/build.sh b/build.sh
index f8f00de..14c25ba 100755
--- a/build.sh
+++ b/build.sh
@@ -1,7 +1,7 @@
 #! /bin/bash
 
-rm -rf build
-mkdir build
+[ -d build ] || mkdir build
+rm -rf build/*
 cd build
 # cmake ../Step2
 # cmake ../Step4 -DSUPPORT_RDMA=OFF
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 86714bb..0e9667a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -30,7 +30,7 @@
 
 target_include_directories(shm_queue PUBLIC
                            "${PROJECT_BINARY_DIR}"
-                           "${PROJECT_SOURCE_DIR}/include/usgcommon"
+                           ${EXTRA_INCLUDES}
                            )
 
 target_include_directories(shm_queue PUBLIC
diff --git a/test_net_socket/CMakeLists.txt b/test_net_socket/CMakeLists.txt
new file mode 100644
index 0000000..d9e0d62
--- /dev/null
+++ b/test_net_socket/CMakeLists.txt
@@ -0,0 +1,17 @@
+
+
+# add the executable
+add_executable(test_net_mod_socket test_net_mod_socket.cpp)
+target_link_libraries(test_net_mod_socket PUBLIC shm_queue  ${EXTRA_LIBS} )
+
+add_executable(heart_beat heart_beat.cpp)
+target_link_libraries(heart_beat PUBLIC shm_queue  ${EXTRA_LIBS} )
+
+
+target_include_directories(test_net_mod_socket PUBLIC
+                            "${PROJECT_BINARY_DIR}"
+                             ${EXTRA_INCLUDES}
+                            )
+
+# add the install targets
+install(TARGETS test_net_mod_socket DESTINATION bin)

--
Gitblit v1.8.0