Use -Wno-undef to compile jsoncpp.

This should fix this error:
In file included from ../../api/audio/echo_canceller3_config_json.cc:19:
In file included from ../..\rtc_base/strings/json.h:18:
In file included from ../../third_party/jsoncpp/source/include\json/json.h:9:
In file included from ../../third_party/jsoncpp/source/include\json/autolink.h:9:
../../third_party/jsoncpp/source/include\json/config.h(126,5): error: '__GNUC__' is not defined, evaluates to 0 [-Werror,-Wundef]

Maybe we could also fix it upstream.

Bug: webrtc:10770
Change-Id: I68434c6957189f680625bd2f2b85422965a89785
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145322
Reviewed-by: Artem Titarenko <artit@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28558}
This commit is contained in:
Mirko Bonadei
2019-07-12 13:29:30 +02:00
committed by Commit Bot
parent d404946c14
commit 6564366f75

View File

@ -595,15 +595,22 @@ rtc_static_library("rtc_numerics") {
]
}
# TODO(bugs.webrtc.org/10770): Update jsoncpp API usage and remove this.
config("rtc_json_temporary_suppressions") {
config("rtc_json_suppressions") {
if (!is_win || is_clang) {
cflags_cc = [ "-Wno-deprecated-declarations" ]
cflags_cc = [
# TODO(bugs.webrtc.org/10770): Update jsoncpp API usage and remove
# -Wno-deprecated-declarations.
"-Wno-deprecated-declarations",
# TODO(bungs.webrtc.org/10814): Remove -Wno-undef as soon as it get
# removed upstream.
"-Wno-undef",
]
}
}
rtc_source_set("rtc_json") {
public_configs = [ ":rtc_json_temporary_suppressions" ]
public_configs = [ ":rtc_json_suppressions" ]
defines = []
sources = [
"strings/json.cc",