From: eap Date: Tue, 31 Aug 2010 05:49:46 +0000 (+0000) Subject: fix compilation w/o LIBBBATCH X-Git-Tag: V6_2_0a1~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1a818d3a7fad9d1693a6c8f97e26002ac2c94804;p=modules%2Fkernel.git fix compilation w/o LIBBBATCH --- diff --git a/src/Launcher/Launcher.cxx b/src/Launcher/Launcher.cxx index 06e922aee..0783051a8 100644 --- a/src/Launcher/Launcher.cxx +++ b/src/Launcher/Launcher.cxx @@ -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::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::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 } diff --git a/src/Launcher/Launcher_Job.cxx b/src/Launcher/Launcher_Job.cxx index 55ab16e19..6fecd84a3 100644 --- a/src/Launcher/Launcher_Job.cxx +++ b/src/Launcher/Launcher_Job.cxx @@ -405,8 +405,8 @@ Launcher::Job::updateJobState() _state = par[Batch::STATE].str(); LAUNCHER_MESSAGE("State received is: " << par[Batch::STATE].str()); } - } #endif + } return _state; }