Improve build scripts related to protobuf and gRPC a little more.

This commit is contained in:
Vitaly Baranov 2020-05-27 17:03:38 +03:00
parent 3ff28d0a7a
commit 7b03e36c2a

View File

@ -112,16 +112,21 @@ if (PROTOBUF_GENERATE_CPP_SCRIPT_MODE)
set (intermediate_dir ${DIR}/intermediate) set (intermediate_dir ${DIR}/intermediate)
set (intermediate_output "${intermediate_dir}/${FILENAME}") set (intermediate_output "${intermediate_dir}/${FILENAME}")
if (COMPILER_ID STREQUAL "GNU") if (COMPILER_ID STREQUAL "Clang")
set (pragma_push "#pragma clang diagnostic push\n")
set (pragma_pop "#pragma clang diagnostic pop\n")
set (pragma_disable_warnings "#pragma clang diagnostic ignored \"-Weverything\"\n")
elseif (COMPILER_ID MATCHES "GNU")
set (pragma_push "#pragma GCC diagnostic push\n") set (pragma_push "#pragma GCC diagnostic push\n")
set (pragma_pop "#pragma GCC diagnostic pop\n") set (pragma_pop "#pragma GCC diagnostic pop\n")
set (pragma_disable_warnings "#pragma GCC diagnostic ignored \"-Wall\"\n" set (pragma_disable_warnings "#pragma GCC diagnostic ignored \"-Wall\"\n"
"#pragma GCC diagnostic ignored \"-Wextra\"\n" "#pragma GCC diagnostic ignored \"-Wextra\"\n"
"#pragma GCC diagnostic ignored \"-Warray-bounds\"\n") "#pragma GCC diagnostic ignored \"-Warray-bounds\"\n"
elseif (COMPILER_ID MATCHES "Clang") "#pragma GCC diagnostic ignored \"-Wold-style-cast\"\n"
set (pragma_push "#pragma clang diagnostic push\n") "#pragma GCC diagnostic ignored \"-Wshadow\"\n"
set (pragma_pop "#pragma clang diagnostic pop\n") "#pragma GCC diagnostic ignored \"-Wsuggest-override\"\n"
set (pragma_disable_warnings "#pragma clang diagnostic ignored \"-Weverything\"\n") "#pragma GCC diagnostic ignored \"-Wcast-qual\"\n"
"#pragma GCC diagnostic ignored \"-Wunused-parameter\"\n")
endif() endif()
if (${FILENAME} MATCHES ".*\\.h") if (${FILENAME} MATCHES ".*\\.h")