0

gtest shouldn't link in gtest_main.cc, as that provides its own main().

Split gtest into two libraries, where the latter provides main().
This is consistent with the way gtest works within Google and with its
automake files.

Fix binaries that require gtest's main() to depend on gtest.gyp:main.

Review URL: http://codereview.chromium.org/99132

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15440 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
evan@chromium.org
2009-05-06 19:13:06 +00:00
parent fb5e7d01b2
commit 4b0f9635f0
4 changed files with 26 additions and 1 deletions
build/temp_gyp
chrome
printing
testing

@ -62,6 +62,7 @@
'dependencies': [
'googleurl',
'../../testing/gtest.gyp:gtest',
'../../testing/gtest.gyp:gtestmain',
'../../third_party/icu38/icu38.gyp:icuuc',
],
'sources': [

@ -1372,6 +1372,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "printing_unittests", "..\pr
ProjectSection(ProjectDependencies) = postProject
{1832A374-8A74-4F9E-B536-69A699B3E165} = {1832A374-8A74-4F9E-B536-69A699B3E165}
{9E5416B9-B91B-4029-93F4-102C1AD5CAF4} = {9E5416B9-B91B-4029-93F4-102C1AD5CAF4}
{A1CE1DC3-3800-E6A1-F8ED-CC5D3B9D8B6F} = {A1CE1DC3-3800-E6A1-F8ED-CC5D3B9D8B6F}
{BFE8E2A7-3B3B-43B0-A994-3058B852DB8B} = {BFE8E2A7-3B3B-43B0-A994-3058B852DB8B}
EndProjectSection
EndProject
@ -1547,6 +1548,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "courgette_minimal_tool", ".
{F22022F0-2D3B-5610-4E80-C674A8E01C5A} = {F22022F0-2D3B-5610-4E80-C674A8E01C5A}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtestmain", "..\testing\gtestmain.vcproj", "{A1CE1DC3-3800-E6A1-F8ED-CC5D3B9D8B6F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Mixed Platforms = Debug|Mixed Platforms
@ -2339,6 +2342,14 @@ Global
{A1CAA831-C507-4B2E-87F3-AEC63C9907F9}.Release|Mixed Platforms.Build.0 = Release|Win32
{A1CAA831-C507-4B2E-87F3-AEC63C9907F9}.Release|Win32.ActiveCfg = Release|Win32
{A1CAA831-C507-4B2E-87F3-AEC63C9907F9}.Release|Win32.Build.0 = Release|Win32
{A1CE1DC3-3800-E6A1-F8ED-CC5D3B9D8B6F}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{A1CE1DC3-3800-E6A1-F8ED-CC5D3B9D8B6F}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{A1CE1DC3-3800-E6A1-F8ED-CC5D3B9D8B6F}.Debug|Win32.ActiveCfg = Debug|Win32
{A1CE1DC3-3800-E6A1-F8ED-CC5D3B9D8B6F}.Debug|Win32.Build.0 = Debug|Win32
{A1CE1DC3-3800-E6A1-F8ED-CC5D3B9D8B6F}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{A1CE1DC3-3800-E6A1-F8ED-CC5D3B9D8B6F}.Release|Mixed Platforms.Build.0 = Release|Win32
{A1CE1DC3-3800-E6A1-F8ED-CC5D3B9D8B6F}.Release|Win32.ActiveCfg = Release|Win32
{A1CE1DC3-3800-E6A1-F8ED-CC5D3B9D8B6F}.Release|Win32.Build.0 = Release|Win32
{A28310B8-7BD0-4CDF-A7D8-59CAB42AA1C4}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{A28310B8-7BD0-4CDF-A7D8-59CAB42AA1C4}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{A28310B8-7BD0-4CDF-A7D8-59CAB42AA1C4}.Debug|Win32.ActiveCfg = Debug|Win32
@ -3046,6 +3057,7 @@ Global
{9F53807E-9382-47BD-8371-E5D04F517E9C} = {2325D8C4-8EF5-42AC-8900-492225750DE4}
{A0D94973-D355-47A5-A1E2-3456F321F010} = {1AFC1EC3-24FA-4260-B099-76319EC9977A}
{A1CAA831-C507-4B2E-87F3-AEC63C9907F9} = {1174D37F-6ABB-45DA-81B3-C631281273B7}
{A1CE1DC3-3800-E6A1-F8ED-CC5D3B9D8B6F} = {1174D37F-6ABB-45DA-81B3-C631281273B7}
{A28310B8-7BD0-4CDF-A7D8-59CAB42AA1C4} = {2325D8C4-8EF5-42AC-8900-492225750DE4}
{A34770EA-A574-43E8-9327-F79C04770E98} = {1174D37F-6ABB-45DA-81B3-C631281273B7}
{A464166F-8507-49B4-9B02-5CB77C498B25} = {2325D8C4-8EF5-42AC-8900-492225750DE4}

@ -46,6 +46,7 @@
'dependencies': [
'printing',
'../testing/gtest.gyp:gtest',
'../testing/gtest.gyp:gtestmain',
],
'sources': [
'units_unittest.cc',

@ -40,7 +40,6 @@
'gtest/src/gtest-internal-inl.h',
'gtest/src/gtest-port.cc',
'gtest/src/gtest.cc',
'gtest/src/gtest_main.cc',
'multiprocess_func_list.cc',
'multiprocess_func_list.h',
'platform_test.h',
@ -65,5 +64,17 @@
],
},
},
{
# Note that calling this "gtest_main" confuses the scons build,
# which uses "_main" on scons files to produce special behavior.
'target_name': 'gtestmain',
'type': '<(library)',
'dependencies': [
'gtest',
],
'sources': [
'gtest/src/gtest_main.cc',
],
},
],
}