Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(544)

Side by Side Diff: build/secondary/testing/gtest/BUILD.gn

Issue 551933002: Mark gtest and gmock as testonly in GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@testonly
Patch Set: android Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/secondary/testing/gmock/BUILD.gn ('k') | components/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 config("gtest_config") { 5 config("gtest_config") {
6 visibility = [ 6 visibility = [
7 ":*", 7 ":*",
8 "//testing/gmock:*", # gmock also shares this config. 8 "//testing/gmock:*", # gmock also shares this config.
9 ] 9 ]
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 ] 52 ]
53 } 53 }
54 } 54 }
55 55
56 config("gtest_direct_config") { 56 config("gtest_direct_config") {
57 visibility = [ ":*" ] 57 visibility = [ ":*" ]
58 defines = [ "UNIT_TEST" ] 58 defines = [ "UNIT_TEST" ]
59 } 59 }
60 60
61 static_library("gtest") { 61 static_library("gtest") {
62 # TODO http://crbug.com/412064 enable this flag all the time.
63 testonly = !is_component_build
62 sources = [ 64 sources = [
63 "include/gtest/gtest-death-test.h", 65 "include/gtest/gtest-death-test.h",
64 "include/gtest/gtest-message.h", 66 "include/gtest/gtest-message.h",
65 "include/gtest/gtest-param-test.h", 67 "include/gtest/gtest-param-test.h",
66 "include/gtest/gtest-printers.h", 68 "include/gtest/gtest-printers.h",
67 "include/gtest/gtest-spi.h", 69 "include/gtest/gtest-spi.h",
68 "include/gtest/gtest-test-part.h", 70 "include/gtest/gtest-test-part.h",
69 "include/gtest/gtest-typed-test.h", 71 "include/gtest/gtest-typed-test.h",
70 "include/gtest/gtest.h", 72 "include/gtest/gtest.h",
71 "include/gtest/gtest_pred_impl.h", 73 "include/gtest/gtest_pred_impl.h",
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 include_dirs = [ "." ] 106 include_dirs = [ "." ]
105 107
106 all_dependent_configs = [ ":gtest_config" ] 108 all_dependent_configs = [ ":gtest_config" ]
107 direct_dependent_configs = [ ":gtest_direct_config" ] 109 direct_dependent_configs = [ ":gtest_direct_config" ]
108 110
109 configs -= [ "//build/config/compiler:chromium_code" ] 111 configs -= [ "//build/config/compiler:chromium_code" ]
110 configs += [ "//build/config/compiler:no_chromium_code" ] 112 configs += [ "//build/config/compiler:no_chromium_code" ]
111 } 113 }
112 114
113 source_set("gtest_main") { 115 source_set("gtest_main") {
116 # TODO http://crbug.com/412064 enable this flag all the time.
117 testonly = !is_component_build
114 sources = [ "src/gtest_main.cc" ] 118 sources = [ "src/gtest_main.cc" ]
115 deps = [ ":gtest" ] 119 deps = [ ":gtest" ]
116 } 120 }
OLDNEW
« no previous file with comments | « build/secondary/testing/gmock/BUILD.gn ('k') | components/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698