From 302434d34a3e01be2c32928c0efd888ba1aa1ace Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Tue, 28 Feb 2012 14:09:30 +0000 Subject: [PATCH] fix python wrappers without onelab --- Common/GmshMessage.cpp | 9 +++++++++ Common/GmshMessage.h | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp index 0d19a5e309..b5e70c7be6 100644 --- a/Common/GmshMessage.cpp +++ b/Common/GmshMessage.cpp @@ -582,6 +582,15 @@ int Msg::GetAnswer(const char *question, int defaultval, const char *zero, return atoi(ret); } +bool Msg::UseOnelab() +{ +#if defined(HAVE_ONELAB) + return _onelabClient ? true : false; +#else + return false; +#endif +} + void Msg::InitializeOnelab(const std::string &name, const std::string &sockname) { #if defined(HAVE_ONELAB) diff --git a/Common/GmshMessage.h b/Common/GmshMessage.h index ff36da14f1..d6ede43e89 100644 --- a/Common/GmshMessage.h +++ b/Common/GmshMessage.h @@ -85,7 +85,7 @@ class Msg { static void InitializeOnelab(const std::string &name, const std::string &sockname=""); static GmshClient *GetGmshClient(){ return _client; } static void FinalizeOnelab(); - static bool UseOnelab(){ return _onelabClient ? true : false; } + static bool UseOnelab(); static void ExchangeOnelabParameter(const std::string &key, std::vector<double> &val, std::map<std::string, std::vector<double> > &fopt, -- GitLab