external/libcmis: Silence -Wdynamic-exception-spec errors

...with Clang in C++17 mode

Change-Id: I50a0568c13e3e7a2d37ebd739d587985b2f9bc8a
This commit is contained in:
Stephan Bergmann 2017-02-16 18:10:12 +01:00
parent be06700309
commit 14ed889c45
5 changed files with 24 additions and 0 deletions

View File

@ -14,8 +14,12 @@ $(eval $(call gb_StaticLibrary_set_warnings_not_errors,cmislib))
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.
$(eval $(call gb_StaticLibrary_add_cxxflags,cmislib,\
-Wno-error=c++11-narrowing \
$(if $(filter -std=gnu++17 -std=gnu++1z -std=c++17 -std=c++1z, \
$(CXXFLAGS_CXX11)), \
-Wno-error=dynamic-exception-spec) \
))
endif

View File

@ -13,10 +13,15 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated"
#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
#elif defined __clang__ && __cplusplus > 201402L
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdynamic-exception-spec"
#endif
#include <libcmis/libcmis.hxx>
#if defined __GNUC__ && __GNUC__ >= 7
#pragma GCC diagnostic pop
#elif defined __clang__ && __cplusplus > 201402L
#pragma clang diagnostic pop
#endif
#include <com/sun/star/ucb/XCommandEnvironment.hpp>

View File

@ -16,10 +16,15 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated"
#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
#elif defined __clang__ && __cplusplus > 201402L
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdynamic-exception-spec"
#endif
#include <libcmis/libcmis.hxx>
#if defined __GNUC__ && __GNUC__ >= 7
#pragma GCC diagnostic pop
#elif defined __clang__ && __cplusplus > 201402L
#pragma clang diagnostic pop
#endif
#include <com/sun/star/ucb/XCommandEnvironment.hpp>

View File

@ -28,10 +28,15 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated"
#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
#elif defined __clang__ && __cplusplus > 201402L
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdynamic-exception-spec"
#endif
#include <libcmis/libcmis.hxx>
#if defined __GNUC__ && __GNUC__ >= 7
#pragma GCC diagnostic pop
#elif defined __clang__ && __cplusplus > 201402L
#pragma clang diagnostic pop
#endif
#include <list>

View File

@ -11,10 +11,15 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated"
#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
#elif defined __clang__ && __cplusplus > 201402L
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdynamic-exception-spec"
#endif
#include <libcmis/libcmis.hxx>
#if defined __GNUC__ && __GNUC__ >= 7
#pragma GCC diagnostic pop
#elif defined __clang__ && __cplusplus > 201402L
#pragma clang diagnostic pop
#endif
#include <config_oauth2.h>