diff options
author | Damjan Marion <damarion@cisco.com> | 2018-08-23 22:21:33 +0200 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2018-08-24 08:15:40 +0000 |
commit | d897adcebb0085942cbade024c3ccd8bafd448ef (patch) | |
tree | 70c222b946e3b055699e2baa6036e0bc170803e3 | |
parent | 3ec66b023280b1aa4b2e92ae475ceb03e5ed3910 (diff) |
cmake: fix -DVPP_USE_DLMALLOC=OFF
Change-Id: Ib8dc37b1a39c92a0c7b22cebdf985c6afa8229d9
Signed-off-by: Damjan Marion <damarion@cisco.com>
-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) |