summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/Make.common.rules.mak16
-rwxr-xr-xcpp/config/Make.rules.mak6
-rwxr-xr-xcpp/config/Make.rules.msvc3
-rw-r--r--cpp/include/IceUtil/Config.h3
-rw-r--r--cpp/include/IceUtil/PushDisableWarnings.h4
-rw-r--r--cpp/src/IceUtil/Exception.cpp4
-rw-r--r--cpp/src/IceUtil/FileUtil.h8
-rwxr-xr-xscripts/TestUtil.py21
8 files changed, 50 insertions, 15 deletions
diff --git a/config/Make.common.rules.mak b/config/Make.common.rules.mak
index afd6c011f8a..dd5a4f915ce 100644
--- a/config/Make.common.rules.mak
+++ b/config/Make.common.rules.mak
@@ -47,13 +47,15 @@ ARCH = x86
!if "$(VISUALSTUDIOVERSION)" == "11.0"
CPP_COMPILER = VC110
-!elseif ([cl 2>&1 | findstr "Version\ 16" > nul] == 0)
+!elseif ([cl 2>&1 | findstr "Version\ 16." > nul] == 0)
CPP_COMPILER = VC100
-!elseif ([cl 2>&1 | findstr "Version\ 17" > nul] == 0)
+!elseif ([cl 2>&1 | findstr "Version\ 17." > nul] == 0)
CPP_COMPILER = VC110
-!elseif ([cl 2>&1 | findstr "Version\ 18" > nul] == 0)
+!elseif ([cl 2>&1 | findstr "Version\ 18." > nul] == 0)
CPP_COMPILER = VC120
-!elseif ([cl 2>&1 | findstr "Version\ 15" > nul] == 0)
+!elseif ([cl 2>&1 | findstr "Version\ 19." > nul] == 0)
+CPP_COMPILER = VC140
+!elseif ([cl 2>&1 | findstr "Version\ 15." > nul] == 0)
!error Detected VC90
!else
!error Cannot detect C++ compiler
@@ -62,8 +64,10 @@ CPP_COMPILER = VC120
#!message CPP_COMPILER set to $(CPP_COMPILER)
!endif
-!if "$(CPP_COMPILER)" != "" && "$(CPP_COMPILER)" != "VC100" && "$(CPP_COMPILER)" != "VC110" && "$(CPP_COMPILER)" != "VC120"
-!error Invalid CPP_COMPILER setting: $(CPP_COMPILER). Must be one of: VC100, VC110 or VC120.
+!if "$(CPP_COMPILER)" != "" && "$(CPP_COMPILER)" != "VC100" && \
+ "$(CPP_COMPILER)" != "VC110" && "$(CPP_COMPILER)" != "VC120" && \
+ "$(CPP_COMPILER)" != "VC140"
+!error Invalid CPP_COMPILER setting: $(CPP_COMPILER). Must be one of: VC100, VC110, VC120, VC140
!endif
!if "$(PROCESSOR_ARCHITECTURE)" == "AMD64"
diff --git a/cpp/config/Make.rules.mak b/cpp/config/Make.rules.mak
index 57ba5372e77..2da1ec58e7c 100755
--- a/cpp/config/Make.rules.mak
+++ b/cpp/config/Make.rules.mak
@@ -129,7 +129,9 @@ SETARGV = setargv.obj
!error CPP_COMPILER: $(CPP_COMPILER) not supported to build Ice for WinRT
!endif
-!if "$(CPP_COMPILER)" == "VC110"
+!if "$(CPP_COMPILER)" == "VC140"
+libsuff = \vc140$(x64suffix)
+!elseif "$(CPP_COMPILER)" == "VC110"
libsuff = \vc110$(x64suffix)
!elseif "$(CPP_COMPILER)" == "VC100"
libsuff = \vc100$(x64suffix)
@@ -152,6 +154,8 @@ COMPSUFFIX = _vc100
COMPSUFFIX = _vc110
!elseif "$(CPP_COMPILER)" == "VC120"
COMPSUFFIX = _vc120
+!elseif "$(CPP_COMPILER)" == "VC140"
+COMPSUFFIX = _vc140
!endif
!endif
diff --git a/cpp/config/Make.rules.msvc b/cpp/config/Make.rules.msvc
index 28e1788bdff..fa0c7a3f5ec 100755
--- a/cpp/config/Make.rules.msvc
+++ b/cpp/config/Make.rules.msvc
@@ -29,7 +29,8 @@ GENERATE_PDB = yes
CPPFLAGS = $(CPPFLAGS) -nologo -GR -EHsc -WX
!if "$(MAXWARN)" != "yes"
-CPPFLAGS = $(CPPFLAGS) -W3 -wd4250 -wd4251
+# Added for VS2015 RC: -wd4275
+CPPFLAGS = $(CPPFLAGS) -W3 -wd4250 -wd4251 -wd4275
!else
CPPFLAGS = $(CPPFLAGS) -W4
!endif
diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h
index b1403509b48..471fe9881c5 100644
--- a/cpp/include/IceUtil/Config.h
+++ b/cpp/include/IceUtil/Config.h
@@ -61,8 +61,7 @@
#endif
-#if defined(ICE_CPP11) && !defined(_MSC_VER)
-// Visual Studio does not support noexcept yet
+#if defined(ICE_CPP11) && (!defined(_MSC_VER) || (_MSC_VER >= 1900))
# define ICE_NOEXCEPT noexcept
# define ICE_NOEXCEPT_FALSE noexcept(false)
#else
diff --git a/cpp/include/IceUtil/PushDisableWarnings.h b/cpp/include/IceUtil/PushDisableWarnings.h
index 3c27c4f7197..ab9692eb7d5 100644
--- a/cpp/include/IceUtil/PushDisableWarnings.h
+++ b/cpp/include/IceUtil/PushDisableWarnings.h
@@ -15,6 +15,10 @@
# pragma warning(disable:4250) // ... : inherits ... via dominance
# pragma warning(disable:4251) // class ... needs to have dll-interface to be used by clients of class ...
# pragma warning(disable:4512) // ... assignment operator could not be generated
+
+# if _MSC_VER >= 1900
+# pragma warning(disable:4275) // non dll-interface class ... used as base for dll-interface class ...
+# endif
#endif
#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
diff --git a/cpp/src/IceUtil/Exception.cpp b/cpp/src/IceUtil/Exception.cpp
index 3eb63677a08..d21946f8195 100644
--- a/cpp/src/IceUtil/Exception.cpp
+++ b/cpp/src/IceUtil/Exception.cpp
@@ -40,6 +40,10 @@
# if defined(_MSC_VER) && _MSC_VER >= 1700
# define DBGHELP_TRANSLATE_TCHAR
# include <IceUtil/StringConverter.h>
+# if _MSC_VER >= 1900
+# // VS 2015 RC issues this warning for code in DbgHelp.h
+# pragma warning(disable:4091)
+# endif
# endif
# include <DbgHelp.h>
# include <tchar.h>
diff --git a/cpp/src/IceUtil/FileUtil.h b/cpp/src/IceUtil/FileUtil.h
index 4caf139b148..a833e59e785 100644
--- a/cpp/src/IceUtil/FileUtil.h
+++ b/cpp/src/IceUtil/FileUtil.h
@@ -129,6 +129,10 @@ public:
using std::ifstream::open;
#endif
+#if defined(_MSC_VER) && (_MSC_VER >= 1900)
+ ifstream(const ifstream&) = delete;
+#endif
+
private:
// Hide const char* definitions since they shouldn't be used.
@@ -148,6 +152,10 @@ public:
using std::ofstream::open;
#endif
+#if defined(_MSC_VER) && (_MSC_VER >= 1900)
+ ofstream(const ofstream&) = delete;
+#endif
+
private:
// Hide const char* definitions since they shouldn't be used.
diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py
index 1109cedfde7..04d91782910 100755
--- a/scripts/TestUtil.py
+++ b/scripts/TestUtil.py
@@ -129,7 +129,7 @@ def getCppCompiler():
else:
config = open(os.path.join(toplevel, "cpp", "config", "Make.rules.mak"), "r")
compiler = re.search("CPP_COMPILER[\t\s]*= ([A-Z0-9]*)", config.read()).group(1)
- if compiler != "VC100" and compiler != "VC110" and compiler != "VC120":
+ if compiler != "VC100" and compiler != "VC110" and compiler != "VC120" and compiler != "VC140":
compiler = ""
if compiler == "":
@@ -139,12 +139,14 @@ def getCppCompiler():
compiler = VC120
else:
l = p.stdout.readline().decode("utf-8").strip()
- if l.find("Version 16") != -1:
+ if l.find("Version 16.") != -1:
compiler = "VC100"
- elif l.find("Version 17") != -1:
+ elif l.find("Version 17.") != -1:
compiler = "VC110"
- elif l.find("Version 18") != -1:
+ elif l.find("Version 18.") != -1:
compiler = "VC120"
+ elif l.find("Version 19.") != -1:
+ compiler = "VC140"
else:
#
# Cannot detect C++ compiler use default
@@ -174,6 +176,11 @@ def isVC120():
return False
return getCppCompiler() == "VC120"
+def isVC140():
+ if not isWin32():
+ return False
+ return getCppCompiler() == "VC140"
+
def getIceSoVersion():
config = open(os.path.join(toplevel, "cpp", "include", "IceUtil", "Config.h"), "r")
intVersion = int(re.search("ICE_INT_VERSION ([0-9]*)", config.read()).group(1))
@@ -1723,6 +1730,8 @@ def getCppBinDir(lang = None):
lang = getDefaultMapping()
if isVC110() and lang != "python":
binDir = os.path.join(binDir, "vc110")
+ elif isVC140():
+ binDir = os.path.join(binDir, "vc140")
if x64:
if isSolaris():
if isSparc():
@@ -1831,8 +1840,10 @@ def getTestEnv(lang, testdir):
# Add third party home to PATH, to use db_xx tools
#
addPathToEnv("PATH", os.path.join(thirdPartyHome, "bin", suffix), env)
- if getCppCompiler() == "VC110":
+ if isVC110():
addPathToEnv("PATH", os.path.join(thirdPartyHome, "bin", "vc110", suffix), env)
+ elif isVC140():
+ addPathToEnv("PATH", os.path.join(thirdPartyHome, "bin", "vc140", suffix), env)
addClasspath(os.path.join(thirdPartyHome, "lib", "db.jar"), env)
else:
print("warning: could not detect Ice Third Party installation")