summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-08-23 22:21:33 +0200
committerNeale Ranns <nranns@cisco.com>2018-08-24 08:15:40 +0000
commitd897adcebb0085942cbade024c3ccd8bafd448ef (patch)
tree70c222b946e3b055699e2baa6036e0bc170803e3 /src
parent3ec66b023280b1aa4b2e92ae475ceb03e5ed3910 (diff)
cmake: fix -DVPP_USE_DLMALLOC=OFF
Change-Id: Ib8dc37b1a39c92a0c7b22cebdf985c6afa8229d9 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vppinfra/CMakeLists.txt14
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)