diff options
author | vjpai <vpai@google.com> | 2015-06-01 09:41:09 -0700 |
---|---|---|
committer | vjpai <vpai@google.com> | 2015-06-01 09:41:09 -0700 |
commit | 1795985322eb8b4e689c5e175d9d6937839f817c (patch) | |
tree | d3ce282d12ea0920ca94a9da9509ec6704f4dfa4 /templates | |
parent | 675140ca1d394f564f2156add8a1a18a2dc132b7 (diff) | |
parent | 7f61193cdeacfb21f4e99ac6b8e2c0da33a643e8 (diff) |
Merge branch 'master' into poisson
Diffstat (limited to 'templates')
15 files changed, 95 insertions, 51 deletions
diff --git a/templates/tools/doxygen/Doxyfile.c++.internal.template b/templates/tools/doxygen/Doxyfile.c++.internal.template new file mode 100644 index 0000000000..abaf52440a --- /dev/null +++ b/templates/tools/doxygen/Doxyfile.c++.internal.template @@ -0,0 +1,2 @@ +<%namespace file="Doxyfile.include" import="gen_doxyfile"/>\ +${gen_doxyfile(['grpc++'], 'C++', libs, True)} diff --git a/templates/tools/doxygen/Doxyfile.c++.template b/templates/tools/doxygen/Doxyfile.c++.template index fca30632a3..6cedfa5fe5 100644 --- a/templates/tools/doxygen/Doxyfile.c++.template +++ b/templates/tools/doxygen/Doxyfile.c++.template @@ -1,2 +1,2 @@ <%namespace file="Doxyfile.include" import="gen_doxyfile"/>\ -${gen_doxyfile(['grpc++'], 'C++', libs)} +${gen_doxyfile(['grpc++'], 'C++', libs, False)} diff --git a/templates/tools/doxygen/Doxyfile.core.internal.template b/templates/tools/doxygen/Doxyfile.core.internal.template new file mode 100644 index 0000000000..8d7963aa85 --- /dev/null +++ b/templates/tools/doxygen/Doxyfile.core.internal.template @@ -0,0 +1,2 @@ +<%namespace file="Doxyfile.include" import="gen_doxyfile"/>\ +${gen_doxyfile(['grpc', 'gpr'], 'Core', libs, True)} diff --git a/templates/tools/doxygen/Doxyfile.core.template b/templates/tools/doxygen/Doxyfile.core.template index 205f892287..69b189fdfd 100644 --- a/templates/tools/doxygen/Doxyfile.core.template +++ b/templates/tools/doxygen/Doxyfile.core.template @@ -1,2 +1,2 @@ <%namespace file="Doxyfile.include" import="gen_doxyfile"/>\ -${gen_doxyfile(['grpc', 'gpr'], 'Core', libs)} +${gen_doxyfile(['grpc', 'gpr'], 'Core', libs, False)} diff --git a/templates/tools/doxygen/Doxyfile.include b/templates/tools/doxygen/Doxyfile.include index 3c15487f4b..879495aae8 100644 --- a/templates/tools/doxygen/Doxyfile.include +++ b/templates/tools/doxygen/Doxyfile.include @@ -1,4 +1,11 @@ -<%def name="gen_doxyfile(libnames, packagename, collection)"> +## Populates "targets" for all names in the collection "libnames" that are +## part of "collection". +## +## Note that "packagename" and "internal" while not used +## in the function itself are referenced in the template. +## When "internal" is true, documentation for non-public headers +## and sources is also taken as input to Doxygen (see INPUT). +<%def name="gen_doxyfile(libnames, packagename, collection, internal)"> <% import itertools targets = [] @@ -770,7 +777,13 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = ${' '.join(itertools.chain.from_iterable(target.public_headers for target in targets))} +INPUT = ${' '.join( + itertools.chain.from_iterable( + target.public_headers + + ([] + if not internal + else target.headers + target.src) + for target in targets))} # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/templates/vsprojects/grpc.sln.template b/templates/vsprojects/grpc.sln.template index 7465852e70..70be6b4f7a 100644 --- a/templates/vsprojects/grpc.sln.template +++ b/templates/vsprojects/grpc.sln.template @@ -1,48 +1,5 @@ -## Template for Visual Studio solution -## based on http://msdn.microsoft.com/en-us/library/bb165951(v=vs.90).aspx -## NOTE: tabs in this file are needed by Visual Studio to correctly interpret -## the file. - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 -MinimumVisualStudioVersion = 10.0.40219.1 +<%namespace file="sln_defs.include" import="gen_solution"/>\ <% -## Visual Studio uses GUIDs for project types -## http://msdn.microsoft.com/en-us/library/hb23x61k%28v=vs.80%29.aspx -cpp_proj_type = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}" +solution_projects = [p for p in vsprojects if p.build != 'protoc'] %>\ -% for project in vsprojects: -Project("${cpp_proj_type}") = "${project.name}", "${project.name}\${project.name}.vcxproj", "${project.vs_project_guid}" - % if project.get('deps', None): - ProjectSection(ProjectDependencies) = postProject - % for dep in project.get('deps', []): - ${vsproject_dict[dep].vs_project_guid} = ${vsproject_dict[dep].vs_project_guid} - % endfor - EndProjectSection - % endif -EndProject -% endfor -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution -% for project in vsprojects: - ${project.vs_project_guid}.Debug|Win32.ActiveCfg = Debug|Win32 - ${project.vs_project_guid}.Debug|Win32.Build.0 = Debug|Win32 - ${project.vs_project_guid}.Debug|x64.ActiveCfg = Debug|x64 - ${project.vs_project_guid}.Debug|x64.Build.0 = Debug|x64 - ${project.vs_project_guid}.Release|Win32.ActiveCfg = Release|Win32 - ${project.vs_project_guid}.Release|Win32.Build.0 = Release|Win32 - ${project.vs_project_guid}.Release|x64.ActiveCfg = Release|x64 - ${project.vs_project_guid}.Release|x64.Build.0 = Release|x64 -% endfor - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +${gen_solution(solution_projects)}
\ No newline at end of file diff --git a/templates/vsprojects/grpc_cpp_plugin/grpc_cpp_plugin.vcxproj.template b/templates/vsprojects/grpc_cpp_plugin/grpc_cpp_plugin.vcxproj.template new file mode 100644 index 0000000000..49ab1b7385 --- /dev/null +++ b/templates/vsprojects/grpc_cpp_plugin/grpc_cpp_plugin.vcxproj.template @@ -0,0 +1,2 @@ +<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ +${gen_project('grpc_cpp_plugin', targets, configuration_type='Application')} diff --git a/templates/vsprojects/grpc_csharp_plugin/grpc_csharp_plugin.vcxproj.template b/templates/vsprojects/grpc_csharp_plugin/grpc_csharp_plugin.vcxproj.template new file mode 100644 index 0000000000..9d94e27c3a --- /dev/null +++ b/templates/vsprojects/grpc_csharp_plugin/grpc_csharp_plugin.vcxproj.template @@ -0,0 +1,2 @@ +<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ +${gen_project('grpc_csharp_plugin', targets, configuration_type='Application')} diff --git a/templates/vsprojects/grpc_objective_c_plugin/grpc_objective_c_plugin.vcxproj.template b/templates/vsprojects/grpc_objective_c_plugin/grpc_objective_c_plugin.vcxproj.template new file mode 100644 index 0000000000..794c7310c5 --- /dev/null +++ b/templates/vsprojects/grpc_objective_c_plugin/grpc_objective_c_plugin.vcxproj.template @@ -0,0 +1,2 @@ +<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ +${gen_project('grpc_objective_c_plugin', targets, configuration_type='Application')} diff --git a/templates/vsprojects/grpc_plugin_support/grpc_plugin_support.vcxproj.template b/templates/vsprojects/grpc_plugin_support/grpc_plugin_support.vcxproj.template new file mode 100644 index 0000000000..409e88f289 --- /dev/null +++ b/templates/vsprojects/grpc_plugin_support/grpc_plugin_support.vcxproj.template @@ -0,0 +1,2 @@ +<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ +${gen_project('grpc_plugin_support', libs)} diff --git a/templates/vsprojects/grpc_protoc_plugins.sln.template b/templates/vsprojects/grpc_protoc_plugins.sln.template new file mode 100644 index 0000000000..1c171f4f94 --- /dev/null +++ b/templates/vsprojects/grpc_protoc_plugins.sln.template @@ -0,0 +1,5 @@ +<%namespace file="sln_defs.include" import="gen_solution"/>\ +<% +solution_projects = [p for p in vsprojects if p.build == 'protoc'] +%>\ +${gen_solution(solution_projects)}
\ No newline at end of file diff --git a/templates/vsprojects/grpc_python_plugin/grpc_python_plugin.vcxproj.template b/templates/vsprojects/grpc_python_plugin/grpc_python_plugin.vcxproj.template new file mode 100644 index 0000000000..977e015d6d --- /dev/null +++ b/templates/vsprojects/grpc_python_plugin/grpc_python_plugin.vcxproj.template @@ -0,0 +1,2 @@ +<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ +${gen_project('grpc_python_plugin', targets, configuration_type='Application')} diff --git a/templates/vsprojects/grpc_ruby_plugin/grpc_ruby_plugin.vcxproj.template b/templates/vsprojects/grpc_ruby_plugin/grpc_ruby_plugin.vcxproj.template new file mode 100644 index 0000000000..ecf42ae04e --- /dev/null +++ b/templates/vsprojects/grpc_ruby_plugin/grpc_ruby_plugin.vcxproj.template @@ -0,0 +1,2 @@ +<%namespace file="../vcxproj_defs.include" import="gen_project"/>\ +${gen_project('grpc_ruby_plugin', targets, configuration_type='Application')} diff --git a/templates/vsprojects/sln_defs.include b/templates/vsprojects/sln_defs.include new file mode 100644 index 0000000000..ee05d0fbde --- /dev/null +++ b/templates/vsprojects/sln_defs.include @@ -0,0 +1,50 @@ +<%def name="gen_solution(solution_projects)">\ +## Template for Visual Studio solution +## based on http://msdn.microsoft.com/en-us/library/bb165951(v=vs.90).aspx +## NOTE: tabs in this file are needed by Visual Studio to correctly interpret +## the file. + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.21005.1 +MinimumVisualStudioVersion = 10.0.40219.1 +<% +## Visual Studio uses GUIDs for project types +## http://msdn.microsoft.com/en-us/library/hb23x61k%28v=vs.80%29.aspx +cpp_proj_type = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}" +%>\ +% for project in solution_projects: +Project("${cpp_proj_type}") = "${project.name}", "${project.name}\${project.name}.vcxproj", "${project.vs_project_guid}" + % if project.get('deps', None): + ProjectSection(ProjectDependencies) = postProject + % for dep in project.get('deps', []): + ${vsproject_dict[dep].vs_project_guid} = ${vsproject_dict[dep].vs_project_guid} + % endfor + EndProjectSection + % endif +EndProject +% endfor +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution +% for project in solution_projects: + ${project.vs_project_guid}.Debug|Win32.ActiveCfg = Debug|Win32 + ${project.vs_project_guid}.Debug|Win32.Build.0 = Debug|Win32 + ${project.vs_project_guid}.Debug|x64.ActiveCfg = Debug|x64 + ${project.vs_project_guid}.Debug|x64.Build.0 = Debug|x64 + ${project.vs_project_guid}.Release|Win32.ActiveCfg = Release|Win32 + ${project.vs_project_guid}.Release|Win32.Build.0 = Release|Win32 + ${project.vs_project_guid}.Release|x64.ActiveCfg = Release|x64 + ${project.vs_project_guid}.Release|x64.Build.0 = Release|x64 +% endfor + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal +</%def>\
\ No newline at end of file diff --git a/templates/vsprojects/vcxproj_defs.include b/templates/vsprojects/vcxproj_defs.include index 87412debda..55ec37393f 100644 --- a/templates/vsprojects/vcxproj_defs.include +++ b/templates/vsprojects/vcxproj_defs.include @@ -19,7 +19,10 @@ if not project_guid: project_guid = project.vs_project_guid if configuration_type == 'Application': - props.extend(['winsock', 'protobuf', 'zlib', 'openssl']) + if target.build == 'protoc': + props.extend(['protoc']) + else: + props.extend(['winsock', 'protobuf', 'zlib', 'openssl']) if target.language == 'c++': props.extend(['protobuf']) props.extend(['global']) |