From 871b7b415c4e5f07e74441c8e54b701a682607a0 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Sat, 22 Mar 2014 22:30:51 +0100 Subject: [PATCH] Disable mmalloc when !HAVE_MC. Avoid useless dependencies on libdw. Mmalloc is not needed without MC. --- buildtools/Cmake/CompleteInFiles.cmake | 1 + include/xbt/mmalloc.h | 4 ++++ src/include/mc/mc.h | 1 - 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/buildtools/Cmake/CompleteInFiles.cmake b/buildtools/Cmake/CompleteInFiles.cmake index 1e2124976b..5426fae38b 100644 --- a/buildtools/Cmake/CompleteInFiles.cmake +++ b/buildtools/Cmake/CompleteInFiles.cmake @@ -236,6 +236,7 @@ else() message(STATUS "Warning: support for model-checking has been disabled because HAVE_MMALLOC is false") endif() SET(HAVE_MC 0) + SET(HAVE_MMALLOC 0) SET(MMALLOC_WANT_OVERRIDE_LEGACY 0) endif() diff --git a/include/xbt/mmalloc.h b/include/xbt/mmalloc.h index 35c68e0730..4eda7fee02 100644 --- a/include/xbt/mmalloc.h +++ b/include/xbt/mmalloc.h @@ -10,6 +10,9 @@ #ifndef MMALLOC_H #define MMALLOC_H 1 +#include +#ifdef HAVE_MMALLOC + #ifdef HAVE_STDDEF_H # include #else @@ -68,4 +71,5 @@ void reset_heap_information(void); size_t mmalloc_get_bytes_used(xbt_mheap_t); ssize_t mmalloc_get_busy_size(xbt_mheap_t, void *ptr); +#endif #endif /* MMALLOC_H */ diff --git a/src/include/mc/mc.h b/src/include/mc/mc.h index 80f71466b0..e2075900a0 100644 --- a/src/include/mc/mc.h +++ b/src/include/mc/mc.h @@ -11,7 +11,6 @@ #include "xbt/fifo.h" #include "xbt/dict.h" #include "xbt/function_types.h" -#include "mc/datatypes.h" #include "simgrid/simix.h" #include "simgrid/modelchecker.h" /* our public interface (and definition of HAVE_MC) */ #include "xbt/automaton.h" -- 2.20.1