summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/background
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-03-15 11:01:41 +0100
committerBenoit Foucher <benoit@zeroc.com>2017-03-15 11:01:41 +0100
commita7704134b57a3428f28369993c697db6eea9d4fe (patch)
treef95513241636bab21f42b3221bbb1d9c6b4081b7 /cpp/test/Ice/background
parentFixed testing of static builds (diff)
downloadice-a7704134b57a3428f28369993c697db6eea9d4fe.tar.bz2
ice-a7704134b57a3428f28369993c697db6eea9d4fe.tar.xz
ice-a7704134b57a3428f28369993c697db6eea9d4fe.zip
Fixed background build issue with static configuration
Diffstat (limited to 'cpp/test/Ice/background')
-rw-r--r--cpp/test/Ice/background/Configuration.cpp12
-rw-r--r--cpp/test/Ice/background/Configuration.h14
-rw-r--r--cpp/test/Ice/background/Makefile.mk8
-rw-r--r--cpp/test/Ice/background/Test.ice4
4 files changed, 27 insertions, 11 deletions
diff --git a/cpp/test/Ice/background/Configuration.cpp b/cpp/test/Ice/background/Configuration.cpp
index 16365ed3de1..dff12668226 100644
--- a/cpp/test/Ice/background/Configuration.cpp
+++ b/cpp/test/Ice/background/Configuration.cpp
@@ -7,6 +7,10 @@
//
// **********************************************************************
+#ifndef TEST_API_EXPORTS
+# define TEST_API_EXPORTS
+#endif
+
#include <Configuration.h>
Configuration* Configuration::_instance = 0;
@@ -33,7 +37,7 @@ Configuration::connectorsException(Ice::LocalException* ex)
Lock sync(*this);
_connectorsException.reset(ex);
}
-
+
void
Configuration::checkConnectorsException()
{
@@ -80,7 +84,7 @@ Configuration::initializeException(Ice::LocalException* ex)
Lock sync(*this);
_initializeException.reset(ex);
}
-
+
IceInternal::SocketOperation
Configuration::initializeSocketOperation()
{
@@ -116,7 +120,7 @@ Configuration::readException(Ice::LocalException* ex)
Lock sync(*this);
_readException.reset(ex);
}
-
+
bool
Configuration::readReady()
{
@@ -152,7 +156,7 @@ Configuration::writeException(Ice::LocalException* ex)
Lock sync(*this);
_writeException.reset(ex);
}
-
+
bool
Configuration::writeReady()
{
diff --git a/cpp/test/Ice/background/Configuration.h b/cpp/test/Ice/background/Configuration.h
index d75c61b0ff2..56f361e1c04 100644
--- a/cpp/test/Ice/background/Configuration.h
+++ b/cpp/test/Ice/background/Configuration.h
@@ -16,10 +16,20 @@
#include <Ice/LocalException.h>
#include <Ice/Selector.h>
+#ifndef TEST_API
+# if defined(ICE_STATIC_LIBS)
+# define TEST_API /**/
+# elif defined(TEST_API_EXPORTS)
+# define TEST_API ICE_DECLSPEC_EXPORT
+# else
+# define TEST_API ICE_DECLSPEC_IMPORT
+# endif
+#endif
+
class Configuration;
typedef IceUtil::Handle<Configuration> ConfigurationPtr;
-class Configuration : public IceUtil::Shared, public IceUtil::Mutex
+class TEST_API Configuration : public IceUtil::Shared, public IceUtil::Mutex
{
public:
@@ -49,7 +59,7 @@ public:
void buffered(bool);
bool buffered();
-
+
static Configuration* getInstance();
private:
diff --git a/cpp/test/Ice/background/Makefile.mk b/cpp/test/Ice/background/Makefile.mk
index 9aeeb6cb9e6..b25b873de26 100644
--- a/cpp/test/Ice/background/Makefile.mk
+++ b/cpp/test/Ice/background/Makefile.mk
@@ -10,11 +10,11 @@
$(test)_libraries := $(test)_TestTransport
$(test)_cppflags := -I$(srcdir)
-$(test)_client_sources = $(test-client-sources) Configuration.cpp
-$(test)_client[static]_dependencies := $(test)_TestTransport
+$(test)_client_sources = Client.cpp AllTests.cpp
+$(test)_client_dependencies := $(test)_TestTransport
-$(test)_server_sources = $(test-server-sources) Configuration.cpp
-$(test)_server[static]_dependencies := $(test)_TestTransport
+$(test)_server_sources = Server.cpp TestI.cpp
+$(test)_server_dependencies := $(test)_TestTransport
$(test)_TestTransport_sources = Test.ice \
Configuration.cpp \
diff --git a/cpp/test/Ice/background/Test.ice b/cpp/test/Ice/background/Test.ice
index 9147f690b02..8f5a071c546 100644
--- a/cpp/test/Ice/background/Test.ice
+++ b/cpp/test/Ice/background/Test.ice
@@ -11,6 +11,8 @@
#include <Ice/BuiltinSequences.ice>
+[["cpp:dll-export:TEST_API"]]
+
module Test
{
@@ -26,7 +28,7 @@ interface BackgroundController
{
void pauseCall(string call);
void resumeCall(string call);
-
+
void holdAdapter();
void resumeAdapter();