summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-28 18:36:12 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-28 18:36:12 +0000
commit5db956d0bb95a2c94fb23625bc50f3085fc4087d (patch)
treefc98cf6e3bff2ae08c5619cef28dde6c2eb54cba
parentefea504e6ebfcfc684b93dca41232fbf7bd797c9 (diff)
downloadchromium_src-5db956d0bb95a2c94fb23625bc50f3085fc4087d.zip
chromium_src-5db956d0bb95a2c94fb23625bc50f3085fc4087d.tar.gz
chromium_src-5db956d0bb95a2c94fb23625bc50f3085fc4087d.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@14755 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/temp_gyp/googleurl.gyp1
-rw-r--r--printing/printing.gyp1
-rw-r--r--testing/gtest.gyp13
3 files changed, 14 insertions, 1 deletions
diff --git a/build/temp_gyp/googleurl.gyp b/build/temp_gyp/googleurl.gyp
index b518e4c..d5d0ea7 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:main',
'../../third_party/icu38/icu38.gyp:icuuc',
],
'sources': [
diff --git a/printing/printing.gyp b/printing/printing.gyp
index 51768fd..baa6341 100644
--- a/printing/printing.gyp
+++ b/printing/printing.gyp
@@ -46,6 +46,7 @@
'dependencies': [
'printing',
'../testing/gtest.gyp:gtest',
+ '../testing/gtest.gyp:main',
],
'sources': [
'units_unittest.cc',
diff --git a/testing/gtest.gyp b/testing/gtest.gyp
index 078ca3c..88866a6 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 files to produce special behavior.
+ 'target_name': 'main',
+ 'type': '<(library)',
+ 'dependencies': [
+ 'gtest',
+ ],
+ 'sources': [
+ 'gtest/src/gtest_main.cc',
+ ],
+ },
],
}