diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-02-23 21:34:40 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-02-23 22:31:51 +0000 |
commit | a8538f0774bd0fabf6012d735d1e86b3ff1c291f (patch) | |
tree | ded67eb4615e1229407e1c3476f1e3c31475e5b0 | |
parent | 5d6b5bb57bb82a0dc480ca2ea17da5396f598af7 (diff) |
When using MSVC 2015, require at least SP3
Change-Id: Ia5495f2eedfdbc9e42e06d95657bc01e3904b7e7
Reviewed-on: https://gerrit.libreoffice.org/34594
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | configure.ac | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index b787dc55181c..2882aecaea69 100644 --- a/configure.ac +++ b/configure.ac @@ -5519,6 +5519,31 @@ else fi fi +dnl At least MSVC 2015 SP1 is known to sporadically emit warning C4592 +dnl ("implementation limitation" when defining OUStringLiteral variables in +dnl vcl/source/app/IconThemeInfo.cxx), while SP3 is known good, and it is +dnl probably a good idea to require that anyway. A reliable way to check for +dnl MSVC 2015 SP3 appears to be to check for support of C++17 nested namespace +dnl definitions (which requires /std:c++latest to be enabled): +if test "$COM" = MSC -a "$VCVER" = 140; then + AC_MSG_CHECKING([whether MSVC 2015 compiler $MSVC_CXX is at least SP3]) + save_CXX=$CXX + save_CXXFLAGS=$CXXFLAGS + CXX=$MSVC_CXX + CXXFLAGS="$CXXFLAGS /std:c++latest" + AC_LANG_PUSH([C++]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + namespace A::B {} + ]])], [good=yes], [good=no]) + AC_LANG_POP([C++]) + CXX=$save_CXX + CXXFLAGS=$save_CXXFLAGS + AC_MSG_RESULT([$good]) + if test "$good" = no; then + AC_MSG_ERROR([When using MSVC 2015, at least SP3 must be installed]) + fi +fi + dnl check for GNU C++ compiler version if test "$GXX" = "yes"; then AC_MSG_CHECKING([the GNU C++ compiler version]) |