| # Copyright 2014 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. |
| |
| # Modifications Copyright 2017 Google Inc. All Rights Reserved. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| config("gtest_direct_config") { |
| include_dirs = [ "include" ] |
| |
| defines = [ |
| "UNIT_TEST", |
| "GTEST_HAS_POSIX_RE=0", |
| ] |
| if (target_cpu != "ps4" && target_os != "win") { |
| defines += [ "GTEST_USE_OWN_TR1_TUPLE=1" ] |
| } |
| } |
| |
| static_library("gtest") { |
| testonly = true |
| sources = [ |
| "../multiprocess_func_list.cc", |
| "../multiprocess_func_list.h", |
| "../platform_test.h", |
| "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", |
| "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", |
| ] |
| |
| include_dirs = [ "." ] |
| |
| public_configs = [ ":gtest_direct_config" ] |
| |
| # Ideally we would want to remove |
| # //starboard/build/config:default_rtti from the list of configs too. |
| # Unfortunately GN doesn't provide us a way to remove things from |
| # dependents' configs list. |
| # It happens to be that all_dependent_configs get processed after default |
| # configs, so the -frtti flag comes after the -fno-rtti flag on the command |
| # line, so it happens to work in this case. |
| all_dependent_configs = [ "//build/config/compiler:rtti" ] |
| |
| public_deps = [ "//starboard" ] |
| } |