Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Fix compilation when MC id disabled
authorGabriel Corona <gabriel.corona@loria.fr>
Thu, 28 Apr 2016 10:38:52 +0000 (12:38 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Thu, 28 Apr 2016 10:38:52 +0000 (12:38 +0200)
src/mc/mc_base.cpp

index 8112d2c..b188c03 100644 (file)
@@ -35,9 +35,11 @@ XBT_LOG_NEW_CATEGORY(mc, "All MC categories");
 
 int MC_random(int min, int max)
 {
 
 int MC_random(int min, int max)
 {
+#if HAVE_MC
   xbt_assert(mc_model_checker == nullptr);
   /* TODO, if the MC is disabled we do not really need to make a simcall for
    * this :) */
   xbt_assert(mc_model_checker == nullptr);
   /* TODO, if the MC is disabled we do not really need to make a simcall for
    * this :) */
+#endif
   return simcall_mc_random(min, max);
 }
 
   return simcall_mc_random(min, max);
 }
 
@@ -46,7 +48,9 @@ namespace mc {
 
 void wait_for_requests(void)
 {
 
 void wait_for_requests(void)
 {
+#if HAVE_MC
   xbt_assert(mc_model_checker == nullptr);
   xbt_assert(mc_model_checker == nullptr);
+#endif
 
   smx_process_t process;
   smx_simcall_t req;
 
   smx_process_t process;
   smx_simcall_t req;