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

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

...with Clang in C++17 mode

Change-Id: If51c0788439688f6fbd77c1a05cb3295ac6e8cb4
üst 14ed889c
...@@ -58,6 +58,15 @@ $(eval $(call gb_Library_add_libs,mysqlcppconn,\ ...@@ -58,6 +58,15 @@ $(eval $(call gb_Library_add_libs,mysqlcppconn,\
)) ))
endif 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,\ $(eval $(call gb_Library_add_generated_exception_objects,mysqlcppconn,\
UnpackedTarball/mysqlcppconn/driver/mysql_art_resultset \ UnpackedTarball/mysqlcppconn/driver/mysql_art_resultset \
UnpackedTarball/mysqlcppconn/driver/mysql_art_rset_metadata \ UnpackedTarball/mysqlcppconn/driver/mysql_art_rset_metadata \
......
...@@ -29,7 +29,14 @@ ...@@ -29,7 +29,14 @@
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated" #pragma GCC diagnostic ignored "-Wdeprecated"
#endif #endif
#if defined __clang__ && __cplusplus > 201402L
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdynamic-exception-spec"
#endif
#include <cppconn/exception.h> #include <cppconn/exception.h>
#if defined __clang__ && __cplusplus > 201402L
#pragma clang diagnostic pop
#endif
#if defined __GNUC__ #if defined __GNUC__
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #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