summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2015-05-06 17:21:30 +0200
committerBenoit Foucher <benoit@zeroc.com>2015-05-06 17:21:30 +0200
commit0015b0097b89806b407e38df9399c358a82646f7 (patch)
treee07664cfc01e1fe8dbd4a83b88363ef170ab237c /cpp
parentICE-6484 java exceptions test fails with --cross=js (diff)
downloadice-0015b0097b89806b407e38df9399c358a82646f7.tar.bz2
ice-0015b0097b89806b407e38df9399c358a82646f7.tar.xz
ice-0015b0097b89806b407e38df9399c358a82646f7.zip
Fixed generated code to not instantiate templates if ICE_STATIC_LIBS is defined, minor WinRT test fixes
Diffstat (limited to 'cpp')
-rwxr-xr-xcpp/config/Make.rules.mak5
-rw-r--r--cpp/include/Ice/GCObject.h1
-rw-r--r--cpp/include/IceUtil/Config.h14
-rw-r--r--cpp/src/Ice/Buffer.cpp1
-rw-r--r--cpp/src/Ice/EndpointI.h1
-rw-r--r--cpp/src/Ice/LoggerI.cpp1
-rw-r--r--cpp/src/Ice/ObjectFactoryManager.cpp2
-rw-r--r--cpp/src/Ice/Protocol.cpp1
-rw-r--r--cpp/src/Ice/ResponseHandler.h1
-rw-r--r--cpp/src/Ice/winrt/Makefile.mak1
-rw-r--r--cpp/src/slice2cpp/Gen.cpp5
-rw-r--r--cpp/test/WinRT/TestSuite/MainPage.xaml2
-rw-r--r--cpp/test/WinRT/TestSuite/MainPage.xaml.cpp8
13 files changed, 21 insertions, 22 deletions
diff --git a/cpp/config/Make.rules.mak b/cpp/config/Make.rules.mak
index 4928997da11..66afc665d2a 100755
--- a/cpp/config/Make.rules.mak
+++ b/cpp/config/Make.rules.mak
@@ -109,7 +109,12 @@ libdir = $(top_srcdir)\lib
headerdir = $(top_srcdir)\include
!if "$(WINRT)" == "yes"
+!if "$(SOURCE_DIR)" != ""
+includedir = $(top_srcdir)\include
+!else
+# To build the tests against the SDK headers
includedir = $(SDK_INCLUDE_PATH)
+!endif
!else
!if "$(ice_src_dist)" != ""
includedir = $(top_srcdir)\include
diff --git a/cpp/include/Ice/GCObject.h b/cpp/include/Ice/GCObject.h
index 929b13bc25f..205c19c1f8c 100644
--- a/cpp/include/Ice/GCObject.h
+++ b/cpp/include/Ice/GCObject.h
@@ -11,7 +11,6 @@
#define ICE_GC_OBJECT_H
#include <Ice/Object.h>
-#include <Ice/BasicStream.h>
#include <IceUtil/MutexPtrLock.h>
#include <IceUtil/Mutex.h>
diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h
index c834d1c0c3c..6aa9653f2ee 100644
--- a/cpp/include/IceUtil/Config.h
+++ b/cpp/include/IceUtil/Config.h
@@ -50,7 +50,7 @@
//
// Check for C++ 11 support
-//
+//
// For GCC, we recognize --std=c++0x only for GCC version 4.5 and greater,
// as C++11 support in prior releases was too limited.
//
@@ -86,7 +86,7 @@
#endif
//
-// Support for thread-safe function local static initialization
+// Support for thread-safe function local static initialization
// (a.k.a. "magic statics")
//
#if defined(__GNUC__) || defined(__clang__)
@@ -94,7 +94,7 @@
#endif
//
-// Compiler extensions to export and import symbols: see the documentation
+// Compiler extensions to export and import symbols: see the documentation
// for Visual Studio, Solaris Studio and GCC.
//
#if defined(_WIN32)
@@ -131,14 +131,14 @@
# define ICE_DEPRECATED_API(msg) __declspec(deprecated(msg))
#elif defined(__clang__)
# if __has_extension(attribute_deprecated_with_message)
-# define ICE_DEPRECATED_API(msg) __attribute__((deprecated(msg)))
+# define ICE_DEPRECATED_API(msg) __attribute__((deprecated(msg)))
# else
# define ICE_DEPRECATED_API(msg) __attribute__((deprecated))
# endif
#elif defined(__GNUC__)
# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
// The message option was introduced in GCC 4.5
-# define ICE_DEPRECATED_API(msg) __attribute__((deprecated(msg)))
+# define ICE_DEPRECATED_API(msg) __attribute__((deprecated(msg)))
# else
# define ICE_DEPRECATED_API(msg) __attribute__((deprecated))
# endif
@@ -156,7 +156,7 @@
# ifndef ICE_HAS_WIN32_CONDVAR
# define ICE_HAS_WIN32_CONDVAR
# endif
-# endif
+# endif
#endif
//
@@ -206,7 +206,7 @@ class ICE_UTIL_API noncopyable
protected:
noncopyable() { }
- ~noncopyable() { } // May not be virtual! Classes without virtual
+ ~noncopyable() { } // May not be virtual! Classes without virtual
// operations also derive from noncopyable.
private:
diff --git a/cpp/src/Ice/Buffer.cpp b/cpp/src/Ice/Buffer.cpp
index c3c882488a5..8f29d39b6a6 100644
--- a/cpp/src/Ice/Buffer.cpp
+++ b/cpp/src/Ice/Buffer.cpp
@@ -9,7 +9,6 @@
#include <Ice/Buffer.h>
#include <Ice/LocalException.h>
-#include <Ice/BasicStream.h>
using namespace std;
using namespace Ice;
diff --git a/cpp/src/Ice/EndpointI.h b/cpp/src/Ice/EndpointI.h
index 8a6cd4c6701..df41372bd82 100644
--- a/cpp/src/Ice/EndpointI.h
+++ b/cpp/src/Ice/EndpointI.h
@@ -11,7 +11,6 @@
#define ICE_ENDPOINT_I_H
#include <Ice/EndpointIF.h>
-#include <Ice/BasicStream.h>
#include <Ice/Endpoint.h>
#include <Ice/EndpointTypes.h>
#include <Ice/TransceiverF.h>
diff --git a/cpp/src/Ice/LoggerI.cpp b/cpp/src/Ice/LoggerI.cpp
index 26868805206..fcc3ac1d79c 100644
--- a/cpp/src/Ice/LoggerI.cpp
+++ b/cpp/src/Ice/LoggerI.cpp
@@ -18,7 +18,6 @@
#endif
#include <Ice/LocalException.h>
-#include <Ice/BasicStream.h>
using namespace std;
using namespace Ice;
diff --git a/cpp/src/Ice/ObjectFactoryManager.cpp b/cpp/src/Ice/ObjectFactoryManager.cpp
index 4f9c11bc695..835df0b588e 100644
--- a/cpp/src/Ice/ObjectFactoryManager.cpp
+++ b/cpp/src/Ice/ObjectFactoryManager.cpp
@@ -12,8 +12,6 @@
#include <Ice/ObjectFactory.h>
#include <Ice/Functional.h>
#include <Ice/LocalException.h>
-#include <Ice/BasicStream.h>
-
using namespace std;
using namespace Ice;
using namespace IceInternal;
diff --git a/cpp/src/Ice/Protocol.cpp b/cpp/src/Ice/Protocol.cpp
index 8816e68fb4c..01f35c19a04 100644
--- a/cpp/src/Ice/Protocol.cpp
+++ b/cpp/src/Ice/Protocol.cpp
@@ -9,7 +9,6 @@
#include <Ice/Protocol.h>
#include <Ice/LocalException.h>
-#include <Ice/BasicStream.h>
namespace IceInternal
{
diff --git a/cpp/src/Ice/ResponseHandler.h b/cpp/src/Ice/ResponseHandler.h
index c82080526c0..23ed39fd70d 100644
--- a/cpp/src/Ice/ResponseHandler.h
+++ b/cpp/src/Ice/ResponseHandler.h
@@ -15,7 +15,6 @@
#include <Ice/Config.h>
#include <Ice/LocalException.h>
-#include <Ice/BasicStream.h>
#include <Ice/ResponseHandlerF.h>
namespace IceInternal
diff --git a/cpp/src/Ice/winrt/Makefile.mak b/cpp/src/Ice/winrt/Makefile.mak
index ddaf9c87dc8..52254850db3 100644
--- a/cpp/src/Ice/winrt/Makefile.mak
+++ b/cpp/src/Ice/winrt/Makefile.mak
@@ -369,6 +369,7 @@ clean::
-del /q $(SOURCE_DIR)\ServantLocatorF.cpp $(HDIR)\ServantLocatorF.h
-del /q $(SOURCE_DIR)\ServantLocator.cpp $(HDIR)\ServantLocator.h
-del /q $(SOURCE_DIR)\SliceChecksumDict.cpp $(HDIR)\SliceChecksumDict.h
+ -del /q $(SOURCE_DIR)\Version.cpp $(HDIR)\Version.h
-del /q EndpointInfo.cpp $(headerdir)\IceSSL\EndpointInfo.h
-del /q ConnectionInfo.cpp $(headerdir)\IceSSL\ConnectionInfo.h
-del /q $(ARCH)\$(CONFIG)\*.obj
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 9e8d68722cb..74bf4315893 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -5177,7 +5177,8 @@ Slice::Gen::StreamVisitor::visitStructStart(const StructPtr& p)
//
// We tell "importers" that the implementation exports these instantiations
//
- H << nl << "#if defined(ICE_HAS_DECLSPEC_IMPORT_EXPORT) && !defined(" << _dllExport.substr(0, _dllExport.size() - 1) + "_EXPORTS)";
+ H << nl << "#if defined(ICE_HAS_DECLSPEC_IMPORT_EXPORT) && !defined(";
+ H << _dllExport.substr(0, _dllExport.size() - 1) + "_EXPORTS) && !defined(ICE_STATIC_LIBS)";
H << nl << "template struct " << _dllExport << "StreamWriter< " << fullStructName << ", ::IceInternal::BasicStream>;";
H << nl << "template struct " << _dllExport << "StreamReader< " << fullStructName << ", ::IceInternal::BasicStream>;";
H << nl << "#endif" << nl;
@@ -5185,7 +5186,7 @@ Slice::Gen::StreamVisitor::visitStructStart(const StructPtr& p)
//
// The instantations:
//
- C << nl << "#ifdef ICE_HAS_DECLSPEC_IMPORT_EXPORT";
+ C << nl << "#if defined(ICE_HAS_DECLSPEC_IMPORT_EXPORT) && !defined(ICE_STATIC_LIBS)";
C << nl << "template struct " << _dllExport << "StreamWriter< " << fullStructName << ", ::IceInternal::BasicStream>;";
C << nl << "template struct " << _dllExport << "StreamReader< " << fullStructName << ", ::IceInternal::BasicStream>;";
C << nl << "#endif";
diff --git a/cpp/test/WinRT/TestSuite/MainPage.xaml b/cpp/test/WinRT/TestSuite/MainPage.xaml
index 984fc57185b..f8eda9b24b4 100644
--- a/cpp/test/WinRT/TestSuite/MainPage.xaml
+++ b/cpp/test/WinRT/TestSuite/MainPage.xaml
@@ -73,7 +73,7 @@
SelectionChanged="Language_SelectionChanged">
<ComboBoxItem Name="winrt">winrt</ComboBoxItem>
<ComboBoxItem Name="cpp">C++</ComboBoxItem>
- <ComboBoxItem Name="cs">C#</ComboBoxItem>
+ <ComboBoxItem Name="csharp">C#</ComboBoxItem>
<ComboBoxItem Name="java">Java</ComboBoxItem>
</ComboBox>
<TextBlock Margin="5"
diff --git a/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp b/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp
index 9527430c197..5596ac422bf 100644
--- a/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp
+++ b/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp
@@ -146,9 +146,9 @@ vector<TestCasePtr> allTest(bool remoteserver)
all.push_back(test);
test.reset(new TestCase("Ice", "invoke", "client.dll", "server.dll"));
- addConfiguration(test, "Blobject server", {}, { "cpp", "java", "C#" });
+ addConfiguration(test, "Blobject server", {}, { "cpp", "java", "csharp" });
addConfiguration(test, "BlobjectArray server", {}, { "cpp" });
- addConfiguration(test, "BlobjectAsync server", {}, { "cpp", "java", "C#" });
+ addConfiguration(test, "BlobjectAsync server", {}, { "cpp", "java", "csharp" });
addConfiguration(test, "BlobjectAsyncArray server", {}, { "cpp" });
all.push_back(test);
@@ -164,8 +164,8 @@ vector<TestCasePtr> allTest(bool remoteserver)
test.reset(new TestCase("Ice", "operations", "client.dll", "server.dll", "serveramd.dll", "collocated.dll"));
addConfiguration(test, "regular server");
addConfiguration(test, "AMD server");
- addConfiguration(test, "TIE server", {}, {"java", "C#"});
- addConfiguration(test, "AMD TIE server", {}, { "java", "C#" });
+ addConfiguration(test, "TIE server", {}, {"java", "csharp"});
+ addConfiguration(test, "AMD TIE server", {}, { "java", "csharp" });
all.push_back(test);
test.reset(new TestCase("Ice", "proxy", "client.dll", "server.dll", "serveramd.dll", "collocated.dll"));