summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-06 19:13:06 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-06 19:13:06 +0000
commit4b0f9635f09dd8db54d6e4e699c7bc20c4aaebee (patch)
treea695250495947ef597c3bae0e33a9aa26f89cf7b
parentfb5e7d01b21d5fdc1aacc6d96240a1ae22b3374d (diff)
downloadchromium_src-4b0f9635f09dd8db54d6e4e699c7bc20c4aaebee.zip
chromium_src-4b0f9635f09dd8db54d6e4e699c7bc20c4aaebee.tar.gz
chromium_src-4b0f9635f09dd8db54d6e4e699c7bc20c4aaebee.tar.bz2
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
-rw-r--r--build/temp_gyp/googleurl.gyp1
-rw-r--r--chrome/chrome.sln12
-rw-r--r--printing/printing.gyp1
-rw-r--r--testing/gtest.gyp13
4 files changed, 26 insertions, 1 deletions
diff --git a/build/temp_gyp/googleurl.gyp b/build/temp_gyp/googleurl.gyp
index b518e4c..db4043a 100644
--- a/build/temp_gyp/googleurl.gyp
+++ b/build/temp_gyp/googleurl.gyp
@@ -62,6 +62,7 @@
'dependencies': [
'googleurl',
'../../testing/gtest.gyp:gtest',
+ '../../testing/gtest.gyp:gtestmain',
'../../third_party/icu38/icu38.gyp:icuuc',
],
'sources': [
diff --git a/chrome/chrome.sln b/chrome/chrome.sln
index 9682814..85475a0 100644
--- a/chrome/chrome.sln
+++ b/chrome/chrome.sln
@@ -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}
diff --git a/printing/printing.gyp b/printing/printing.gyp
index 51768fd..1980417 100644
--- a/printing/printing.gyp
+++ b/printing/printing.gyp
@@ -46,6 +46,7 @@
'dependencies': [
'printing',
'../testing/gtest.gyp:gtest',
+ '../testing/gtest.gyp:gtestmain',
],
'sources': [
'units_unittest.cc',
diff --git a/testing/gtest.gyp b/testing/gtest.gyp
index 078ca3c..c7d5c62 100644
--- a/testing/gtest.gyp
+++ b/testing/gtest.gyp
@@ -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',
+ ],
+ },
],
}