diff options
-rw-r--r-- | src/vppinfra/CMakeLists.txt | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/vppinfra/CMakeLists.txt b/src/vppinfra/CMakeLists.txt index 17daecd8ec1..ecd1528c391 100644 --- a/src/vppinfra/CMakeLists.txt +++ b/src/vppinfra/CMakeLists.txt @@ -43,7 +43,6 @@ set(VPPINFRA_SRCS backtrace.c cpu.c cuckoo_template.c - dlmalloc.c elf.c elf_clib.c elog.c @@ -57,7 +56,6 @@ set(VPPINFRA_SRCS longjmp.S macros.c maplog.c - mem_dlmalloc.c mhash.c pool.c ptclosure.c @@ -90,6 +88,18 @@ set(VPPINFRA_SRCS linux/sysfs.c ) +if(VPP_USE_DLMALLOC) + list(APPEND VPPINFRA_SRCS + dlmalloc.c + mem_dlmalloc.c + ) +else(VPP_USE_DLMALLOC) + list(APPEND VPPINFRA_SRCS + mheap.c + mem_mheap.c + ) +endif(VPP_USE_DLMALLOC) + add_library(vppinfra SHARED ${VPPINFRA_SRCS}) target_link_libraries(vppinfra m) install(TARGETS vppinfra DESTINATION lib) |