Kaydet (Commit) 665ac8f3 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

All supported versions of Clang and GCC support at least C++17 now

Change-Id: I9130d0d1fceeb6efb1f324c99acd38eb92e67850
Reviewed-on: https://gerrit.libreoffice.org/64733
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst f3e258e3
......@@ -6205,12 +6205,12 @@ dnl ===================================================================
dnl C++11
dnl ===================================================================
AC_MSG_CHECKING([whether $CXX supports C++17, C++14, or C++11])
AC_MSG_CHECKING([whether $CXX supports C++17])
CXXFLAGS_CXX11=
if test "$COM" = MSC -a "$COM_IS_CLANG" != TRUE; then
CXXFLAGS_CXX11=-std:c++17
elif test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
my_flags='-std=gnu++2a -std=c++2a -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'
my_flags='-std=gnu++2a -std=c++2a -std=gnu++17 -std=gnu++1z -std=c++17 -std=c++1z'
for flag in $my_flags; do
if test "$COM" = MSC; then
flag="-Xclang $flag"
......
......@@ -13,13 +13,10 @@ $(eval $(call gb_StaticLibrary_set_warnings_not_errors,libcmis))
ifeq ($(COM_IS_CLANG),TRUE)
# Avoid narrowing conversion error (even though the option is technically a warning)
# caused by boost.
# Also avoid -Wdynamic-exception-spec errors in C++17 mode.
# caused by boost, and avoid -Wdynamic-exception-spec errors.
$(eval $(call gb_StaticLibrary_add_cxxflags,libcmis,\
-Wno-error=c++11-narrowing \
$(if $(filter -std=gnu++2a -std=c++2a -std=gnu++17 -std=gnu++1z -std=c++17 -std=c++1z, \
$(CXXFLAGS_CXX11)), \
-Wno-error=dynamic-exception-spec) \
-Wno-error=dynamic-exception-spec \
))
endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment