diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp index 0d19a5e3090b45276b4d90e6462565ce351feb1d..b5e70c7be60e6e4d2e6475241be88ca2830ba957 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 ff36da14f10309a443358e7ecdf9d2a17f773458..d6ede43e89f788dd5bc6d9dab15d373274d2a5c4 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,