Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Declare log category where it is actually used.
[simgrid.git] / src / simix / simcalls.py
index 99d27d8..ae5f79a 100755 (executable)
@@ -8,7 +8,7 @@
 
 import re
 import glob
-
+import sys
 
 class Arg(object):
 
@@ -274,10 +274,9 @@ if __name__ == '__main__':
     ok &= all(map(Simcall.check, simcalls))
     for k, v in simcalls_dict.items():
         ok &= all(map(Simcall.check, v))
-    # FIXME: we should not hide it
-    # if not ok:
-    #  print ("Some checks fail!")
-    #  sys.exit(1)
+    if not ok:
+      print ("Some checks fail!")
+      sys.exit(1)
 
     #
     # popping_accessors.hpp
@@ -371,9 +370,12 @@ if __name__ == '__main__':
     fd.write('#include "xbt/ex.h"\n')
     fd.write('#include <functional>\n')
     fd.write('#include <simgrid/simix.hpp>\n')
+    fd.write('#include <xbt/log.h>\n')
 
     fd.write("/** @cond */ // Please Doxygen, don't look at this\n")
     fd.write('''
+XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix);
+
 template<class R, class... T>
 inline static R simcall(e_smx_simcall_t call, T const&... t)
 {