Salome HOME
fix compilation w/o LIBBBATCH
authoreap <eap@opencascade.com>
Tue, 31 Aug 2010 05:49:46 +0000 (05:49 +0000)
committereap <eap@opencascade.com>
Tue, 31 Aug 2010 05:49:46 +0000 (05:49 +0000)
src/Launcher/Launcher.cxx
src/Launcher/Launcher_Job.cxx

index 06e922aeeef04a7770ad5a3bf758b72cc06f8d3c..0783051a8490bc2ccb928926d5fd3924d3300dd1 100644 (file)
@@ -119,6 +119,7 @@ Launcher_cpp::createJob(Launcher::Job * new_job)
   }
 
   // Third step search batch manager for the resource into the map -> instanciate one if does not exist
+#ifdef WITH_LIBBATCH
   std::string resource_name = resource_definition.Name;
   std::map<std::string, Batch::BatchManager_eClient *>::const_iterator it = _batchmap.find(resource_name);
   if(it == _batchmap.end())
@@ -144,7 +145,7 @@ Launcher_cpp::createJob(Launcher::Job * new_job)
       throw LauncherException(ex.message);
     }
   }
-
+#endif
 
   // Final step - add job to the jobs map
   pthread_mutex_lock(_job_cpt_mutex);
@@ -541,6 +542,7 @@ Launcher_cpp::checkFactoryForResource(const std::string & resource_name)
   }
 
   // Step 2: We can now add a Factory is the resource is correctly define
+#ifdef WITH_LIBBATCH
   std::map<std::string, Batch::BatchManager_eClient *>::const_iterator it = _batchmap.find(resource_name);
   if(it == _batchmap.end())
   {
@@ -563,6 +565,7 @@ Launcher_cpp::checkFactoryForResource(const std::string & resource_name)
       throw LauncherException(ex.message);
     }
   }
+#endif
 }
 
 void 
@@ -575,6 +578,7 @@ Launcher_cpp::addJobDirectlyToMap(Launcher::Job * new_job, const std::string job
   new_job->setResourceDefinition(resource_definition);
 
   // Step 2: add the job to the batch manager
+#ifdef WITH_LIBBATCH
   try
   {
     Batch::JobId batch_manager_job_id = _batchmap[resource_name]->addJob(*(new_job->getBatchJob()), 
@@ -602,4 +606,5 @@ Launcher_cpp::addJobDirectlyToMap(Launcher::Job * new_job, const std::string job
     throw LauncherException("A job as already the same id - job is not created !");
   }
   LAUNCHER_MESSAGE("New job added");
+#endif
 }
index 55ab16e191788eff94685b8a385ce4207fe84128..6fecd84a3c0673cac486093a27172790f4b59452 100644 (file)
@@ -405,8 +405,8 @@ Launcher::Job::updateJobState()
       _state = par[Batch::STATE].str();
       LAUNCHER_MESSAGE("State received is: " << par[Batch::STATE].str());
     }
-  }
 #endif
+  }
   return _state;
 }