1# Copyright 2018 The PDFium Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5# The file/directory layout of Google Test is not yet considered stable. Until 6# it stabilizes, Chromium code MUST use this target instead of reaching directly 7# into //third_party/googletest. 8 9import("//build_overrides/build.gni") 10 11source_set("gmock") { 12 testonly = true 13 sources = [ 14 "include/gmock/gmock-actions.h", 15 "include/gmock/gmock-generated-function-mockers.h", 16 "include/gmock/gmock-matchers.h", 17 "include/gmock/gmock.h", 18 ] 19 deps = [ "//third_party/googletest:gmock" ] 20 21 # TODO(crbug.com/806952): Depending on gmock_mutant only if build_with_chromium, 22 # because gmock_mutant depends on //base which uses C++14. Since gmock is a 23 # third_party library used by other projects it should not include C++14 only code. 24 if (build_with_chromium) { 25 # Allow Chromium targets depending on gmock to #include testing/gmock_mutant.h 26 # without triggering a `gn check` error. 27 public_deps = [ "//testing:gmock_mutant" ] 28 } 29 30 public_configs = [ 31 "//third_party/googletest:gmock_config", 32 "//third_party/googletest:gtest_config", 33 ] 34} 35 36# The file/directory layout of Google Test is not yet considered stable. Until 37# it stabilizes, Chromium code MUST use this target instead of reaching directly 38# into //third_party/googletest. 39source_set("gmock_main") { 40 testonly = true 41 deps = [ "//third_party/googletest:gmock_main" ] 42} 43