summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-01 22:03:42 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-01 22:03:42 +0000
commit72192612404a04d303ea7f0afd4f0c18642b5ff6 (patch)
treef85c8e90356b3eff7c612b274c9e4616cec28dbd /tools
parent97c98dcc4a2040d3e9b88bc6249c5864dce10ad4 (diff)
downloadchromium_src-72192612404a04d303ea7f0afd4f0c18642b5ff6.zip
chromium_src-72192612404a04d303ea7f0afd4f0c18642b5ff6.tar.gz
chromium_src-72192612404a04d303ea7f0afd4f0c18642b5ff6.tar.bz2
Revert 260949 "Move gtest/gmock BUILD.gn files to main tree."
> Move gtest/gmock BUILD.gn files to main tree. > > Also moves the "unused variable warning" to a config in the build directory so > it can be shared with outher targets without duplication on the command line. > > BUG= > R=cjhopman@chromium.org > > Review URL: https://codereview.chromium.org/219433005 TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/218493017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260954 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rw-r--r--tools/gn/secondary/testing/gmock/BUILD.gn46
-rw-r--r--tools/gn/secondary/testing/gtest/BUILD.gn84
2 files changed, 130 insertions, 0 deletions
diff --git a/tools/gn/secondary/testing/gmock/BUILD.gn b/tools/gn/secondary/testing/gmock/BUILD.gn
new file mode 100644
index 0000000..907d117
--- /dev/null
+++ b/tools/gn/secondary/testing/gmock/BUILD.gn
@@ -0,0 +1,46 @@
+# Copyright (c) 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+config("gmock_config") {
+ # Gmock headers need to be able to find themselves.
+ include_dirs = [ "include" ]
+}
+
+static_library("gmock") {
+ sources = [
+ # Sources based on files in r173 of gmock.
+ "include/gmock/gmock-actions.h",
+ "include/gmock/gmock-cardinalities.h",
+ "include/gmock/gmock-generated-actions.h",
+ "include/gmock/gmock-generated-function-mockers.h",
+ "include/gmock/gmock-generated-matchers.h",
+ "include/gmock/gmock-generated-nice-strict.h",
+ "include/gmock/gmock-matchers.h",
+ "include/gmock/gmock-spec-builders.h",
+ "include/gmock/gmock.h",
+ "include/gmock/internal/gmock-generated-internal-utils.h",
+ "include/gmock/internal/gmock-internal-utils.h",
+ "include/gmock/internal/gmock-port.h",
+ #"src/gmock-all.cc", # Not needed by our build.
+ "src/gmock-cardinalities.cc",
+ "src/gmock-internal-utils.cc",
+ "src/gmock-matchers.cc",
+ "src/gmock-spec-builders.cc",
+ "src/gmock.cc",
+ "gmock_mutant.h", # gMock helpers
+ ]
+
+ # This project includes some stuff form gtest's guts.
+ include_dirs = [ "../gtest/include" ]
+
+ direct_dependent_configs = [
+ ":gmock_config",
+ "//testing/gtest:gtest_config",
+ ]
+}
+
+static_library("gmock_main") {
+ sources = [ "src/gmock_main.cc" ]
+ deps = [ ":gmock" ]
+}
diff --git a/tools/gn/secondary/testing/gtest/BUILD.gn b/tools/gn/secondary/testing/gtest/BUILD.gn
new file mode 100644
index 0000000..b77d178
--- /dev/null
+++ b/tools/gn/secondary/testing/gtest/BUILD.gn
@@ -0,0 +1,84 @@
+# Copyright (c) 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+config("gtest_config") {
+ defines = [
+ "UNIT_TEST",
+
+ # In order to allow regex matches in gtest to be shared between Windows
+ # and other systems, we tell gtest to always use it's internal engine.
+ "GTEST_HAS_POSIX_RE=0",
+ ]
+
+ # Gtest headers need to be able to find themselves.
+ include_dirs = [ "include" ]
+
+ if (is_win) {
+ cflags = [ "/wd4800" ] # Unused variable warning.
+ }
+
+ if (is_posix) {
+ defines += [
+ # gtest isn't able to figure out when RTTI is disabled for gcc
+ # versions older than 4.3.2, and assumes it's enabled. Our Mac
+ # and Linux builds disable RTTI, and cannot guarantee that the
+ # compiler will be 4.3.2. or newer. The Mac, for example, uses
+ # 4.2.1 as that is the latest available on that platform. gtest
+ # must be instructed that RTTI is disabled here, and for any
+ # direct dependents that might include gtest headers.
+ "GTEST_HAS_RTTI=0",
+ ]
+ }
+}
+
+static_library("gtest") {
+ sources = [
+ "include/gtest/gtest-death-test.h",
+ "include/gtest/gtest-message.h",
+ "include/gtest/gtest-param-test.h",
+ "include/gtest/gtest-printers.h",
+ "include/gtest/gtest-spi.h",
+ "include/gtest/gtest-test-part.h",
+ "include/gtest/gtest-typed-test.h",
+ "include/gtest/gtest.h",
+ "include/gtest/gtest_pred_impl.h",
+ "include/gtest/internal/gtest-death-test-internal.h",
+ "include/gtest/internal/gtest-filepath.h",
+ "include/gtest/internal/gtest-internal.h",
+ "include/gtest/internal/gtest-linked_ptr.h",
+ "include/gtest/internal/gtest-param-util-generated.h",
+ "include/gtest/internal/gtest-param-util.h",
+ "include/gtest/internal/gtest-port.h",
+ "include/gtest/internal/gtest-string.h",
+ "include/gtest/internal/gtest-tuple.h",
+ "include/gtest/internal/gtest-type-util.h",
+ #"gtest/src/gtest-all.cc", # Not needed by our build.
+ "src/gtest-death-test.cc",
+ "src/gtest-filepath.cc",
+ "src/gtest-internal-inl.h",
+ "src/gtest-port.cc",
+ "src/gtest-printers.cc",
+ "src/gtest-test-part.cc",
+ "src/gtest-typed-test.cc",
+ "src/gtest.cc",
+ "../multiprocess_func_list.cc",
+ "../multiprocess_func_list.h",
+ "../platform_test.h",
+ ]
+
+ if (is_mac) {
+ sources += [
+ "../gtest_mac.h",
+ "../gtest_mac.mm",
+ "../platform_test_mac.mm",
+ ]
+ }
+
+ include_dirs = [ "." ]
+
+ all_dependent_configs = [ ":gtest_config" ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+}