X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvppinfra%2FCMakeLists.txt;h=8ec843ad2ca80148ddcaa2baaf41f675f498ea0b;hb=67d7acd05;hp=e667eb03e8ca00f63a3f583732a251f3906f8b34;hpb=053d0935244843199c433e92df666b4f79007727;p=vpp.git diff --git a/src/vppinfra/CMakeLists.txt b/src/vppinfra/CMakeLists.txt index e667eb03e8c..8ec843ad2ca 100644 --- a/src/vppinfra/CMakeLists.txt +++ b/src/vppinfra/CMakeLists.txt @@ -36,6 +36,13 @@ install( COMPONENT vpp-dev ) +add_definitions(-fvisibility=hidden) + +# Ensure symbols from cJSON are exported +set_source_files_properties( cJSON.c PROPERTIES + COMPILE_DEFINITIONS " CJSON_API_VISIBILITY " ) + + ############################################################################## # vppinfra sources ############################################################################## @@ -55,6 +62,8 @@ set(VPPINFRA_SRCS longjmp.S macros.c maplog.c + mem.c + mem_bulk.c mem_dlmalloc.c mhash.c mpcap.c @@ -85,6 +94,7 @@ set(VPPINFRA_SRCS valloc.c vec.c vector.c + cJSON.c ) set(VPPINFRA_HEADERS @@ -94,6 +104,8 @@ set(VPPINFRA_HEADERS bihash_40_8.h bihash_48_8.h bihash_8_8.h + bihash_8_16.h + bihash_24_16.h bihash_template.c bihash_template.h bihash_vec8_8.h @@ -102,6 +114,8 @@ set(VPPINFRA_HEADERS byte_order.h cache.h callback.h + callback_data.h + cJSON.h clib_error.h clib.h cpu.h @@ -131,14 +145,12 @@ set(VPPINFRA_HEADERS memcpy_sse3.h mem.h mhash.h - mheap.h mpcap.h os.h pcap.h pcap_funcs.h pmalloc.h pool.h - pmc.h ptclosure.h random_buffer.h random.h @@ -174,6 +186,7 @@ set(VPPINFRA_HEADERS vector.h vector_neon.h vector_sse42.h + warnings.h xxhash.h linux/syscall.h linux/sysfs.h @@ -187,11 +200,16 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") ) endif() +option(VPP_USE_EXTERNAL_LIBEXECINFO "Use external libexecinfo (useful for non-glibc targets)." OFF) +if(VPP_USE_EXTERNAL_LIBEXECINFO) + set(EXECINFO_LIB execinfo) +endif() add_vpp_library(vppinfra SOURCES ${VPPINFRA_SRCS} - LINK_LIBRARIES m + LINK_LIBRARIES m ${EXECINFO_LIB} INSTALL_HEADERS ${VPPINFRA_HEADERS} COMPONENT libvppinfra + LTO ) ##############################################################################