summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoryangwei <[email protected]>2023-08-25 20:52:20 +0800
committeryangwei <[email protected]>2023-08-25 20:52:20 +0800
commit7bbf7a8250384fbdcc1ccb74bd4cf3edf22a0b97 (patch)
tree236ed95c1592ddf93445eba97085436ae0282a68 /test
parent7f030e53c0b78d0b3dedbb0a5bed4b7dcb4de4fd (diff)
🔧 build(jemalloc-static): sapp_devel启用jemalloc时,显式链接
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 4d2446b..af20dd9 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -24,13 +24,15 @@ set(LIBS sapp_dev dealpkt packet_io packet_io_pcap packet_io_marsio common
MESA_sleep dpdk_ip_hash cpu_limit timeout libdabloom )
if(LIBEVENT_ENABLED)
- set(LIBS ${LIBS} libevent-static)
+ set(LIBS ${LIBS} libevent-static)
endif()
add_library(sapp_devel SHARED sapp_devel.cpp)
target_link_libraries(sapp_devel -Wl,--whole-archive ${LIBS} -Wl,--no-whole-archive)
-#add_library(sapp_devel_static STATIC sapp_devel.cpp)
+if(MEM_POOL STREQUAL "JEMALLOC_STATIC")
+ target_link_libraries(sapp_devel libjemalloc-static)
+endif()
set(OBJECTS_DIR ${CMAKE_CURRENT_BINARY_DIR}/temp_objs)
@@ -55,15 +57,13 @@ add_custom_target(sapp_devel_static ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/lib
add_library(test_app_sapp SHARED test_app_sapp.c)
+set_target_properties(test_app_sapp PROPERTIES PREFIX "")
+
#add_executable(test_sapp_dev test_sapp_dev.c)
#target_link_libraries(test_sapp_dev sapp_devel)
#target_link_libraries(test_sapp_dev pthread dl m pcap systemd MESA_htable MESA_handle_logger MESA_prof_load MESA_field_stat2 fieldstat3 breakpad_mini MESA_jump_layer)
-#if(MEM_POOL STREQUAL "JEMALLOC_STATIC")
-# target_link_libraries(test_sapp_dev libjemalloc-static)
-#endif()
#add_library(test_sendpacket_performance SHARED test_sendpacket_performance.c)
-set_target_properties(test_app_sapp PROPERTIES PREFIX "")
#set_target_properties(test_sendpacket_performance PROPERTIES PREFIX "")