[Libreoffice-commits] core.git: external/mysqlcppconn mysqlc/source

Stephan Bergmann sbergman at redhat.com
Thu Feb 16 17:11:59 UTC 2017


 external/mysqlcppconn/Library_mysqlcppconn.mk |    9 +++++++++
 mysqlc/source/mysqlc_general.hxx              |    7 +++++++
 2 files changed, 16 insertions(+)

New commits:
commit e16644fa1c042b56a1301f0476d7ddb71c8765ea
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Feb 16 18:11:24 2017 +0100

    external/mysqlcppconn: Silence -Wdynamic-exception-spec errors
    
    ...with Clang in C++17 mode
    
    Change-Id: If51c0788439688f6fbd77c1a05cb3295ac6e8cb4

diff --git a/external/mysqlcppconn/Library_mysqlcppconn.mk b/external/mysqlcppconn/Library_mysqlcppconn.mk
index e289482..70599b0 100644
--- a/external/mysqlcppconn/Library_mysqlcppconn.mk
+++ b/external/mysqlcppconn/Library_mysqlcppconn.mk
@@ -58,6 +58,15 @@ $(eval $(call gb_Library_add_libs,mysqlcppconn,\
 ))
 endif
 
+# Avoid -Wdynamic-exception-spec errors in Clang C++17 mode:
+ifeq ($(COM_IS_CLANG),TRUE)
+$(eval $(call gb_Library_add_cxxflags,mysqlcppconn, \
+    $(if $(filter -std=gnu++17 -std=gnu++1z -std=c++17 -std=c++1z, \
+            $(CXXFLAGS_CXX11)), \
+        -Wno-error=dynamic-exception-spec) \
+))
+endif
+
 $(eval $(call gb_Library_add_generated_exception_objects,mysqlcppconn,\
 	UnpackedTarball/mysqlcppconn/driver/mysql_art_resultset \
 	UnpackedTarball/mysqlcppconn/driver/mysql_art_rset_metadata \
diff --git a/mysqlc/source/mysqlc_general.hxx b/mysqlc/source/mysqlc_general.hxx
index 5d0b828..d3e12ee 100644
--- a/mysqlc/source/mysqlc_general.hxx
+++ b/mysqlc/source/mysqlc_general.hxx
@@ -29,7 +29,14 @@
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated"
 #endif
+#if defined __clang__ && __cplusplus > 201402L
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdynamic-exception-spec"
+#endif
 #include <cppconn/exception.h>
+#if defined __clang__ && __cplusplus > 201402L
+#pragma clang diagnostic pop
+#endif
 #if defined __GNUC__
 #pragma GCC diagnostic pop
 #endif


More information about the Libreoffice-commits mailing list