diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-10-25 19:52:08 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-11-26 18:15:55 +0100 |
commit | ae16870b2c84c116cde8279a47db106a4fa9d529 (patch) | |
tree | e5c1e79c38f967fd5cd69c0e3943bc29fa2f3791 /external/libcmis/StaticLibrary_libcmis.mk | |
parent | 5c2f6d9e2efe1015cfbf9d89a88ed940127c0a4f (diff) |
Build as C++17 when GCC/Clang supports it
...and the gperf being used no longer emits "register" in C++ code.
Unlike Clang with -Wdynamic-exception-spec ignored, at least GCC 7.2
-std=gnu++17 always makes dynamic exception specs hard errors, which would cause
errors both when building StaticLibrary_libcmis and when including
libcmis/libcmis.hxx in ucb/source/ucp/cmis/. So patch away all dynamic
exception specifications from all external/libcmis include files indirectly
included via libcmis/libcmis.hxx, and (to silence the remaining dynamic
exception specifications in the innards of external/libcmis, which I did not
feel like also patching away) build StaticLibrary_libcmis as C++03 if necessary,
and wait for upstream libcmis to eventually be ported to C++17.
And external/firebird needs to be built with CXXFLAGS_CXX11 (which amounts to
C++17 with this patch) since 9206a08ada00e8762c4a634f242bd566028964bb "Upgrade
to ICU 60.1", so the relevant dynamic exception specifications had to be patched
away from its innards.
Change-Id: I3a0c9ec83c7c1d413559459631970f69ab977f31
Reviewed-on: https://gerrit.libreoffice.org/43851
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external/libcmis/StaticLibrary_libcmis.mk')
-rw-r--r-- | external/libcmis/StaticLibrary_libcmis.mk | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/external/libcmis/StaticLibrary_libcmis.mk b/external/libcmis/StaticLibrary_libcmis.mk index b7e662465479..b3940b7a749a 100644 --- a/external/libcmis/StaticLibrary_libcmis.mk +++ b/external/libcmis/StaticLibrary_libcmis.mk @@ -23,6 +23,17 @@ $(eval $(call gb_StaticLibrary_add_cxxflags,libcmis,\ )) endif +# Build as C++03 if necessary to avoid GCC C++17 "error: ISO C++1z does not +# allow dynamic exception specifications", until upstream libcmis is ported to +# C++17: +ifeq ($(COM)-$(COM_IS_CLANG),GCC-) +$(eval $(call gb_StaticLibrary_add_cxxflags,libcmis, \ + $(if $(filter -std=gnu++17 -std=gnu++1z -std=c++17 -std=c++1z, \ + $(CXXFLAGS_CXX11)), \ + $(gb_CXX03FLAGS)) \ +)) +endif + $(eval $(call gb_StaticLibrary_set_include,libcmis, \ -I$(call gb_UnpackedTarball_get_dir,libcmis/src/libcmis) \ $$(INCLUDE) \ |