diff options
author | brettw <brettw@chromium.org> | 2015-09-02 10:57:05 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-02 17:57:52 +0000 |
commit | 6dd952c77209619a445205998173fc40fb817be1 (patch) | |
tree | 19bfb128fb9e34c4be876041cb3e60d88a1a3d6c /build/secondary/testing | |
parent | 5698e42ca565654da35056bcf03ee42bbf87fd11 (diff) | |
download | chromium_src-6dd952c77209619a445205998173fc40fb817be1.zip chromium_src-6dd952c77209619a445205998173fc40fb817be1.tar.gz chromium_src-6dd952c77209619a445205998173fc40fb817be1.tar.bz2 |
Un-nest configs in GN files.
People sometimes nest targets or configs, usually with the assumption that this limits the visibility of a config to within a target. But this nesting provides no visibility restrictions over declaring it outside of a block.
Un-nest for clarity.
Re-land of http://crrev.com/1318823008 while preserving config ordering.
Review URL: https://codereview.chromium.org/1307223010
Cr-Commit-Position: refs/heads/master@{#346964}
Diffstat (limited to 'build/secondary/testing')
-rw-r--r-- | build/secondary/testing/gtest/BUILD.gn | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/build/secondary/testing/gtest/BUILD.gn b/build/secondary/testing/gtest/BUILD.gn index a9f5007..8e5cdcc 100644 --- a/build/secondary/testing/gtest/BUILD.gn +++ b/build/secondary/testing/gtest/BUILD.gn @@ -58,6 +58,15 @@ config("gtest_direct_config") { defines = [ "UNIT_TEST" ] } +config("gtest_warnings") { + if (is_win && is_clang) { + # The Mutex constructor initializer list in gtest-port.cc is incorrectly + # ordered. See + # https://groups.google.com/d/msg/googletestframework/S5uSV8L2TX8/U1FaTDa6J6sJ. + cflags = [ "-Wno-reorder" ] + } +} + static_library("gtest") { # TODO http://crbug.com/412064 enable this flag all the time. testonly = !is_component_build @@ -121,17 +130,12 @@ static_library("gtest") { public_configs = [ ":gtest_direct_config" ] configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - - config("gtest_warnings") { - if (is_win && is_clang) { - # The Mutex constructor initializer list in gtest-port.cc is incorrectly - # ordered. See - # https://groups.google.com/d/msg/googletestframework/S5uSV8L2TX8/U1FaTDa6J6sJ. - cflags = [ "-Wno-reorder" ] - } - } - configs += [ ":gtest_warnings" ] + configs += [ + "//build/config/compiler:no_chromium_code", + + # Must be after no_chromium_code for warning flags to be ordered correctly. + ":gtest_warnings", + ] } source_set("gtest_main") { |