mirror of https://github.com/grpc/grpc.git
commit
e0b8a42552
1409 changed files with 145825 additions and 19966 deletions
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,227 +1,229 @@ |
|||||||
# GRPC Bazel BUILD file. |
%YAML 1.2 |
||||||
# This currently builds C, C++ and Objective-C code. |
--- | |
||||||
# This file has been automatically generated from a template file. |
# GRPC Bazel BUILD file. |
||||||
# Please look at the templates directory instead. |
# This currently builds C, C++ and Objective-C code. |
||||||
# This file can be regenerated from the template by running |
# This file has been automatically generated from a template file. |
||||||
# tools/buildgen/generate_projects.sh |
# Please look at the templates directory instead. |
||||||
|
# This file can be regenerated from the template by running |
||||||
# Copyright 2015, Google Inc. |
# tools/buildgen/generate_projects.sh |
||||||
# All rights reserved. |
|
||||||
# |
# Copyright 2015, Google Inc. |
||||||
# Redistribution and use in source and binary forms, with or without |
# All rights reserved. |
||||||
# modification, are permitted provided that the following conditions are |
# |
||||||
# met: |
# Redistribution and use in source and binary forms, with or without |
||||||
# |
# modification, are permitted provided that the following conditions are |
||||||
# * Redistributions of source code must retain the above copyright |
# met: |
||||||
# notice, this list of conditions and the following disclaimer. |
# |
||||||
# * Redistributions in binary form must reproduce the above |
# * Redistributions of source code must retain the above copyright |
||||||
# copyright notice, this list of conditions and the following disclaimer |
# notice, this list of conditions and the following disclaimer. |
||||||
# in the documentation and/or other materials provided with the |
# * Redistributions in binary form must reproduce the above |
||||||
# distribution. |
# copyright notice, this list of conditions and the following disclaimer |
||||||
# * Neither the name of Google Inc. nor the names of its |
# in the documentation and/or other materials provided with the |
||||||
# contributors may be used to endorse or promote products derived from |
# distribution. |
||||||
# this software without specific prior written permission. |
# * Neither the name of Google Inc. nor the names of its |
||||||
# |
# contributors may be used to endorse or promote products derived from |
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
# this software without specific prior written permission. |
||||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
# |
||||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||||
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||||
licenses(["notice"]) # 3-clause BSD |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||||
|
|
||||||
package(default_visibility = ["//visibility:public"]) |
licenses(["notice"]) # 3-clause BSD |
||||||
|
|
||||||
<%! |
package(default_visibility = ["//visibility:public"]) |
||||||
def get_deps(target_dict): |
|
||||||
deps = [] |
<%! |
||||||
if target_dict.get('secure', 'no') == 'yes': |
def get_deps(target_dict): |
||||||
|
deps = [] |
||||||
|
if target_dict.get('secure', False): |
||||||
|
deps = [ |
||||||
|
"//external:libssl", |
||||||
|
] |
||||||
|
if target_dict.get('build', None) == 'protoc': |
||||||
|
deps.append("//external:protobuf_compiler") |
||||||
|
if target_dict['name'] == 'grpc++_unsecure' or target_dict['name'] == 'grpc++': |
||||||
|
deps.append("//external:protobuf_clib") |
||||||
|
elif target_dict['name'] == 'grpc': |
||||||
|
deps.append("//external:zlib") |
||||||
|
for d in target_dict.get('deps', []): |
||||||
|
if d.find('//') == 0 or d[0] == ':': |
||||||
|
deps.append(d) |
||||||
|
else: |
||||||
|
deps.append(':%s' % (d)) |
||||||
|
return deps |
||||||
|
%> |
||||||
|
|
||||||
|
% for lib in libs: |
||||||
|
% if lib.build in ("all", "protoc"): |
||||||
|
${cc_library(lib)} |
||||||
|
% endif |
||||||
|
% endfor |
||||||
|
|
||||||
|
% for lib in libs: |
||||||
|
% if lib.name in ("grpc", "gpr"): |
||||||
|
${objc_library(lib)} |
||||||
|
% endif |
||||||
|
% endfor |
||||||
|
|
||||||
|
% for tgt in targets: |
||||||
|
% if tgt.build == 'protoc': |
||||||
|
${cc_binary(tgt)} |
||||||
|
% endif |
||||||
|
% endfor |
||||||
|
|
||||||
|
<%def name="cc_library(lib)"> |
||||||
|
cc_library( |
||||||
|
name = "${lib.name}", |
||||||
|
srcs = [ |
||||||
|
% for hdr in lib.get("headers", []): |
||||||
|
"${hdr}", |
||||||
|
% endfor |
||||||
|
% for src in lib.src: |
||||||
|
"${src}", |
||||||
|
% endfor |
||||||
|
], |
||||||
|
hdrs = [ |
||||||
|
% for hdr in lib.get("public_headers", []): |
||||||
|
"${hdr}", |
||||||
|
% endfor |
||||||
|
], |
||||||
|
includes = [ |
||||||
|
"include", |
||||||
|
".", |
||||||
|
], |
||||||
deps = [ |
deps = [ |
||||||
"//external:libssl", |
% for dep in get_deps(lib): |
||||||
] |
"${dep}", |
||||||
if target_dict.get('build', None) == 'protoc': |
% endfor |
||||||
deps.append("//external:protobuf_compiler") |
], |
||||||
if target_dict['name'] == 'grpc++_unsecure' or target_dict['name'] == 'grpc++': |
) |
||||||
deps.append("//external:protobuf_clib") |
</%def> |
||||||
elif target_dict['name'] == 'grpc': |
|
||||||
deps.append("//external:zlib") |
<%def name="objc_library(lib)"> |
||||||
for d in target_dict.get('deps', []): |
objc_library( |
||||||
if d.find('//') == 0 or d[0] == ':': |
name = "${lib.name}_objc", |
||||||
deps.append(d) |
srcs = [ |
||||||
else: |
% for src in lib.src: |
||||||
deps.append(':%s' % (d)) |
"${src}", |
||||||
return deps |
% endfor |
||||||
%> |
], |
||||||
|
hdrs = [ |
||||||
% for lib in libs: |
% for hdr in lib.get("public_headers", []): |
||||||
% if lib.build in ("all", "protoc"): |
"${hdr}", |
||||||
${cc_library(lib)} |
% endfor |
||||||
% endif |
% for hdr in lib.get("headers", []): |
||||||
% endfor |
"${hdr}", |
||||||
|
% endfor |
||||||
% for lib in libs: |
], |
||||||
% if lib.name in ("grpc", "gpr"): |
includes = [ |
||||||
${objc_library(lib)} |
"include", |
||||||
% endif |
".", |
||||||
% endfor |
], |
||||||
|
deps = [ |
||||||
% for tgt in targets: |
% for dep in lib.get("deps", []): |
||||||
% if tgt.build == 'protoc': |
":${dep}_objc", |
||||||
${cc_binary(tgt)} |
% endfor |
||||||
% endif |
% if lib.get('secure', False): |
||||||
% endfor |
"//external:libssl_objc", |
||||||
|
% endif |
||||||
<%def name="cc_library(lib)"> |
], |
||||||
cc_library( |
% if lib.get("baselib", false): |
||||||
name = "${lib.name}", |
sdk_dylibs = ["libz"], |
||||||
srcs = [ |
% endif |
||||||
% for hdr in lib.get("headers", []): |
) |
||||||
"${hdr}", |
</%def> |
||||||
% endfor |
|
||||||
% for src in lib.src: |
<%def name="cc_binary(tgt)"> |
||||||
"${src}", |
cc_binary( |
||||||
% endfor |
name = "${tgt.name}", |
||||||
], |
srcs = [ |
||||||
hdrs = [ |
% for src in tgt.src: |
||||||
% for hdr in lib.get("public_headers", []): |
"${src}", |
||||||
"${hdr}", |
% endfor |
||||||
% endfor |
], |
||||||
], |
deps = [ |
||||||
includes = [ |
% for dep in get_deps(tgt): |
||||||
"include", |
"${dep}", |
||||||
".", |
% endfor |
||||||
], |
], |
||||||
deps = [ |
) |
||||||
% for dep in get_deps(lib): |
</%def> |
||||||
"${dep}", |
|
||||||
% endfor |
objc_path = "src/objective-c" |
||||||
], |
|
||||||
) |
rx_library_path = objc_path + "/RxLibrary" |
||||||
</%def> |
|
||||||
|
objc_library( |
||||||
<%def name="objc_library(lib)"> |
name = "rx_library", |
||||||
objc_library( |
hdrs = glob([ |
||||||
name = "${lib.name}_objc", |
rx_library_path + "/*.h", |
||||||
srcs = [ |
rx_library_path + "/transformations/*.h", |
||||||
% for src in lib.src: |
]), |
||||||
"${src}", |
srcs = glob([ |
||||||
% endfor |
rx_library_path + "/*.m", |
||||||
], |
rx_library_path + "/transformations/*.m", |
||||||
hdrs = [ |
]), |
||||||
% for hdr in lib.get("public_headers", []): |
includes = [objc_path], |
||||||
"${hdr}", |
deps = [ |
||||||
% endfor |
":rx_library_private", |
||||||
% for hdr in lib.get("headers", []): |
], |
||||||
"${hdr}", |
) |
||||||
% endfor |
|
||||||
], |
objc_library( |
||||||
includes = [ |
name = "rx_library_private", |
||||||
"include", |
hdrs = glob([rx_library_path + "/private/*.h"]), |
||||||
".", |
srcs = glob([rx_library_path + "/private/*.m"]), |
||||||
], |
visibility = ["//visibility:private"], |
||||||
deps = [ |
) |
||||||
% for dep in lib.get("deps", []): |
|
||||||
":${dep}_objc", |
objc_client_path = objc_path + "/GRPCClient" |
||||||
% endfor |
|
||||||
% if lib.get('secure', 'no') == 'yes': |
objc_library( |
||||||
"//external:libssl_objc", |
name = "grpc_client", |
||||||
% endif |
hdrs = glob([ |
||||||
], |
objc_client_path + "/*.h", |
||||||
% if lib.get("baselib", false): |
objc_client_path + "/private/*.h", |
||||||
sdk_dylibs = ["libz"], |
]), |
||||||
% endif |
srcs = glob([ |
||||||
) |
objc_client_path + "/*.m", |
||||||
</%def> |
objc_client_path + "/private/*.m", |
||||||
|
]), |
||||||
<%def name="cc_binary(tgt)"> |
includes = [objc_path], |
||||||
cc_binary( |
bundles = [":gRPCCertificates"], |
||||||
name = "${tgt.name}", |
deps = [ |
||||||
srcs = [ |
":grpc_objc", |
||||||
% for src in tgt.src: |
":rx_library", |
||||||
"${src}", |
], |
||||||
% endfor |
) |
||||||
], |
|
||||||
deps = [ |
objc_bundle_library( |
||||||
% for dep in get_deps(tgt): |
# The choice of name is signicant here, since it determines the bundle name. |
||||||
"${dep}", |
name = "gRPCCertificates", |
||||||
% endfor |
resources = ["etc/roots.pem"], |
||||||
], |
) |
||||||
) |
|
||||||
</%def> |
proto_objc_rpc_path = objc_path + "/ProtoRPC" |
||||||
|
|
||||||
objc_path = "src/objective-c" |
objc_library( |
||||||
|
name = "proto_objc_rpc", |
||||||
rx_library_path = objc_path + "/RxLibrary" |
hdrs = glob([ |
||||||
|
proto_objc_rpc_path + "/*.h", |
||||||
objc_library( |
]), |
||||||
name = "rx_library", |
srcs = glob([ |
||||||
hdrs = glob([ |
proto_objc_rpc_path + "/*.m", |
||||||
rx_library_path + "/*.h", |
]), |
||||||
rx_library_path + "/transformations/*.h", |
includes = [objc_path], |
||||||
]), |
deps = [ |
||||||
srcs = glob([ |
":grpc_client", |
||||||
rx_library_path + "/*.m", |
":rx_library", |
||||||
rx_library_path + "/transformations/*.m", |
"//external:protobuf_objc", |
||||||
]), |
], |
||||||
includes = [objc_path], |
) |
||||||
deps = [ |
|
||||||
":rx_library_private", |
|
||||||
], |
|
||||||
) |
|
||||||
|
|
||||||
objc_library( |
|
||||||
name = "rx_library_private", |
|
||||||
hdrs = glob([rx_library_path + "/private/*.h"]), |
|
||||||
srcs = glob([rx_library_path + "/private/*.m"]), |
|
||||||
visibility = ["//visibility:private"], |
|
||||||
) |
|
||||||
|
|
||||||
objc_client_path = objc_path + "/GRPCClient" |
|
||||||
|
|
||||||
objc_library( |
|
||||||
name = "grpc_client", |
|
||||||
hdrs = glob([ |
|
||||||
objc_client_path + "/*.h", |
|
||||||
objc_client_path + "/private/*.h", |
|
||||||
]), |
|
||||||
srcs = glob([ |
|
||||||
objc_client_path + "/*.m", |
|
||||||
objc_client_path + "/private/*.m", |
|
||||||
]), |
|
||||||
includes = [objc_path], |
|
||||||
bundles = [":gRPCCertificates"], |
|
||||||
deps = [ |
|
||||||
":grpc_objc", |
|
||||||
":rx_library", |
|
||||||
], |
|
||||||
) |
|
||||||
|
|
||||||
objc_bundle_library( |
|
||||||
# The choice of name is signicant here, since it determines the bundle name. |
|
||||||
name = "gRPCCertificates", |
|
||||||
resources = ["etc/roots.pem"], |
|
||||||
) |
|
||||||
|
|
||||||
proto_objc_rpc_path = objc_path + "/ProtoRPC" |
|
||||||
|
|
||||||
objc_library( |
|
||||||
name = "proto_objc_rpc", |
|
||||||
hdrs = glob([ |
|
||||||
proto_objc_rpc_path + "/*.h", |
|
||||||
]), |
|
||||||
srcs = glob([ |
|
||||||
proto_objc_rpc_path + "/*.m", |
|
||||||
]), |
|
||||||
includes = [objc_path], |
|
||||||
deps = [ |
|
||||||
":grpc_client", |
|
||||||
":rx_library", |
|
||||||
"//external:protobuf_objc", |
|
||||||
], |
|
||||||
) |
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,41 +1,43 @@ |
|||||||
/* |
%YAML 1.2 |
||||||
* |
--- | |
||||||
* Copyright 2015, Google Inc. |
/* |
||||||
* All rights reserved. |
* |
||||||
* |
* Copyright 2015, Google Inc. |
||||||
* Redistribution and use in source and binary forms, with or without |
* All rights reserved. |
||||||
* modification, are permitted provided that the following conditions are |
* |
||||||
* met: |
* Redistribution and use in source and binary forms, with or without |
||||||
* |
* modification, are permitted provided that the following conditions are |
||||||
* * Redistributions of source code must retain the above copyright |
* met: |
||||||
* notice, this list of conditions and the following disclaimer. |
* |
||||||
* * Redistributions in binary form must reproduce the above |
* * Redistributions of source code must retain the above copyright |
||||||
* copyright notice, this list of conditions and the following disclaimer |
* notice, this list of conditions and the following disclaimer. |
||||||
* in the documentation and/or other materials provided with the |
* * Redistributions in binary form must reproduce the above |
||||||
* distribution. |
* copyright notice, this list of conditions and the following disclaimer |
||||||
* * Neither the name of Google Inc. nor the names of its |
* in the documentation and/or other materials provided with the |
||||||
* contributors may be used to endorse or promote products derived from |
* distribution. |
||||||
* this software without specific prior written permission. |
* * Neither the name of Google Inc. nor the names of its |
||||||
* |
* contributors may be used to endorse or promote products derived from |
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
* this software without specific prior written permission. |
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
* |
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||||
* |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||||
*/ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||||
|
* |
||||||
/* This file is autogenerated from: |
*/ |
||||||
templates/src/core/surface/version.c.template */ |
|
||||||
|
/* This file is autogenerated from: |
||||||
#include <grpc/grpc.h> |
templates/src/core/surface/version.c.template */ |
||||||
|
|
||||||
const char *grpc_version_string(void) { |
#include <grpc/grpc.h> |
||||||
return "${settings.version.major}.${settings.version.minor}.${settings.version.micro}.${settings.version.build}"; |
|
||||||
} |
const char *grpc_version_string(void) { |
||||||
|
return "${settings.version.major}.${settings.version.minor}.${settings.version.micro}.${settings.version.build}"; |
||||||
|
} |
||||||
|
@ -1,2 +1,4 @@ |
|||||||
<%namespace file="Doxyfile.include" import="gen_doxyfile"/>\ |
%YAML 1.2 |
||||||
${gen_doxyfile(['grpc++'], 'C++', libs, True)} |
--- | |
||||||
|
<%namespace file="Doxyfile.include" import="gen_doxyfile"/>\ |
||||||
|
${gen_doxyfile(['grpc++'], 'C++', libs, True)} |
||||||
|
@ -1,2 +1,4 @@ |
|||||||
<%namespace file="Doxyfile.include" import="gen_doxyfile"/>\ |
%YAML 1.2 |
||||||
${gen_doxyfile(['grpc++'], 'C++', libs, False)} |
--- | |
||||||
|
<%namespace file="Doxyfile.include" import="gen_doxyfile"/>\ |
||||||
|
${gen_doxyfile(['grpc++'], 'C++', libs, False)} |
||||||
|
@ -1,2 +1,4 @@ |
|||||||
<%namespace file="Doxyfile.include" import="gen_doxyfile"/>\ |
%YAML 1.2 |
||||||
${gen_doxyfile(['grpc', 'gpr'], 'Core', libs, True)} |
--- | |
||||||
|
<%namespace file="Doxyfile.include" import="gen_doxyfile"/>\ |
||||||
|
${gen_doxyfile(['grpc', 'gpr'], 'Core', libs, True)} |
||||||
|
@ -1,2 +1,4 @@ |
|||||||
<%namespace file="Doxyfile.include" import="gen_doxyfile"/>\ |
%YAML 1.2 |
||||||
${gen_doxyfile(['grpc', 'gpr'], 'Core', libs, False)} |
--- | |
||||||
|
<%namespace file="Doxyfile.include" import="gen_doxyfile"/>\ |
||||||
|
${gen_doxyfile(['grpc', 'gpr'], 'Core', libs, False)} |
||||||
|
@ -1,33 +1,35 @@ |
|||||||
<%! |
%YAML 1.2 |
||||||
import json |
--- | |
||||||
import os |
<%! |
||||||
|
import json |
||||||
def proto_headers(src): |
import os |
||||||
out = [] |
|
||||||
for f in src: |
def proto_headers(src): |
||||||
name, ext = os.path.splitext(f) |
out = [] |
||||||
if ext == '.proto': |
for f in src: |
||||||
out.extend(fmt % name for fmt in ['%s.grpc.pb.h', '%s.pb.h']) |
name, ext = os.path.splitext(f) |
||||||
return out |
if ext == '.proto': |
||||||
|
out.extend(fmt % name for fmt in ['%s.grpc.pb.h', '%s.pb.h']) |
||||||
def no_protos(src): |
return out |
||||||
out = [] |
|
||||||
for f in src: |
def no_protos(src): |
||||||
if os.path.splitext(f)[1] != '.proto': |
out = [] |
||||||
out.append(f) |
for f in src: |
||||||
return out |
if os.path.splitext(f)[1] != '.proto': |
||||||
%> |
out.append(f) |
||||||
|
return out |
||||||
${json.dumps([{"name": tgt.name, |
%> |
||||||
"language": tgt.language, |
|
||||||
"src": sorted( |
${json.dumps([{"name": tgt.name, |
||||||
no_protos(tgt.src) + |
"language": tgt.language, |
||||||
tgt.get('public_headers', []) + |
"src": sorted( |
||||||
tgt.get('headers', [])), |
no_protos(tgt.src) + |
||||||
"headers": sorted( |
tgt.get('public_headers', []) + |
||||||
tgt.get('public_headers', []) + |
tgt.get('headers', [])), |
||||||
tgt.get('headers', []) + |
"headers": sorted( |
||||||
proto_headers(tgt.src)), |
tgt.get('public_headers', []) + |
||||||
"deps": sorted(tgt.get('deps', []))} |
tgt.get('headers', []) + |
||||||
for tgt in (targets + libs)], |
proto_headers(tgt.src)), |
||||||
sort_keys=True, indent=2)} |
"deps": sorted(tgt.get('deps', []))} |
||||||
|
for tgt in (targets + libs)], |
||||||
|
sort_keys=True, indent=2)} |
||||||
|
@ -1,13 +1,15 @@ |
|||||||
<%! |
%YAML 1.2 |
||||||
import json |
--- | |
||||||
%> |
<%! |
||||||
|
import json |
||||||
${json.dumps([{"name": tgt.name, |
%> |
||||||
"language": tgt.language, |
|
||||||
"platforms": tgt.platforms, |
${json.dumps([{"name": tgt.name, |
||||||
"ci_platforms": tgt.ci_platforms, |
"language": tgt.language, |
||||||
"exclude_configs": tgt.get("exclude_configs", []), |
"platforms": tgt.platforms, |
||||||
"flaky": tgt.flaky} |
"ci_platforms": tgt.ci_platforms, |
||||||
for tgt in targets |
"exclude_configs": tgt.get("exclude_configs", []), |
||||||
if tgt.get('run', True) and tgt.build == 'test'], |
"flaky": tgt.flaky} |
||||||
sort_keys=True, indent=2)} |
for tgt in targets |
||||||
|
if tgt.get('run', True) and tgt.build == 'test'], |
||||||
|
sort_keys=True, indent=2)} |
||||||
|
@ -1,206 +1,208 @@ |
|||||||
# Copyright 2015, Google Inc. |
%YAML 1.2 |
||||||
# All rights reserved. |
--- | |
||||||
# |
# Copyright 2015, Google Inc. |
||||||
# Redistribution and use in source and binary forms, with or without |
# All rights reserved. |
||||||
# modification, are permitted provided that the following conditions are |
# |
||||||
# met: |
# Redistribution and use in source and binary forms, with or without |
||||||
# |
# modification, are permitted provided that the following conditions are |
||||||
# * Redistributions of source code must retain the above copyright |
# met: |
||||||
# notice, this list of conditions and the following disclaimer. |
# |
||||||
# * Redistributions in binary form must reproduce the above |
# * Redistributions of source code must retain the above copyright |
||||||
# copyright notice, this list of conditions and the following disclaimer |
# notice, this list of conditions and the following disclaimer. |
||||||
# in the documentation and/or other materials provided with the |
# * Redistributions in binary form must reproduce the above |
||||||
# distribution. |
# copyright notice, this list of conditions and the following disclaimer |
||||||
# * Neither the name of Google Inc. nor the names of its |
# in the documentation and/or other materials provided with the |
||||||
# contributors may be used to endorse or promote products derived from |
# distribution. |
||||||
# this software without specific prior written permission. |
# * Neither the name of Google Inc. nor the names of its |
||||||
# |
# contributors may be used to endorse or promote products derived from |
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
# this software without specific prior written permission. |
||||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
# |
||||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||||
<%! |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||||
import re |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||||
%>\ |
<%! |
||||||
<%namespace file="packages.include" import="get_openssl,get_zlib"/>\ |
import re |
||||||
<%def name="to_windows_path(path)">${path.replace('/','\\')}</%def>\ |
%>\ |
||||||
<% |
<%namespace file="packages.include" import="get_name"/>\ |
||||||
build_from_project_file = set(['gpr', |
<%def name="to_windows_path(path)">${path.replace('/','\\')}</%def>\ |
||||||
'gpr_test_util', |
<% |
||||||
'grpc', |
build_from_project_file = set(['gpr', |
||||||
'grpc_test_util', |
'gpr_test_util', |
||||||
'grpc_test_util_unsecure', |
'grpc', |
||||||
'grpc_unsecure', |
'grpc_test_util', |
||||||
'grpc++', |
'grpc_test_util_unsecure', |
||||||
'grpc++_unsecure' |
'grpc_unsecure', |
||||||
]) |
'grpc++', |
||||||
buildable_targets = [ target for target in targets + libs |
'grpc++_unsecure' |
||||||
if target.build in ['all', 'test', 'private', 'tool', 'benchmark'] and |
]) |
||||||
target.language in ['c', 'c++'] and |
buildable_targets = [ target for target in targets + libs |
||||||
all([(src.endswith('.c') or src.endswith('.cc') or src.endswith('.proto')) for src in target.src]) and |
if target.build in ['all', 'test', 'private', 'tool', 'benchmark'] and |
||||||
'windows' in target.get('platforms', ['windows']) ] |
target.language in ['c', 'c++'] and |
||||||
c_test_targets = [ target for target in buildable_targets if target.build == 'test' and not target.language == 'c++' ] |
all([(src.endswith('.c') or src.endswith('.cc') or src.endswith('.proto')) for src in target.src]) and |
||||||
cxx_test_targets = [ target for target in buildable_targets if target.build == 'test' and target.language == 'c++' ] |
'windows' in target.get('platforms', ['windows']) ] |
||||||
%>\ |
c_test_targets = [ target for target in buildable_targets if target.build == 'test' and not target.language == 'c++' ] |
||||||
# NMake file to build secondary gRPC targets on Windows. |
cxx_test_targets = [ target for target in buildable_targets if target.build == 'test' and target.language == 'c++' ] |
||||||
# Use grpc.sln to solution to build the gRPC libraries. |
%>\ |
||||||
|
# NMake file to build secondary gRPC targets on Windows. |
||||||
OUT_DIR=test_bin |
# Use grpc.sln to solution to build the gRPC libraries. |
||||||
|
|
||||||
CC=cl.exe /nologo |
OUT_DIR=test_bin |
||||||
LINK=link.exe /nologo |
|
||||||
LIBTOOL=lib.exe /nologo /nodefaultlib |
CC=cl.exe /nologo |
||||||
|
LINK=link.exe /nologo |
||||||
REPO_ROOT=.. |
LIBTOOL=lib.exe /nologo /nodefaultlib |
||||||
OPENSSL_INCLUDES = .\packages\${get_openssl()}\build\native\include |
|
||||||
ZLIB_INCLUDES = .\packages\${get_zlib()}\build\native\include |
REPO_ROOT=.. |
||||||
INCLUDES=/I$(REPO_ROOT) /I$(REPO_ROOT)\include /I$(OPENSSL_INCLUDES) /I$(ZLIB_INCLUDES) |
OPENSSL_INCLUDES = .\packages\${get_name(vsprojects, 'openssl')}\build\native\include |
||||||
|
ZLIB_INCLUDES = .\packages\${get_name(vsprojects, 'zlib')}\build\native\include |
||||||
GFLAGS_INCLUDES = .\..\third_party\gflags\include |
INCLUDES=/I$(REPO_ROOT) /I$(REPO_ROOT)\include /I$(OPENSSL_INCLUDES) /I$(ZLIB_INCLUDES) |
||||||
GTEST_INCLUDES = .\..\third_party\gtest\include |
|
||||||
PROTOBUF_INCLUDES = .\..\third_party\protobuf\src |
GFLAGS_INCLUDES = .\..\third_party\gflags\include |
||||||
CXX_INCLUDES=/I$(GFLAGS_INCLUDES) /I$(GTEST_INCLUDES) /I$(PROTOBUF_INCLUDES) |
GTEST_INCLUDES = .\..\third_party\gtest\include |
||||||
|
PROTOBUF_INCLUDES = .\..\third_party\protobuf\src |
||||||
#_SCL_SECURE_NO_WARNINGS supresses a ton of "potentially unsafe use of std lib" warnings |
CXX_INCLUDES=/I$(GFLAGS_INCLUDES) /I$(GTEST_INCLUDES) /I$(PROTOBUF_INCLUDES) |
||||||
DEFINES=/D WIN32 /D _LIB /D _USE_32BIT_TIME_T /D _UNICODE /D UNICODE /D _CRT_SECURE_NO_WARNINGS /D _SCL_SECURE_NO_WARNINGS |
|
||||||
|
#_SCL_SECURE_NO_WARNINGS supresses a ton of "potentially unsafe use of std lib" warnings |
||||||
#important options: /TC vs. /TP: compile as C vs. compile as C++ |
DEFINES=/D WIN32 /D _LIB /D _USE_32BIT_TIME_T /D _UNICODE /D UNICODE /D _CRT_SECURE_NO_WARNINGS /D _SCL_SECURE_NO_WARNINGS |
||||||
CFLAGS=/c $(INCLUDES) /Z7 /W3 /WX- /sdl $(DEFINES) /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Gd /TC /analyze- |
|
||||||
CXXFLAGS=/c $(INCLUDES) $(CXX_INCLUDES) /Z7 /W3 /WX- /sdl $(DEFINES) /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Gd /TP /analyze- |
#important options: /TC vs. /TP: compile as C vs. compile as C++ |
||||||
|
CFLAGS=/c $(INCLUDES) /Z7 /W3 /WX- /sdl $(DEFINES) /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Gd /TC /analyze- |
||||||
LFLAGS=/DEBUG /INCREMENTAL /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86 |
CXXFLAGS=/c $(INCLUDES) $(CXX_INCLUDES) /Z7 /W3 /WX- /sdl $(DEFINES) /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Gd /TP /analyze- |
||||||
|
|
||||||
OPENSSL_LIBS=.\packages\${get_openssl()}\build\native\lib\v120\Win32\Debug\static\ssleay32.lib .\packages\${get_openssl()}\build\native\lib\v120\Win32\Debug\static\libeay32.lib |
LFLAGS=/DEBUG /INCREMENTAL /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86 |
||||||
WINSOCK_LIBS=ws2_32.lib |
|
||||||
GENERAL_LIBS=advapi32.lib comdlg32.lib gdi32.lib kernel32.lib odbc32.lib odbccp32.lib ole32.lib oleaut32.lib shell32.lib user32.lib uuid.lib winspool.lib |
OPENSSL_LIBS=.\packages\${get_name(vsprojects, 'openssl')}\build\native\lib\v120\Win32\Debug\static\ssleay32.lib .\packages\${get_name(vsprojects, 'openssl')}\build\native\lib\v120\Win32\Debug\static\libeay32.lib |
||||||
ZLIB_LIBS=.\packages\${get_zlib()}\build\native\lib\v120\Win32\Debug\static\cdecl\zlib.lib |
WINSOCK_LIBS=ws2_32.lib |
||||||
LIBS=$(OPENSSL_LIBS) $(ZLIB_LIBS) $(GENERAL_LIBS) $(WINSOCK_LIBS) |
GENERAL_LIBS=advapi32.lib comdlg32.lib gdi32.lib kernel32.lib odbc32.lib odbccp32.lib ole32.lib oleaut32.lib shell32.lib user32.lib uuid.lib winspool.lib |
||||||
|
ZLIB_LIBS=.\packages\${get_name(vsprojects, 'zlib')}\build\native\lib\v120\Win32\Debug\static\cdecl\zlib.lib |
||||||
#shlwapi.lib provides PathMatchSpec() for gflags in windows |
LIBS=$(OPENSSL_LIBS) $(ZLIB_LIBS) $(GENERAL_LIBS) $(WINSOCK_LIBS) |
||||||
GFLAGS_LIBS=.\..\third_party\gflags\lib\Debug\gflags.lib shlwapi.lib |
|
||||||
GTEST_LIBS=.\..\third_party\gtest\msvc\gtest\Debug\gtestd.lib |
#shlwapi.lib provides PathMatchSpec() for gflags in windows |
||||||
PROTOBUF_LIBS=.\..\third_party\protobuf\vsprojects\Debug\libprotobuf.lib |
GFLAGS_LIBS=.\..\third_party\gflags\lib\Debug\gflags.lib shlwapi.lib |
||||||
CXX_LIBS=$(GFLAGS_LIBS) $(GTEST_LIBS) $(PROTOBUF_LIBS) |
GTEST_LIBS=.\..\third_party\gtest\msvc\gtest\Debug\gtestd.lib |
||||||
|
PROTOBUF_LIBS=.\..\third_party\protobuf\vsprojects\Debug\libprotobuf.lib |
||||||
all: buildtests |
CXX_LIBS=$(GFLAGS_LIBS) $(GTEST_LIBS) $(PROTOBUF_LIBS) |
||||||
|
|
||||||
tools: |
all: buildtests |
||||||
|
|
||||||
tools_c: |
tools: |
||||||
|
|
||||||
tools_cxx: |
tools_c: |
||||||
|
|
||||||
$(OUT_DIR): |
tools_cxx: |
||||||
mkdir $(OUT_DIR) |
|
||||||
|
$(OUT_DIR): |
||||||
build_libs: \ |
mkdir $(OUT_DIR) |
||||||
% for target in buildable_targets: |
|
||||||
% if target.build == 'private' or target.build == 'all': |
build_libs: \ |
||||||
% if target.name in build_from_project_file: |
% for target in buildable_targets: |
||||||
build_${target.name} \ |
% if target.build == 'private' or target.build == 'all': |
||||||
% else: |
% if target.name in build_from_project_file: |
||||||
Debug\${target.name}.lib \ |
build_${target.name} \ |
||||||
% endif |
% else: |
||||||
% endif |
Debug\${target.name}.lib \ |
||||||
% endfor |
% endif |
||||||
|
% endif |
||||||
buildtests: buildtests_c buildtests_cxx |
% endfor |
||||||
|
|
||||||
buildtests_c: \ |
buildtests: buildtests_c buildtests_cxx |
||||||
% for target in c_test_targets: |
|
||||||
${target.name}.exe \ |
buildtests_c: \ |
||||||
% endfor |
% for target in c_test_targets: |
||||||
|
${target.name}.exe \ |
||||||
echo All C tests built. |
% endfor |
||||||
|
|
||||||
buildtests_cxx: \ |
echo All C tests built. |
||||||
% for target in cxx_test_targets: |
|
||||||
${target.name}.exe \ |
buildtests_cxx: \ |
||||||
% endfor |
% for target in cxx_test_targets: |
||||||
|
${target.name}.exe \ |
||||||
echo All C++ tests built. |
% endfor |
||||||
|
|
||||||
% for target in buildable_targets: |
echo All C++ tests built. |
||||||
|
|
||||||
## replace all .proto includes with .pb.cc / .grpc.pb.cc |
% for target in buildable_targets: |
||||||
%if target.src: |
|
||||||
%for source in target.src: |
## replace all .proto includes with .pb.cc / .grpc.pb.cc |
||||||
%if source.endswith(".proto"): |
%if target.src: |
||||||
<% |
%for source in target.src: |
||||||
src_name_parts = source.split(".") |
%if source.endswith(".proto"): |
||||||
target.src.append(src_name_parts[0] + ".pb.cc") |
<% |
||||||
target.src.append(src_name_parts[0] + ".grpc.pb.cc") |
src_name_parts = source.split(".") |
||||||
%>\ |
target.src.append(src_name_parts[0] + ".pb.cc") |
||||||
%endif |
target.src.append(src_name_parts[0] + ".grpc.pb.cc") |
||||||
%endfor |
%>\ |
||||||
%endif |
%endif |
||||||
## remove all .proto includes |
%endfor |
||||||
<% |
%endif |
||||||
target.src = [item for item in target.src if not re.search('([^/]+)\.proto$', item)] |
## remove all .proto includes |
||||||
%>\ |
<% |
||||||
%if target.name in build_from_project_file: |
target.src = [item for item in target.src if not re.search('([^/]+)\.proto$', item)] |
||||||
build_${target.name}: |
%>\ |
||||||
msbuild grpc.sln /t:${target.name} /p:Configuration=Debug /p:Linkage-grpc_dependencies_zlib=static |
%if target.name in build_from_project_file: |
||||||
%else: |
build_${target.name}: |
||||||
%if target.build == 'private': |
msbuild grpc.sln /t:${target.name} /p:Configuration=Debug /p:Linkage-grpc_dependencies_zlib=static |
||||||
Debug\${target.name}.lib: \ |
%else: |
||||||
%else: |
%if target.build == 'private': |
||||||
${target.name}.exe: \ |
Debug\${target.name}.lib: \ |
||||||
%for dep in target.get('deps', []): |
%else: |
||||||
%if dep in build_from_project_file: |
${target.name}.exe: \ |
||||||
build_${dep} \ |
%for dep in target.get('deps', []): |
||||||
%else: |
%if dep in build_from_project_file: |
||||||
Debug\${dep}.lib \ |
build_${dep} \ |
||||||
%endif |
%else: |
||||||
%endfor |
Debug\${dep}.lib \ |
||||||
%endif |
%endif |
||||||
$(OUT_DIR) |
%endfor |
||||||
echo Building ${target.name} |
%endif |
||||||
%if target.language == 'c++': |
$(OUT_DIR) |
||||||
$(CC) $(CXXFLAGS) /Fo:$(OUT_DIR)\ \ |
echo Building ${target.name} |
||||||
%else: |
%if target.language == 'c++': |
||||||
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ \ |
$(CC) $(CXXFLAGS) /Fo:$(OUT_DIR)\ \ |
||||||
%endif |
%else: |
||||||
%for source in target.src: |
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ \ |
||||||
$(REPO_ROOT)\${to_windows_path(source)} \ |
%endif |
||||||
%endfor |
%for source in target.src: |
||||||
%if not target.src: |
$(REPO_ROOT)\${to_windows_path(source)} \ |
||||||
$(REPO_ROOT)\${to_windows_path('vsprojects/dummy.c')} \ |
%endfor |
||||||
%endif |
%if not target.src: |
||||||
|
$(REPO_ROOT)\${to_windows_path('vsprojects/dummy.c')} \ |
||||||
%if target.build == 'private': |
%endif |
||||||
$(LIBTOOL) /OUT:"Debug\${target.name}.lib" \ |
|
||||||
%else: |
%if target.build == 'private': |
||||||
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\${target.name}.exe" \ |
$(LIBTOOL) /OUT:"Debug\${target.name}.lib" \ |
||||||
%for dep in target.get('deps', []): |
%else: |
||||||
Debug\${dep}.lib \ |
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\${target.name}.exe" \ |
||||||
%endfor |
%for dep in target.get('deps', []): |
||||||
%if target.language == 'c++': |
Debug\${dep}.lib \ |
||||||
$(CXX_LIBS) \ |
%endfor |
||||||
%endif |
%if target.language == 'c++': |
||||||
$(LIBS) \ |
$(CXX_LIBS) \ |
||||||
%endif |
%endif |
||||||
%if not target.src: |
$(LIBS) \ |
||||||
$(OUT_DIR)\dummy.obj \ |
%endif |
||||||
%else: |
%if not target.src: |
||||||
%for source in target.src: |
$(OUT_DIR)\dummy.obj \ |
||||||
%if re.search('([^/]+)\.c{1,2}$', source): |
%else: |
||||||
$(OUT_DIR)\${re.search('([^/]+)\.c{1,2}$', source).group(1)}.obj \ |
%for source in target.src: |
||||||
%endif |
%if re.search('([^/]+)\.c{1,2}$', source): |
||||||
%endfor |
$(OUT_DIR)\${re.search('([^/]+)\.c{1,2}$', source).group(1)}.obj \ |
||||||
%endif |
%endif |
||||||
|
%endfor |
||||||
%if target.build != 'private': |
%endif |
||||||
${target.name}: ${target.name}.exe |
|
||||||
echo Running ${target.name} |
%if target.build != 'private': |
||||||
$(OUT_DIR)\${target.name}.exe |
${target.name}: ${target.name}.exe |
||||||
%endif |
echo Running ${target.name} |
||||||
%endif |
$(OUT_DIR)\${target.name}.exe |
||||||
% endfor |
%endif |
||||||
|
%endif |
||||||
|
% endfor |
||||||
|
@ -1,2 +0,0 @@ |
|||||||
<%namespace file="../vcxproj.filters_defs.include" import="gen_filters"/>\ |
|
||||||
${gen_filters('gpr', libs)} |
|
@ -1,2 +0,0 @@ |
|||||||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
|
||||||
${gen_project('gpr', libs)} |
|
@ -1,2 +0,0 @@ |
|||||||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
|
||||||
${gen_project('gpr_test_util', libs)} |
|
@ -1,2 +0,0 @@ |
|||||||
<%namespace file="../vcxproj.filters_defs.include" import="gen_filters"/>\ |
|
||||||
${gen_filters('grpc++', libs)} |
|
@ -1,2 +0,0 @@ |
|||||||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
|
||||||
${gen_project('grpc++', libs)} |
|
@ -1,2 +1,4 @@ |
|||||||
<%namespace file="../vcxproj.filters_defs.include" import="gen_filters"/>\ |
%YAML 1.2 |
||||||
${gen_filters('grpc++_unsecure', libs)} |
--- | |
||||||
|
<%namespace file="../vcxproj.filters_defs.include" import="gen_filters"/>\ |
||||||
|
${gen_filters('grpc++_unsecure', libs)} |
||||||
|
@ -1,2 +1,4 @@ |
|||||||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
%YAML 1.2 |
||||||
${gen_project('grpc++_unsecure', libs)} |
--- | |
||||||
|
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
||||||
|
${gen_project('grpc++_unsecure', libs)} |
||||||
|
@ -0,0 +1,7 @@ |
|||||||
|
%YAML 1.2 |
||||||
|
--- | |
||||||
|
<%namespace file="sln_defs.include" import="gen_solution"/>\ |
||||||
|
<% |
||||||
|
solution_projects = [p for p in vsprojects if p.build != 'protoc' and p.language in ['c', 'c++'] and not (p.language == 'c++' and p.build in ['private', 'test'])] |
||||||
|
%>\ |
||||||
|
${gen_solution(solution_projects, use_dlls='yes')} |
@ -1,5 +1,7 @@ |
|||||||
<%namespace file="sln_defs.include" import="gen_solution"/>\ |
%YAML 1.2 |
||||||
<% |
--- | |
||||||
solution_projects = [p for p in vsprojects if p.build != 'protoc' and p.language in ['c', 'c++']] |
<%namespace file="sln_defs.include" import="gen_solution"/>\ |
||||||
%>\ |
<% |
||||||
${gen_solution(solution_projects, use_dlls='yes')} |
solution_projects = [p for p in vsprojects if p.build not in ['protoc', 'test'] and p.language in ['c', 'c++'] and p.vs_proj_dir == '.' and not (p.build == 'private' and p.language == 'c++')] |
||||||
|
%>\ |
||||||
|
${gen_solution(solution_projects, use_dlls='yes')} |
||||||
|
@ -1,2 +0,0 @@ |
|||||||
<%namespace file="../vcxproj.filters_defs.include" import="gen_filters"/>\ |
|
||||||
${gen_filters('grpc', libs)} |
|
@ -1,2 +0,0 @@ |
|||||||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
|
||||||
${gen_project('grpc', libs, packages=['openssl','zlib'])} |
|
@ -1,2 +1,4 @@ |
|||||||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
%YAML 1.2 |
||||||
${gen_project('grpc_cpp_plugin', targets, configuration_type='Application')} |
--- | |
||||||
|
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
||||||
|
${gen_project('grpc_cpp_plugin', targets)} |
||||||
|
@ -1,5 +1,7 @@ |
|||||||
<%namespace file="sln_defs.include" import="gen_solution"/>\ |
%YAML 1.2 |
||||||
<% |
--- | |
||||||
solution_projects = [p for p in vsprojects if p.build == 'all' and p.language in ['c', 'csharp']] |
<%namespace file="sln_defs.include" import="gen_solution"/>\ |
||||||
%>\ |
<% |
||||||
${gen_solution(solution_projects, use_dlls='only')} |
solution_projects = [p for p in vsprojects if p.build == 'all' and p.language in ['c', 'csharp']] |
||||||
|
%>\ |
||||||
|
${gen_solution(solution_projects, use_dlls='only')} |
||||||
|
@ -1,2 +0,0 @@ |
|||||||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
|
||||||
${gen_project('grpc_csharp_ext', libs, configuration_type = 'DynamicLibrary', props=['zlib-dll'], packages=['openssl','zlib'])} |
|
@ -1,2 +0,0 @@ |
|||||||
<%namespace file="../packages.include" import="gen_packages_config"/>\ |
|
||||||
${gen_packages_config(['openssl','zlib'])} |
|
@ -1,2 +1,4 @@ |
|||||||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
%YAML 1.2 |
||||||
${gen_project('grpc_csharp_plugin', targets, configuration_type='Application')} |
--- | |
||||||
|
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
||||||
|
${gen_project('grpc_csharp_plugin', targets)} |
||||||
|
@ -1,2 +1,4 @@ |
|||||||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
%YAML 1.2 |
||||||
${gen_project('grpc_objective_c_plugin', targets, configuration_type='Application')} |
--- | |
||||||
|
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
||||||
|
${gen_project('grpc_objective_c_plugin', targets)} |
||||||
|
@ -1,2 +0,0 @@ |
|||||||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
|
||||||
${gen_project('grpc_plugin_support', libs)} |
|
@ -1,5 +1,7 @@ |
|||||||
<%namespace file="sln_defs.include" import="gen_solution"/>\ |
%YAML 1.2 |
||||||
<% |
--- | |
||||||
solution_projects = [p for p in vsprojects if p.build == 'protoc'] |
<%namespace file="sln_defs.include" import="gen_solution"/>\ |
||||||
%>\ |
<% |
||||||
${gen_solution(solution_projects)} |
solution_projects = [p for p in vsprojects if p.build == 'protoc'] |
||||||
|
%>\ |
||||||
|
${gen_solution(solution_projects)} |
||||||
|
@ -1,2 +1,4 @@ |
|||||||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
%YAML 1.2 |
||||||
${gen_project('grpc_python_plugin', targets, configuration_type='Application')} |
--- | |
||||||
|
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
||||||
|
${gen_project('grpc_python_plugin', targets)} |
||||||
|
@ -1,2 +1,4 @@ |
|||||||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
%YAML 1.2 |
||||||
${gen_project('grpc_ruby_plugin', targets, configuration_type='Application')} |
--- | |
||||||
|
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
||||||
|
${gen_project('grpc_ruby_plugin', targets)} |
||||||
|
@ -1,2 +0,0 @@ |
|||||||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
|
||||||
${gen_project('grpc_test_util', libs)} |
|
@ -1,2 +0,0 @@ |
|||||||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
|
||||||
${gen_project('grpc_test_util_unsecure', libs)} |
|
@ -1,2 +0,0 @@ |
|||||||
<%namespace file="../vcxproj.filters_defs.include" import="gen_filters"/>\ |
|
||||||
${gen_filters('grpc_unsecure', libs)} |
|
@ -1,2 +0,0 @@ |
|||||||
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ |
|
||||||
${gen_project('grpc_unsecure', libs, packages=['zlib'])} |
|
@ -1,54 +1,53 @@ |
|||||||
<%! |
<%def name="get_name(vspackages, package)">${''.join('%s.%s' % (p.name, p.version) for p in vspackages if p.name == package)}</%def> |
||||||
openssl_pkg_name = "grpc.dependencies.openssl" |
|
||||||
openssl_pkg_version = "1.0.2.2" |
|
||||||
zlib_pkg_name = "grpc.dependencies.zlib" |
|
||||||
zlib_pkg_version = "1.2.8.9" |
|
||||||
%>\ |
|
||||||
<%def name="get_openssl()">${openssl_pkg_name}.${openssl_pkg_version}</%def>\ |
|
||||||
<%def name="get_zlib()">${zlib_pkg_name}.${zlib_pkg_version}</%def>\ |
|
||||||
<%def name="gen_packages_config(packages)">\ |
<%def name="gen_packages_config(packages)">\ |
||||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||||
<packages> |
<packages> |
||||||
% if 'openssl' in packages: |
% for package in vspackages: |
||||||
<package id="${openssl_pkg_name}" version="${openssl_pkg_version}" targetFramework="Native" /> |
% if packages == 'all' or package.name in packages: |
||||||
<package id="${openssl_pkg_name}.redist" version="${openssl_pkg_version}" targetFramework="Native" /> |
<package id="${package.name}" version="${package.version}" targetFramework="Native" /> |
||||||
% endif |
% if package.redist: |
||||||
% if 'zlib' in packages: |
<package id="${package.name}.redist" version="${package.version}" targetFramework="Native" /> |
||||||
<package id="${zlib_pkg_name}" version="${zlib_pkg_version}" targetFramework="Native" /> |
% endif |
||||||
<package id="${zlib_pkg_name}.redist" version="${zlib_pkg_version}" targetFramework="Native" /> |
% endif |
||||||
% endif |
% endfor |
||||||
</packages> |
</packages> |
||||||
</%def>\ |
</%def>\ |
||||||
<%def name="gen_package_props(packages)">\ |
<%def name="gen_package_props(packages, repo_root)">\ |
||||||
% if 'openssl' in packages: |
% for package in vspackages: |
||||||
<Import Project="..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.props" Condition="Exists('..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.props')" /> |
% if packages == 'all' or package.name in packages: |
||||||
% endif |
% if package.props: |
||||||
|
<Import Project="${repo_root}\vsprojects\packages\${package.name}.${package.version}\build\native\${package.name}.props" Condition="Exists('${repo_root}\vsprojects\packages\${package.name}.${package.version}\build\native\${package.version}.props')" /> |
||||||
|
% endif |
||||||
|
% endif |
||||||
|
% endfor |
||||||
</%def>\ |
</%def>\ |
||||||
<%def name="gen_package_targets(packages)">\ |
<%def name="gen_package_targets(packages, repo_root)">\ |
||||||
% if 'zlib' in packages: |
% for package in vspackages: |
||||||
<Import Project="..\packages\${zlib_pkg_name}.redist.${zlib_pkg_version}\build\native\${zlib_pkg_name}.redist.targets" Condition="Exists('..\packages\${zlib_pkg_name}.redist.${zlib_pkg_version}\build\native\${zlib_pkg_name}.redist.targets')" /> |
% if packages == 'all' or package.name in packages: |
||||||
<Import Project="..\packages\${zlib_pkg_name}.${zlib_pkg_version}\build\native\${zlib_pkg_name}.targets" Condition="Exists('..\packages\${zlib_pkg_name}.${zlib_pkg_version}\build\native\${zlib_pkg_name}.targets')" /> |
% if package.redist: |
||||||
%endif |
<Import Project="${repo_root}\vsprojects\packages\${package.name}.redist.${package.version}\build\native\${package.name}.redist.targets" Condition="Exists('${repo_root}\vsprojects\packages\${package.name}.redist.${package.version}\build\native\grpc.dependencies\${package.name}.targets')" /> |
||||||
% if 'openssl' in packages: |
% endif |
||||||
<Import Project="..\packages\${openssl_pkg_name}.redist.${openssl_pkg_version}\build\native\${openssl_pkg_name}.redist.targets" Condition="Exists('..\packages\${openssl_pkg_name}.redist.${openssl_pkg_version}\build\native\${openssl_pkg_name}.redist.targets')" /> |
<Import Project="${repo_root}\vsprojects\packages\${package.name}.${package.version}\build\native\${package.name}.targets" Condition="Exists('${repo_root}\vsprojects\packages\${package.name}.${package.version}\build\native\grpc.dependencies\${package.name}.targets')" /> |
||||||
<Import Project="..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.targets" Condition="Exists('..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.targets')" /> |
% endif |
||||||
% endif |
% endfor |
||||||
</%def>\ |
</%def>\ |
||||||
<%def name="gen_package_ensure(packages)">\ |
<%def name="check_file_inner(file)"><Error Condition="!Exists('${file}')" Text="$([System.String]::Format('$(ErrorText)', '${file}')" /></%def>\ |
||||||
% if packages: |
<%def name="check_file(file, repo_root, package)">${check_file_inner(file % {'root':repo_root, 'name':package.name, 'version':package.version})}</%def>\ |
||||||
|
<%def name="gen_package_ensure(packages, repo_root)">\ |
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
||||||
<PropertyGroup> |
<PropertyGroup> |
||||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
||||||
</PropertyGroup> |
</PropertyGroup> |
||||||
% if 'zlib' in packages: |
% for package in vspackages: |
||||||
<Error Condition="!Exists('..\packages\${zlib_pkg_name}.redist.${zlib_pkg_version}\build\native\${zlib_pkg_name}.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\${zlib_pkg_name}.redist.${zlib_pkg_version}\build\native\${zlib_pkg_name}.redist.targets'))" /> |
% if packages == 'all' or package.name in packages: |
||||||
<Error Condition="!Exists('..\packages\${zlib_pkg_name}.${zlib_pkg_version}\build\native\${zlib_pkg_name}.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\${zlib_pkg_name}.${zlib_pkg_version}\build\native\${zlib_pkg_name}.targets'))" /> |
% if package.redist: |
||||||
%endif |
${check_file('%(root)s\\vsprojects\\packages\\%(name)s.redist.%(version)s\\build\\native\\%(name)s.redist.targets', repo_root, package)} |
||||||
% if 'openssl' in packages: |
% endif |
||||||
<Error Condition="!Exists('..\packages\${openssl_pkg_name}.redist.${openssl_pkg_version}\build\native\${openssl_pkg_name}.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\${openssl_pkg_name}.redist.${openssl_pkg_version}\build\native\${openssl_pkg_name}.redist.targets'))" /> |
% if package.props: |
||||||
<Error Condition="!Exists('..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.props'))" /> |
${check_file('%(root)s\\vsprojects\\packages\\%(name)s.%(version)s\\build\\native\\%(name)s.props', repo_root, package)} |
||||||
<Error Condition="!Exists('..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.targets'))" /> |
% endif |
||||||
%endif |
${check_file('%(root)s\\vsprojects\\packages\\%(name)s.%(version)s\\build\\native\\%(name)s.targets', repo_root, package)} |
||||||
|
% endif |
||||||
|
% endfor |
||||||
</Target> |
</Target> |
||||||
%endif |
|
||||||
</%def>\ |
</%def>\ |
||||||
|
@ -0,0 +1,18 @@ |
|||||||
|
%YAML 1.2 |
||||||
|
--- |
||||||
|
foreach: vsprojects |
||||||
|
output_name: ${selected.vs_proj_dir}/${selected.name}/${selected.name}.vcxproj |
||||||
|
template: | |
||||||
|
<%namespace file="vcxproj_defs.include" import="gen_project"/>\ |
||||||
|
${gen_project(selected.name, vsprojects)} |
||||||
|
--- |
||||||
|
foreach: vsprojects |
||||||
|
output_name: ${selected.vs_proj_dir}/${selected.name}/${selected.name}.vcxproj.filters |
||||||
|
template: | |
||||||
|
<%namespace file="vcxproj.filters_defs.include" import="gen_filters"/>\ |
||||||
|
${gen_filters(selected.name, vsprojects)} |
||||||
|
--- |
||||||
|
output_name: grpc/packages.config |
||||||
|
template: | |
||||||
|
<%namespace file="packages.include" import="gen_packages_config"/>\ |
||||||
|
${gen_packages_config('all')} |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue