aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/third_party.gni
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2018-02-21 13:39:16 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-21 20:40:36 +0000
commit138bd155ed1d1c8696733b7060553f070f384678 (patch)
tree79654a4a7ccc8a5d2091918ae56327227d792b08 /third_party/third_party.gni
parentdf285ce3be2e7e9a134a5c61ceacba39868b69c5 (diff)
use -isystem for headers from third_party
This supresses warnings from code in those headers, e.g. warnings about switch case fallthrough in SDL_memset4(), defined inline in SDL_stdinc.h. Change-Id: I5341a67d4949b28ec5ffa6b7ae433748406e99db Reviewed-on: https://skia-review.googlesource.com/109140 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'third_party/third_party.gni')
-rw-r--r--third_party/third_party.gni9
1 files changed, 8 insertions, 1 deletions
diff --git a/third_party/third_party.gni b/third_party/third_party.gni
index 7aaf63586f..612958b9b4 100644
--- a/third_party/third_party.gni
+++ b/third_party/third_party.gni
@@ -8,7 +8,14 @@ template("third_party") {
if (defined(invoker.public_defines)) {
defines = invoker.public_defines
}
- include_dirs = invoker.public_include_dirs
+ if (is_win) {
+ include_dirs = invoker.public_include_dirs
+ } else {
+ cflags = []
+ foreach(dir, invoker.public_include_dirs) {
+ cflags += ["-isystem", rebase_path(dir)]
+ }
+ }
}
source_set(target_name) {
forward_variables_from(invoker, "*", [ "public_include_dirs" ])