summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-11-28 12:25:32 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-11-28 21:54:52 +0100
commit0f3b0ec973f06a98c75ef8acfa720a9973e4d2b5 (patch)
tree31c69e4da8355e3d1f74193ccc4e6ec16e7ebd72 /configure.ac
parent34a7e1b8712bab8dc731a1b7ffe283009752959d (diff)
Avoid C++17 mode for Coverity Scan
...see mail sub-thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-November/078966.html> "Re: New Defects reported by Coverity Scan for LibreOffice" about cid#1424266 et al; lets see if this makes Coverity happy again... Change-Id: If488b9f61f084f2286b35326917741051ec8d5ce Reviewed-on: https://gerrit.libreoffice.org/45403 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 11 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 3543d5874771..23b1ff84ed5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5983,6 +5983,12 @@ dnl ===================================================================
dnl C++11
dnl ===================================================================
+my_cxx17switches=
+libo_FUZZ_ARG_ENABLE(c++17,
+ AS_HELP_STRING([--disable-c++17],
+ [Do not attempt to run GCC/Clang in C++17 mode (needed for Coverity).])
+)
+
CXXFLAGS_CXX11=
if test "$COM" = MSC; then
AC_MSG_CHECKING([whether $CXX supports C++11])
@@ -5994,7 +6000,11 @@ elif test "$GCC" = "yes"; then
dnl But only use C++17 if the gperf that is being used knows not to emit
dnl "register" in C++ output:
printf 'foo\n' | $GPERF -L C++ > conftest.inc
- for flag in -std=gnu++17 -std=gnu++1z -std=c++17 -std=c++1z -std=gnu++14 -std=gnu++1y -std=c++14 -std=c++1y -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x ; do
+ my_flags='-std=gnu++14 -std=gnu++1y -std=c++14 -std=c++1y -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x'
+ if test "$enable_c__17" != no; then
+ my_flags="-std=gnu++17 -std=gnu++1z -std=c++17 -std=c++1z $my_flags"
+ fi
+ for flag in $my_flags; do
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $flag -Werror"
AC_LANG_PUSH([C++])