media/webrtc/trunk/testing/gtest.gyp

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 # Copyright (c) 2011 The Chromium 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.
     5 {
     6   'targets': [
     7     {
     8       'target_name': 'gtest',
     9       'type': 'static_library',
    10       'sources': [
    11         'gtest/include/gtest/gtest-death-test.h',
    12         'gtest/include/gtest/gtest-message.h',
    13         'gtest/include/gtest/gtest-param-test.h',
    14         'gtest/include/gtest/gtest-printers.h',
    15         'gtest/include/gtest/gtest-spi.h',
    16         'gtest/include/gtest/gtest-test-part.h',
    17         'gtest/include/gtest/gtest-typed-test.h',
    18         'gtest/include/gtest/gtest.h',
    19         'gtest/include/gtest/gtest_pred_impl.h',
    20         'gtest/include/gtest/internal/gtest-death-test-internal.h',
    21         'gtest/include/gtest/internal/gtest-filepath.h',
    22         'gtest/include/gtest/internal/gtest-internal.h',
    23         'gtest/include/gtest/internal/gtest-linked_ptr.h',
    24         'gtest/include/gtest/internal/gtest-param-util-generated.h',
    25         'gtest/include/gtest/internal/gtest-param-util.h',
    26         'gtest/include/gtest/internal/gtest-port.h',
    27         'gtest/include/gtest/internal/gtest-string.h',
    28         'gtest/include/gtest/internal/gtest-tuple.h',
    29         'gtest/include/gtest/internal/gtest-type-util.h',
    30         'gtest/src/gtest-all.cc',
    31         'gtest/src/gtest-death-test.cc',
    32         'gtest/src/gtest-filepath.cc',
    33         'gtest/src/gtest-internal-inl.h',
    34         'gtest/src/gtest-port.cc',
    35         'gtest/src/gtest-printers.cc',
    36         'gtest/src/gtest-test-part.cc',
    37         'gtest/src/gtest-typed-test.cc',
    38         'gtest/src/gtest.cc',
    39         'multiprocess_func_list.cc',
    40         'multiprocess_func_list.h',
    41         'platform_test.h',
    42       ],
    43       'sources!': [
    44         'gtest/src/gtest-all.cc',  # Not needed by our build.
    45       ],
    46       'include_dirs': [
    47         'gtest',
    48         'gtest/include',
    49       ],
    50       'dependencies': [
    51         'gtest_prod',
    52       ],
    53       'conditions': [
    54         ['OS == "mac"', {
    55           'sources': [
    56             'gtest_mac.h',
    57             'gtest_mac.mm',
    58             'platform_test_mac.mm'
    59           ],
    60           'link_settings': {
    61             'libraries': [
    62               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
    63             ],
    64           },
    65 	  'conditions': [
    66 	    ['build_with_mozilla==1', {
    67 	      'defines': [
    68                 'GTEST_USE_OWN_TR1_TUPLE=1',
    69 	      ],
    70               'direct_dependent_settings': {
    71                 'defines': [
    72               	  'GTEST_USE_OWN_TR1_TUPLE=1',
    73             	],
    74               },
    75 	    }],
    76 	  ],
    77         }],
    78         ['OS == "win"', {
    79           'defines': [
    80             '_VARIADIC_MAX=10',
    81           ],
    82           'direct_dependent_settings': {
    83             'defines': [
    84               '_VARIADIC_MAX=10',
    85             ],
    86           },
    87         }],
    88         ['os_posix == 1', {
    89           'defines': [
    90             # gtest isn't able to figure out when RTTI is disabled for gcc
    91             # versions older than 4.3.2, and assumes it's enabled.  Our Mac
    92             # and Linux builds disable RTTI, and cannot guarantee that the
    93             # compiler will be 4.3.2. or newer.  The Mac, for example, uses
    94             # 4.2.1 as that is the latest available on that platform.  gtest
    95             # must be instructed that RTTI is disabled here, and for any
    96             # direct dependents that might include gtest headers.
    97             'GTEST_HAS_RTTI=0',
    98           ],
    99           'direct_dependent_settings': {
   100             'defines': [
   101               'GTEST_HAS_RTTI=0',
   102             ],
   103           },
   104         }],
   105         ['clang==1 or OS=="android"', {
   106           # We want gtest features that use tr1::tuple, but we currently
   107           # don't support the variadic templates used by libstdc++'s
   108           # implementation. gtest supports this scenario by providing its
   109           # own implementation but we must opt in to it.
   110           'defines': [
   111             'GTEST_USE_OWN_TR1_TUPLE=1',
   112           ],
   113           'direct_dependent_settings': {
   114             'defines': [
   115               'GTEST_USE_OWN_TR1_TUPLE=1',
   116             ],
   117           },
   118         }],
   119       ],
   120       'direct_dependent_settings': {
   121         'defines': [
   122           'UNIT_TEST',
   123         ],
   124         'include_dirs': [
   125           'gtest/include',  # So that gtest headers can find themselves.
   126         ],
   127         'target_conditions': [
   128           ['_type=="executable"', {
   129             'test': 1,
   130             'conditions': [
   131               ['OS=="mac"', {
   132                 'run_as': {
   133                   'action????': ['${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}'],
   134                 },
   135               }],
   136               ['OS=="win"', {
   137                 'run_as': {
   138                   'action????': ['$(TargetPath)', '--gtest_print_time'],
   139                 },
   140               }],
   141             ],
   142           }],
   143         ],
   144         'msvs_disabled_warnings': [4800],
   145       },
   146     },
   147     {
   148       'target_name': 'gtest_main',
   149       'type': 'static_library',
   150       'dependencies': [
   151         'gtest',
   152       ],
   153       'sources': [
   154         'gtest/src/gtest_main.cc',
   155       ],
   156     },
   157     {
   158       'target_name': 'gtest_prod',
   159       'toolsets': ['host', 'target'],
   160       'type': 'none',
   161       'sources': [
   162         'gtest/include/gtest/gtest_prod.h',
   163       ],
   164     },
   165   ],
   166 }

mercurial