diff options
author | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-11-04 21:12:49 +0300 |
---|---|---|
committer | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-11-04 21:12:49 +0300 |
commit | ec1ef78d51921cdb64d0078293fe2e19b161eca2 (patch) | |
tree | 5e11d5d62ba8239db540e60193f5ef50f27c8201 /moses/ExportInterface.cpp | |
parent | c435e46560c96f7e07f6090016331b2416641c73 (diff) |
Reduction in number of #ifdef HAVE_XMLRPC_C, as per Hieu's request.
Diffstat (limited to 'moses/ExportInterface.cpp')
-rw-r--r-- | moses/ExportInterface.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/moses/ExportInterface.cpp b/moses/ExportInterface.cpp index 216eba335..f35efac15 100644 --- a/moses/ExportInterface.cpp +++ b/moses/ExportInterface.cpp @@ -60,13 +60,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #endif #include "ExportInterface.h" -#ifdef HAVE_XMLRPC_C -#include <xmlrpc-c/base.hpp> -#include <xmlrpc-c/registry.hpp> -#include <xmlrpc-c/server_abyss.hpp> -#include "server/Server.h" -#endif - +#include "moses/server/Server.h" using namespace std; using namespace Moses; @@ -148,6 +142,9 @@ run_as_server() #ifdef HAVE_XMLRPC_C MosesServer::Server server(params); return server.run(); // actually: don't return. see Server::run() +#else + UTIL_THROW2("Moses was compiled without xmlrpc-c. " + << "No server functionality available."); #endif } @@ -229,10 +226,8 @@ batch_run() if (context_window) task->SetContextWindow(context_window); -#ifdef HAVE_XMLRPC_C if (context_weights != "" && !task->GetScope()->GetContextWeights()) task->GetScope()->SetContextWeights(context_weights); -#endif // Allow for (sentence-)context-specific processing prior to // decoding. This can be used, for example, for context-sensitive |