Browse Source

Fix build from starpu with old simgrid: BUILDING_STARPU is only for the lib

Samuel Thibault 8 years ago
parent
commit
00042d3039
2 changed files with 10 additions and 2 deletions
  1. 3 1
      tests/model-checking/Makefile
  2. 7 1
      tests/model-checking/prio_list.c

+ 3 - 1
tests/model-checking/Makefile

@@ -15,7 +15,7 @@
 
 STARPU=../../
 CPPFLAGS=-I$(STARPU)/src
-CFLAGS=-Wall -Wextra -g $(STARPU)/src/common/rbtree.c
+CFLAGS=-Wall -Wextra -g $(STARPU)/src/common/rbtree.c -DNOCONFIG
 LDFLAGS=-lsimgrid
 
 MC_FLAGS=--cfg=model-check/reduction:none
@@ -42,5 +42,7 @@ test: prio_list
 debug: prio_list
 	simgrid-mc ./prio_list platform.xml MAIN --log=mc_safety.thres:debug $(MC_FLAGS)
 
+all: prio_list prio_list2
+
 clean:
 	rm -f prio_list

+ 7 - 1
tests/model-checking/prio_list.c

@@ -17,7 +17,7 @@
 #define _STARPU_MALLOC(p, s) do {p = malloc(s);} while (0)
 #define STARPU_ATTRIBUTE_UNUSED __attribute((__unused__))
 
-#ifdef BUILDING_STARPU
+#ifndef NOCONFIG
 #include <config.h>
 #else
 #define _GNU_SOURCE
@@ -43,9 +43,15 @@
 #include <xbt/synchro_core.h>
 #endif
 
+#ifndef L
 #define L 1 /* number of lists */
+#endif
+#ifndef N
 #define N 2 /* number of threads */
+#endif
+#ifndef M
 #define M 4 /* number of elements */
+#endif
 
 // MC_ignore