diff options
author | Benoit Foucher <benoit@zeroc.com> | 2016-05-03 19:26:09 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2016-05-03 19:26:09 +0200 |
commit | ee3b7be185f7d887a33b9c242a7ccd08a09d2614 (patch) | |
tree | 1974211a0cbd5e3df95b6deed0b2b42f7854aca9 /cpp/test/Ice/plugin/Client.cpp | |
parent | Rename files for consistency (diff) | |
download | ice-ee3b7be185f7d887a33b9c242a7ccd08a09d2614.tar.bz2 ice-ee3b7be185f7d887a33b9c242a7ccd08a09d2614.tar.xz ice-ee3b7be185f7d887a33b9c242a7ccd08a09d2614.zip |
Re-factored gmake build system
Diffstat (limited to 'cpp/test/Ice/plugin/Client.cpp')
-rw-r--r-- | cpp/test/Ice/plugin/Client.cpp | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/cpp/test/Ice/plugin/Client.cpp b/cpp/test/Ice/plugin/Client.cpp index 49855b888ee..12305af063b 100644 --- a/cpp/test/Ice/plugin/Client.cpp +++ b/cpp/test/Ice/plugin/Client.cpp @@ -84,6 +84,21 @@ main(int argc, char* argv[]) int status = EXIT_SUCCESS; Ice::CommunicatorPtr communicator; + if(argc < 2) + { + cerr << "usage: " << argv[0] << " <plugindir>"; + } + + // + // Plugin directory is provided as the last argument + // +#if defined(ICE_OS_WINRT) + string pluginDir = "plugins/winrt/"; +#else + string pluginDir = argv[argc - 1]; + pluginDir += "/"; +#endif + Ice::registerPluginFactory("Static1", createMyPlugin, true); // true = Load on communicator initialization Ice::registerPluginFactory("Static2", createMyPlugin, false); @@ -126,29 +141,6 @@ main(int argc, char* argv[]) } cout << "ok" << endl; -#if !defined(_WIN32) - string pluginDir = "plugins/"; -#elif defined(ICE_OS_WINRT) - string pluginDir = "plugins/winrt/"; -#else - string pluginDir = "msbuild/testplugin/"; -# if defined(_M_X64) - pluginDir += "x64/"; -# else - pluginDir += "Win32/"; -# endif - -# if defined(ICE_CPP11_MAPPING) - pluginDir += "Cpp11-"; -# endif - -# if defined(_DEBUG) - pluginDir += "Debug/"; -# else - pluginDir += "Release/"; -# endif -#endif - cout << "testing a simple plug-in... " << flush; try { |