From dc18feca4724d0a8958faafcb3b26f0da8f4f28b Mon Sep 17 00:00:00 2001 From: Shevek Date: Thu, 11 Sep 2014 12:11:23 -0700 Subject: Handle framework includes. --- src/main/java/org/anarres/cpp/Preprocessor.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/org/anarres/cpp/Preprocessor.java b/src/main/java/org/anarres/cpp/Preprocessor.java index 192ac45..18a0605 100644 --- a/src/main/java/org/anarres/cpp/Preprocessor.java +++ b/src/main/java/org/anarres/cpp/Preprocessor.java @@ -1149,6 +1149,15 @@ public class Preprocessor implements Closeable { } if (include(quoteincludepath, name)) return; + } else { + int idx = name.indexOf('/'); + if (idx != -1) { + String frameworkName = name.substring(0, idx); + String headerName = name.substring(idx + 1); + String headerPath = frameworkName + ".framework/Headers/" + headerName; + if (include(frameworkspath, headerPath)) + return; + } } if (include(sysincludepath, name)) -- cgit v1.2.3