1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/webrtc/trunk/testing/gtest.gyp Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,166 @@ 1.4 +# Copyright (c) 2011 The Chromium Authors. All rights reserved. 1.5 +# Use of this source code is governed by a BSD-style license that can be 1.6 +# found in the LICENSE file. 1.7 + 1.8 +{ 1.9 + 'targets': [ 1.10 + { 1.11 + 'target_name': 'gtest', 1.12 + 'type': 'static_library', 1.13 + 'sources': [ 1.14 + 'gtest/include/gtest/gtest-death-test.h', 1.15 + 'gtest/include/gtest/gtest-message.h', 1.16 + 'gtest/include/gtest/gtest-param-test.h', 1.17 + 'gtest/include/gtest/gtest-printers.h', 1.18 + 'gtest/include/gtest/gtest-spi.h', 1.19 + 'gtest/include/gtest/gtest-test-part.h', 1.20 + 'gtest/include/gtest/gtest-typed-test.h', 1.21 + 'gtest/include/gtest/gtest.h', 1.22 + 'gtest/include/gtest/gtest_pred_impl.h', 1.23 + 'gtest/include/gtest/internal/gtest-death-test-internal.h', 1.24 + 'gtest/include/gtest/internal/gtest-filepath.h', 1.25 + 'gtest/include/gtest/internal/gtest-internal.h', 1.26 + 'gtest/include/gtest/internal/gtest-linked_ptr.h', 1.27 + 'gtest/include/gtest/internal/gtest-param-util-generated.h', 1.28 + 'gtest/include/gtest/internal/gtest-param-util.h', 1.29 + 'gtest/include/gtest/internal/gtest-port.h', 1.30 + 'gtest/include/gtest/internal/gtest-string.h', 1.31 + 'gtest/include/gtest/internal/gtest-tuple.h', 1.32 + 'gtest/include/gtest/internal/gtest-type-util.h', 1.33 + 'gtest/src/gtest-all.cc', 1.34 + 'gtest/src/gtest-death-test.cc', 1.35 + 'gtest/src/gtest-filepath.cc', 1.36 + 'gtest/src/gtest-internal-inl.h', 1.37 + 'gtest/src/gtest-port.cc', 1.38 + 'gtest/src/gtest-printers.cc', 1.39 + 'gtest/src/gtest-test-part.cc', 1.40 + 'gtest/src/gtest-typed-test.cc', 1.41 + 'gtest/src/gtest.cc', 1.42 + 'multiprocess_func_list.cc', 1.43 + 'multiprocess_func_list.h', 1.44 + 'platform_test.h', 1.45 + ], 1.46 + 'sources!': [ 1.47 + 'gtest/src/gtest-all.cc', # Not needed by our build. 1.48 + ], 1.49 + 'include_dirs': [ 1.50 + 'gtest', 1.51 + 'gtest/include', 1.52 + ], 1.53 + 'dependencies': [ 1.54 + 'gtest_prod', 1.55 + ], 1.56 + 'conditions': [ 1.57 + ['OS == "mac"', { 1.58 + 'sources': [ 1.59 + 'gtest_mac.h', 1.60 + 'gtest_mac.mm', 1.61 + 'platform_test_mac.mm' 1.62 + ], 1.63 + 'link_settings': { 1.64 + 'libraries': [ 1.65 + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', 1.66 + ], 1.67 + }, 1.68 + 'conditions': [ 1.69 + ['build_with_mozilla==1', { 1.70 + 'defines': [ 1.71 + 'GTEST_USE_OWN_TR1_TUPLE=1', 1.72 + ], 1.73 + 'direct_dependent_settings': { 1.74 + 'defines': [ 1.75 + 'GTEST_USE_OWN_TR1_TUPLE=1', 1.76 + ], 1.77 + }, 1.78 + }], 1.79 + ], 1.80 + }], 1.81 + ['OS == "win"', { 1.82 + 'defines': [ 1.83 + '_VARIADIC_MAX=10', 1.84 + ], 1.85 + 'direct_dependent_settings': { 1.86 + 'defines': [ 1.87 + '_VARIADIC_MAX=10', 1.88 + ], 1.89 + }, 1.90 + }], 1.91 + ['os_posix == 1', { 1.92 + 'defines': [ 1.93 + # gtest isn't able to figure out when RTTI is disabled for gcc 1.94 + # versions older than 4.3.2, and assumes it's enabled. Our Mac 1.95 + # and Linux builds disable RTTI, and cannot guarantee that the 1.96 + # compiler will be 4.3.2. or newer. The Mac, for example, uses 1.97 + # 4.2.1 as that is the latest available on that platform. gtest 1.98 + # must be instructed that RTTI is disabled here, and for any 1.99 + # direct dependents that might include gtest headers. 1.100 + 'GTEST_HAS_RTTI=0', 1.101 + ], 1.102 + 'direct_dependent_settings': { 1.103 + 'defines': [ 1.104 + 'GTEST_HAS_RTTI=0', 1.105 + ], 1.106 + }, 1.107 + }], 1.108 + ['clang==1 or OS=="android"', { 1.109 + # We want gtest features that use tr1::tuple, but we currently 1.110 + # don't support the variadic templates used by libstdc++'s 1.111 + # implementation. gtest supports this scenario by providing its 1.112 + # own implementation but we must opt in to it. 1.113 + 'defines': [ 1.114 + 'GTEST_USE_OWN_TR1_TUPLE=1', 1.115 + ], 1.116 + 'direct_dependent_settings': { 1.117 + 'defines': [ 1.118 + 'GTEST_USE_OWN_TR1_TUPLE=1', 1.119 + ], 1.120 + }, 1.121 + }], 1.122 + ], 1.123 + 'direct_dependent_settings': { 1.124 + 'defines': [ 1.125 + 'UNIT_TEST', 1.126 + ], 1.127 + 'include_dirs': [ 1.128 + 'gtest/include', # So that gtest headers can find themselves. 1.129 + ], 1.130 + 'target_conditions': [ 1.131 + ['_type=="executable"', { 1.132 + 'test': 1, 1.133 + 'conditions': [ 1.134 + ['OS=="mac"', { 1.135 + 'run_as': { 1.136 + 'action????': ['${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}'], 1.137 + }, 1.138 + }], 1.139 + ['OS=="win"', { 1.140 + 'run_as': { 1.141 + 'action????': ['$(TargetPath)', '--gtest_print_time'], 1.142 + }, 1.143 + }], 1.144 + ], 1.145 + }], 1.146 + ], 1.147 + 'msvs_disabled_warnings': [4800], 1.148 + }, 1.149 + }, 1.150 + { 1.151 + 'target_name': 'gtest_main', 1.152 + 'type': 'static_library', 1.153 + 'dependencies': [ 1.154 + 'gtest', 1.155 + ], 1.156 + 'sources': [ 1.157 + 'gtest/src/gtest_main.cc', 1.158 + ], 1.159 + }, 1.160 + { 1.161 + 'target_name': 'gtest_prod', 1.162 + 'toolsets': ['host', 'target'], 1.163 + 'type': 'none', 1.164 + 'sources': [ 1.165 + 'gtest/include/gtest/gtest_prod.h', 1.166 + ], 1.167 + }, 1.168 + ], 1.169 +}