Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
let simgrid still compile when lua was not detected
[simgrid.git] / src / simix / smx_context.c
index 0c13874..be29ac5 100644 (file)
@@ -116,7 +116,11 @@ void SIMIX_context_init_factory_by_name(smx_context_factory_t * factory,
       THROW0(not_found_error, 0, "Factory 'sysv' does not exist: no System V thread support under Windows");
   #endif
     else if (!strcmp(name, "lua"))
+#ifdef HAVE_LUA
       SIMIX_ctx_lua_factory_init(factory);
+#else
+    THROW0(not_found_error, 0, "Factory 'lua' does not exist: Lua support was not compiled in the SimGrid library");
+#endif /* HAVE_LUA */
   else
     THROW1(not_found_error, 0, "Factory '%s' does not exist", name);
 }