aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2017-10-02 13:19:56 -0700
committerGravatar Muxi Yan <mxyan@google.com>2017-10-02 13:19:56 -0700
commit89cf5a409355ec4dd2083da0fcf01e964606d219 (patch)
tree36feca5e6606351603570a68a3d33c7f5e68d81d /templates
parente7d627f95e66745c1f1e6daaa507b542bc0210e9 (diff)
Eliminate gRPC-Core umbrella header warning by tweaking module.modulemap and excluding some files for other build systems
Diffstat (limited to 'templates')
-rw-r--r--templates/gRPC-Core.podspec.template10
-rw-r--r--templates/include/grpc/module.modulemap.template32
2 files changed, 41 insertions, 1 deletions
diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template
index 6077f8098d..2281484917 100644
--- a/templates/gRPC-Core.podspec.template
+++ b/templates/gRPC-Core.podspec.template
@@ -31,11 +31,19 @@
return [f for f in out if not f.startswith("third_party/nanopb/")]
def grpc_public_headers(libs):
+ excluded_files = ["include/grpc/support/atm_gcc_sync.h",
+ "include/grpc/support/atm_windows.h",
+ "include/grpc/support/sync_windows.h",
+ "include/grpc/support/tls_gcc.h",
+ "include/grpc/support/tls_msvc.h",
+ "include/grpc/impl/codegen/atm_gcc_sync.h",
+ "include/grpc/impl/codegen/atm_windows.h",
+ "include/grpc/impl/codegen/sync_windows.h"]
out = []
for lib in libs:
if lib.name in ("grpc", "gpr"):
out += lib.get('public_headers', [])
- return out
+ return [f for f in out if not f in excluded_files]
def grpc_private_headers(libs):
out = []
diff --git a/templates/include/grpc/module.modulemap.template b/templates/include/grpc/module.modulemap.template
new file mode 100644
index 0000000000..8edc4b56ac
--- /dev/null
+++ b/templates/include/grpc/module.modulemap.template
@@ -0,0 +1,32 @@
+%YAML 1.2
+--- |
+ <%!
+ def grpc_public_headers_no_dir(libs):
+ excluded_files = ["include/grpc/support/atm_gcc_sync.h",
+ "include/grpc/support/atm_windows.h",
+ "include/grpc/support/sync_windows.h",
+ "include/grpc/support/tls_gcc.h",
+ "include/grpc/support/tls_msvc.h",
+ "include/grpc/impl/codegen/atm_gcc_sync.h",
+ "include/grpc/impl/codegen/atm_windows.h",
+ "include/grpc/impl/codegen/sync_windows.h"]
+ out = []
+ for lib in libs:
+ if lib.name in ("grpc", "gpr"):
+ out += lib.get('public_headers', [])
+ out = [f for f in out if f not in excluded_files]
+ out = [hdr.split('/', 2)[2] for hdr in out]
+ return out
+
+ def header_lines(files):
+ return ('\n ').join('header "%s"' % f for f in files)
+ %>
+ framework module grpc {
+ umbrella header "grpc.h"
+
+ ${header_lines(grpc_public_headers_no_dir(libs))}
+
+ export *
+ module * { export * }
+ }
+