Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
let simgrid still compile when lua was not detected
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sun, 17 Jan 2010 14:01:19 +0000 (14:01 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sun, 17 Jan 2010 14:01:19 +0000 (14:01 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7016 48e7efb5-ca39-0410-a469-dd3cf9ba447f

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"))
       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);
       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);
 }
   else
     THROW1(not_found_error, 0, "Factory '%s' does not exist", name);
 }