Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Disable mmalloc when !HAVE_MC.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Sat, 22 Mar 2014 21:30:51 +0000 (22:30 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Sat, 22 Mar 2014 22:01:34 +0000 (23:01 +0100)
Avoid useless dependencies on libdw.
Mmalloc is not needed without MC.

buildtools/Cmake/CompleteInFiles.cmake
include/xbt/mmalloc.h
src/include/mc/mc.h

index 1e21249..5426fae 100644 (file)
@@ -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()
 
index 35c68e0..4eda7fe 100644 (file)
@@ -10,6 +10,9 @@
 #ifndef MMALLOC_H
 #define MMALLOC_H 1
 
+#include <simgrid_config.h>
+#ifdef HAVE_MMALLOC
+
 #ifdef HAVE_STDDEF_H
 #  include <stddef.h>
 #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 */
index 80f7146..e207590 100644 (file)
@@ -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"