Skip to content

Commit

Permalink
Merge pull request grpc#6758 from ctiller/c++-is-people-too
Browse files Browse the repository at this point in the history
Automatically capture transitive dependencies for Visual Studio solution files
  • Loading branch information
jtattermusch committed Jun 7, 2016
2 parents fa430fd + fe1f4ae commit be59629
Show file tree
Hide file tree
Showing 7 changed files with 1,623 additions and 1,678 deletions.
8 changes: 7 additions & 1 deletion templates/vsprojects/buildtests_c.sln.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
--- |
<%namespace file="sln_defs.include" import="gen_solution"/>\
<%
solution_projects = [p for p in vsprojects if p.build not in ['protoc', 'fuzzer'] and p.language == 'c' and not p.boringssl and not p.zlib]
solution_projects = [
p for p in vsprojects
if p.build in ['test', 'tool']
and p.language == 'c'
and not p.boringssl
and not p.zlib
]
%>\
${gen_solution(solution_projects, use_dlls='yes')}
2 changes: 1 addition & 1 deletion templates/vsprojects/grpc_csharp_ext.sln.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
--- |
<%namespace file="sln_defs.include" import="gen_solution"/>\
<%
solution_projects = [p for p in vsprojects if p.build == 'all' and p.language in ['c', 'csharp']]
solution_projects = [p for p in vsprojects if p.build == 'all' and p.language == 'csharp']
%>\
${gen_solution(solution_projects, use_dlls='only')}
10 changes: 9 additions & 1 deletion templates/vsprojects/sln_defs.include
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%def name="gen_solution(solution_projects, use_dlls = 'no')">\
<%def name="gen_solution(solution_top_level_projects, use_dlls = 'no')">\
## 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
Expand All @@ -12,6 +12,14 @@ 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}"

all_projects = set()
for project in solution_top_level_projects:
for dep in project.deps:
all_projects.add(dep)
all_projects.add(project.name)

solution_projects = [vsproject_dict[project] for project in sorted(list(all_projects))]
%>\
% for project in solution_projects:
Project("${cpp_proj_type}") = "${project.name}", "vcxproj\${project.vs_proj_dir}\${project.name}\${project.name}.vcxproj", "${project.vs_project_guid}"
Expand Down
2,857 changes: 1,402 additions & 1,455 deletions vsprojects/buildtests_c.sln

Large diffs are not rendered by default.

382 changes: 191 additions & 191 deletions vsprojects/grpc.sln

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions vsprojects/grpc_csharp_ext.sln
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc", "vcxproj\.\grpc\grpc
{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_unsecure", "vcxproj\.\grpc_unsecure\grpc_unsecure.vcxproj", "{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}"
ProjectSection(myProperties) = preProject
lib = "True"
EndProjectSection
ProjectSection(ProjectDependencies) = postProject
{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_csharp_ext", "vcxproj\.\grpc_csharp_ext\grpc_csharp_ext.vcxproj", "{D64C6D63-4458-4A88-AB38-35678384A7E4}"
ProjectSection(myProperties) = preProject
lib = "True"
Expand Down Expand Up @@ -57,14 +49,6 @@ Global
{29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|Win32.Build.0 = Release-DLL|Win32
{29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|x64.ActiveCfg = Release-DLL|x64
{29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|x64.Build.0 = Release-DLL|x64
{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug|Win32.ActiveCfg = Debug-DLL|Win32
{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug|Win32.Build.0 = Debug-DLL|Win32
{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug|x64.ActiveCfg = Debug-DLL|x64
{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug|x64.Build.0 = Debug-DLL|x64
{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release|Win32.ActiveCfg = Release-DLL|Win32
{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release|Win32.Build.0 = Release-DLL|Win32
{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release|x64.ActiveCfg = Release-DLL|x64
{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release|x64.Build.0 = Release-DLL|x64
{D64C6D63-4458-4A88-AB38-35678384A7E4}.Debug|Win32.ActiveCfg = Debug|Win32
{D64C6D63-4458-4A88-AB38-35678384A7E4}.Debug|Win32.Build.0 = Debug|Win32
{D64C6D63-4458-4A88-AB38-35678384A7E4}.Debug|x64.ActiveCfg = Debug|x64
Expand Down
26 changes: 13 additions & 13 deletions vsprojects/grpc_protoc_plugins.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_plugin_support", "vcxproj\.\grpc_plugin_support\grpc_plugin_support.vcxproj", "{B6E81D84-2ACB-41B8-8781-493A944C7817}"
ProjectSection(myProperties) = preProject
lib = "True"
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_cpp_plugin", "vcxproj\.\grpc_cpp_plugin\grpc_cpp_plugin.vcxproj", "{7E51A25F-AC59-488F-906C-C60FAAE706AA}"
ProjectSection(myProperties) = preProject
lib = "False"
Expand Down Expand Up @@ -40,6 +35,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_objective_c_plugin", "
{B6E81D84-2ACB-41B8-8781-493A944C7817} = {B6E81D84-2ACB-41B8-8781-493A944C7817}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_plugin_support", "vcxproj\.\grpc_plugin_support\grpc_plugin_support.vcxproj", "{B6E81D84-2ACB-41B8-8781-493A944C7817}"
ProjectSection(myProperties) = preProject
lib = "True"
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_python_plugin", "vcxproj\.\grpc_python_plugin\grpc_python_plugin.vcxproj", "{DF52D501-A6CF-4E6F-BA38-6EBE2E8DAFB2}"
ProjectSection(myProperties) = preProject
lib = "False"
Expand All @@ -64,14 +64,6 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B6E81D84-2ACB-41B8-8781-493A944C7817}.Debug|Win32.ActiveCfg = Debug|Win32
{B6E81D84-2ACB-41B8-8781-493A944C7817}.Debug|x64.ActiveCfg = Debug|x64
{B6E81D84-2ACB-41B8-8781-493A944C7817}.Release|Win32.ActiveCfg = Release|Win32
{B6E81D84-2ACB-41B8-8781-493A944C7817}.Release|x64.ActiveCfg = Release|x64
{B6E81D84-2ACB-41B8-8781-493A944C7817}.Debug|Win32.Build.0 = Debug|Win32
{B6E81D84-2ACB-41B8-8781-493A944C7817}.Debug|x64.Build.0 = Debug|x64
{B6E81D84-2ACB-41B8-8781-493A944C7817}.Release|Win32.Build.0 = Release|Win32
{B6E81D84-2ACB-41B8-8781-493A944C7817}.Release|x64.Build.0 = Release|x64
{7E51A25F-AC59-488F-906C-C60FAAE706AA}.Debug|Win32.ActiveCfg = Debug|Win32
{7E51A25F-AC59-488F-906C-C60FAAE706AA}.Debug|x64.ActiveCfg = Debug|x64
{7E51A25F-AC59-488F-906C-C60FAAE706AA}.Release|Win32.ActiveCfg = Release|Win32
Expand Down Expand Up @@ -104,6 +96,14 @@ Global
{19564640-CEE6-4921-ABA5-676ED79A36F6}.Debug|x64.Build.0 = Debug|x64
{19564640-CEE6-4921-ABA5-676ED79A36F6}.Release|Win32.Build.0 = Release|Win32
{19564640-CEE6-4921-ABA5-676ED79A36F6}.Release|x64.Build.0 = Release|x64
{B6E81D84-2ACB-41B8-8781-493A944C7817}.Debug|Win32.ActiveCfg = Debug|Win32
{B6E81D84-2ACB-41B8-8781-493A944C7817}.Debug|x64.ActiveCfg = Debug|x64
{B6E81D84-2ACB-41B8-8781-493A944C7817}.Release|Win32.ActiveCfg = Release|Win32
{B6E81D84-2ACB-41B8-8781-493A944C7817}.Release|x64.ActiveCfg = Release|x64
{B6E81D84-2ACB-41B8-8781-493A944C7817}.Debug|Win32.Build.0 = Debug|Win32
{B6E81D84-2ACB-41B8-8781-493A944C7817}.Debug|x64.Build.0 = Debug|x64
{B6E81D84-2ACB-41B8-8781-493A944C7817}.Release|Win32.Build.0 = Release|Win32
{B6E81D84-2ACB-41B8-8781-493A944C7817}.Release|x64.Build.0 = Release|x64
{DF52D501-A6CF-4E6F-BA38-6EBE2E8DAFB2}.Debug|Win32.ActiveCfg = Debug|Win32
{DF52D501-A6CF-4E6F-BA38-6EBE2E8DAFB2}.Debug|x64.ActiveCfg = Debug|x64
{DF52D501-A6CF-4E6F-BA38-6EBE2E8DAFB2}.Release|Win32.ActiveCfg = Release|Win32
Expand Down

0 comments on commit be59629

Please sign in to comment.