mirror of
https://github.com/chromium/crashpad.git
synced 2025-01-14 01:08:01 +08:00
Add an “external” mode for obtaining dependencies
This augments the standalone and in-Chromium models with an external model, in which the dependencies and Crashpad are checked out as siblings in the same directory, organized according to this structure: root/crashpad[/README] root/gmock[/include/gmock/gmock.h] root/gtest[/include/gtest/gtest.h] root/gyp[/pylib/gyp] root/mini_chromium[/build/common.gypi] This is the directory structure used in google3. Change-Id: Ie300ead7cd085265933e4ed891509ce050e995e2 Reviewed-on: https://chromium-review.googlesource.com/324230 Reviewed-by: Robert Sesek <rsesek@chromium.org> Reviewed-by: Scott Graham <scottmg@chromium.org>
This commit is contained in:
parent
82af299823
commit
88eea80ad3
42
build/crashpad_dependencies.gypi
Normal file
42
build/crashpad_dependencies.gypi
Normal file
@ -0,0 +1,42 @@
|
||||
# Copyright 2015 The Crashpad Authors. 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.
|
||||
|
||||
{
|
||||
# Crashpad can obtain dependencies in three different ways, directed by the
|
||||
# crashpad_standalone GYP variable. It may have these values:
|
||||
# standalone
|
||||
# A “standalone” Crashpad build, where the dependencies are in the
|
||||
# Crashpad tree. third_party/mini_chromium and third_party/gtest provide
|
||||
# the base and gtest libraries.
|
||||
# chromium
|
||||
# An in-Chromium build, where Crashpad is within the Chromium tree.
|
||||
# Chromium provides its own base library and its copy of the gtest
|
||||
# library.
|
||||
# external
|
||||
# A build with external dependencies. mini_chromium provides the base
|
||||
# library, but it’s located outside of the Crashpad tree, as is gtest.
|
||||
#
|
||||
# In order for Crashpad’s .gyp files to reference the correct versions
|
||||
# depending on how dependencies are being provided, include this .gypi file
|
||||
# and reference the crashpad_dependencies variable.
|
||||
|
||||
'variables': {
|
||||
# When building as a standalone project or with external dependencies,
|
||||
# build/gyp_crashpad.py sets crashpad_dependencies to "standalone" or
|
||||
# "external", and this % assignment will not override it. The variable will
|
||||
# not be set by anything else when building as part of Chromium, so in that
|
||||
# case, this will define it with value "chromium".
|
||||
'crashpad_dependencies%': 'chromium',
|
||||
},
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
# Copyright 2015 The Crashpad Authors. 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.
|
||||
|
||||
{
|
||||
# Crashpad can build as a standalone project or as part of Chromium. When
|
||||
# building as a standalone project, it uses mini_chromium to provide the base
|
||||
# library, and uses its own copy of gtest in third_party. When building as
|
||||
# part of Chromium, it uses Chromium’s base library and copy of gtest. In
|
||||
# order for Crashpad’s .gyp files to reference the correct versions depending
|
||||
# on whether building standalone or as a part of Chromium, include this .gypi
|
||||
# file and reference the crashpad_in_chromium variable.
|
||||
|
||||
'variables': {
|
||||
'variables': {
|
||||
# When building as a standalone project, build/gyp_crashpad.py sets
|
||||
# crashpad_standalone to 1, and this % assignment will not override it.
|
||||
# The variable will not be set when building as part of Chromium, so in
|
||||
# that case, this will define it with value 0.
|
||||
'crashpad_standalone%': 0,
|
||||
},
|
||||
|
||||
'conditions': [
|
||||
['crashpad_standalone!=0', {
|
||||
'crashpad_in_chromium': 0,
|
||||
}, {
|
||||
'crashpad_in_chromium': 1,
|
||||
}],
|
||||
],
|
||||
|
||||
'crashpad_in_chromium': '<(crashpad_in_chromium)',
|
||||
},
|
||||
}
|
@ -17,10 +17,38 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def ChooseDependencyPath(local_path, external_path):
|
||||
"""Chooses between a dependency located at local path and an external path.
|
||||
|
||||
The local path, used in standalone builds, is preferred. If it is not present
|
||||
but the external path is, the external path will be used. If neither path is
|
||||
present, the local path will be used, so that error messages uniformly refer
|
||||
to the local path.
|
||||
|
||||
Args:
|
||||
local_path: The preferred local path to use for a standalone build.
|
||||
external_path: The external path to fall back to.
|
||||
|
||||
Returns:
|
||||
A 2-tuple. The first element is 'standalone' or 'external', depending on
|
||||
whether local_path or external_path was chosen. The second element is the
|
||||
chosen path.
|
||||
"""
|
||||
if os.path.exists(local_path) or not os.path.exists(external_path):
|
||||
return ('standalone', local_path)
|
||||
return ('external', external_path)
|
||||
|
||||
|
||||
script_dir = os.path.dirname(__file__)
|
||||
crashpad_dir = os.path.dirname(script_dir) if script_dir is not '' else '..'
|
||||
sys.path.insert(
|
||||
0, os.path.join(crashpad_dir, 'third_party', 'gyp', 'gyp', 'pylib'))
|
||||
crashpad_dir = (os.path.dirname(script_dir) if script_dir not in ('', os.curdir)
|
||||
else os.pardir)
|
||||
|
||||
sys.path.insert(0,
|
||||
ChooseDependencyPath(os.path.join(crashpad_dir, 'third_party', 'gyp', 'gyp',
|
||||
'pylib'),
|
||||
os.path.join(crashpad_dir, os.pardir, 'gyp',
|
||||
'pylib'))[1])
|
||||
|
||||
import gyp
|
||||
|
||||
@ -29,12 +57,15 @@ def main(args):
|
||||
if 'GYP_GENERATORS' not in os.environ:
|
||||
os.environ['GYP_GENERATORS'] = 'ninja'
|
||||
|
||||
crashpad_dir_or_dot = crashpad_dir if crashpad_dir is not '' else '.'
|
||||
crashpad_dir_or_dot = crashpad_dir if crashpad_dir is not '' else os.curdir
|
||||
|
||||
args.extend(['-D', 'crashpad_standalone=1'])
|
||||
args.extend(['--include',
|
||||
os.path.join(crashpad_dir, 'third_party', 'mini_chromium',
|
||||
'mini_chromium', 'build', 'common.gypi')])
|
||||
(dependencies, mini_chromium_dir) = (ChooseDependencyPath(
|
||||
os.path.join(crashpad_dir, 'third_party', 'mini_chromium',
|
||||
'mini_chromium', 'build', 'common.gypi'),
|
||||
os.path.join(crashpad_dir, os.pardir, 'mini_chromium', 'build',
|
||||
'common.gypi')))
|
||||
args.extend(['-D', 'crashpad_dependencies=%s' % dependencies])
|
||||
args.extend(['--include', mini_chromium_dir])
|
||||
args.extend(['--depth', crashpad_dir_or_dot])
|
||||
args.append(os.path.join(crashpad_dir, 'crashpad.gyp'))
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
{
|
||||
'includes': [
|
||||
'../build/crashpad.gypi',
|
||||
'../build/crashpad_in_chromium.gypi',
|
||||
'../build/crashpad_dependencies.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
@ -78,7 +78,7 @@
|
||||
'component%': 'static_library',
|
||||
},
|
||||
'conditions': [
|
||||
['crashpad_in_chromium!=0 and component=="shared_library"', {
|
||||
['crashpad_dependencies=="chromium" and component=="shared_library"', {
|
||||
'xcode_settings': {
|
||||
'LD_RUNPATH_SEARCH_PATHS': [ # -Wl,-rpath
|
||||
# Get back from
|
||||
|
107
third_party/gtest/gmock.gyp
vendored
107
third_party/gtest/gmock.gyp
vendored
@ -14,10 +14,19 @@
|
||||
|
||||
{
|
||||
'includes': [
|
||||
'../../build/crashpad_in_chromium.gypi',
|
||||
'../../build/crashpad_dependencies.gypi',
|
||||
],
|
||||
'conditions': [
|
||||
['crashpad_in_chromium==0', {
|
||||
['crashpad_dependencies!="chromium"', {
|
||||
'variables': {
|
||||
'conditions': [
|
||||
['crashpad_dependencies=="standalone"', {
|
||||
'gmock_dir': 'gtest/googlemock',
|
||||
}, {
|
||||
'gmock_dir': '../../../gmock',
|
||||
}],
|
||||
],
|
||||
},
|
||||
'target_defaults': {
|
||||
# gmock relies heavily on objects with static storage duration.
|
||||
'xcode_settings': {
|
||||
@ -38,41 +47,41 @@
|
||||
'gtest.gyp:gtest',
|
||||
],
|
||||
'include_dirs': [
|
||||
'gtest/googlemock',
|
||||
'gtest/googlemock/include',
|
||||
'<(gmock_dir)',
|
||||
'<(gmock_dir)/include',
|
||||
],
|
||||
'sources': [
|
||||
'gtest/googlemock/include/gmock/gmock-actions.h',
|
||||
'gtest/googlemock/include/gmock/gmock-cardinalities.h',
|
||||
'gtest/googlemock/include/gmock/gmock-generated-actions.h',
|
||||
'gtest/googlemock/include/gmock/gmock-generated-function-mockers.h',
|
||||
'gtest/googlemock/include/gmock/gmock-generated-matchers.h',
|
||||
'gtest/googlemock/include/gmock/gmock-generated-nice-strict.h',
|
||||
'gtest/googlemock/include/gmock/gmock-matchers.h',
|
||||
'gtest/googlemock/include/gmock/gmock-more-actions.h',
|
||||
'gtest/googlemock/include/gmock/gmock-more-matchers.h',
|
||||
'gtest/googlemock/include/gmock/gmock-spec-builders.h',
|
||||
'gtest/googlemock/include/gmock/gmock.h',
|
||||
'gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h',
|
||||
'gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h',
|
||||
'gtest/googlemock/include/gmock/internal/custom/gmock-port.h',
|
||||
'gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h',
|
||||
'gtest/googlemock/include/gmock/internal/gmock-internal-utils.h',
|
||||
'gtest/googlemock/include/gmock/internal/gmock-port.h',
|
||||
'gtest/googlemock/src/gmock-all.cc',
|
||||
'gtest/googlemock/src/gmock-cardinalities.cc',
|
||||
'gtest/googlemock/src/gmock-internal-utils.cc',
|
||||
'gtest/googlemock/src/gmock-matchers.cc',
|
||||
'gtest/googlemock/src/gmock-spec-builders.cc',
|
||||
'gtest/googlemock/src/gmock.cc',
|
||||
'<(gmock_dir)/include/gmock/gmock-actions.h',
|
||||
'<(gmock_dir)/include/gmock/gmock-cardinalities.h',
|
||||
'<(gmock_dir)/include/gmock/gmock-generated-actions.h',
|
||||
'<(gmock_dir)/include/gmock/gmock-generated-function-mockers.h',
|
||||
'<(gmock_dir)/include/gmock/gmock-generated-matchers.h',
|
||||
'<(gmock_dir)/include/gmock/gmock-generated-nice-strict.h',
|
||||
'<(gmock_dir)/include/gmock/gmock-matchers.h',
|
||||
'<(gmock_dir)/include/gmock/gmock-more-actions.h',
|
||||
'<(gmock_dir)/include/gmock/gmock-more-matchers.h',
|
||||
'<(gmock_dir)/include/gmock/gmock-spec-builders.h',
|
||||
'<(gmock_dir)/include/gmock/gmock.h',
|
||||
'<(gmock_dir)/include/gmock/internal/custom/gmock-generated-actions.h',
|
||||
'<(gmock_dir)/include/gmock/internal/custom/gmock-matchers.h',
|
||||
'<(gmock_dir)/include/gmock/internal/custom/gmock-port.h',
|
||||
'<(gmock_dir)/include/gmock/internal/gmock-generated-internal-utils.h',
|
||||
'<(gmock_dir)/include/gmock/internal/gmock-internal-utils.h',
|
||||
'<(gmock_dir)/include/gmock/internal/gmock-port.h',
|
||||
'<(gmock_dir)/src/gmock-all.cc',
|
||||
'<(gmock_dir)/src/gmock-cardinalities.cc',
|
||||
'<(gmock_dir)/src/gmock-internal-utils.cc',
|
||||
'<(gmock_dir)/src/gmock-matchers.cc',
|
||||
'<(gmock_dir)/src/gmock-spec-builders.cc',
|
||||
'<(gmock_dir)/src/gmock.cc',
|
||||
],
|
||||
'sources!': [
|
||||
'gtest/googlemock/src/gmock-all.cc',
|
||||
'<(gmock_dir)/src/gmock-all.cc',
|
||||
],
|
||||
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'gtest/googlemock/include',
|
||||
'<(gmock_dir)/include',
|
||||
],
|
||||
'conditions': [
|
||||
['clang!=0', {
|
||||
@ -114,7 +123,7 @@
|
||||
'gtest.gyp:gtest',
|
||||
],
|
||||
'sources': [
|
||||
'gtest/googlemock/src/gmock_main.cc',
|
||||
'<(gmock_dir)/src/gmock_main.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -127,7 +136,7 @@
|
||||
'direct_dependent_settings': {
|
||||
'type': 'executable',
|
||||
'include_dirs': [
|
||||
'gtest/googlemock',
|
||||
'<(gmock_dir)',
|
||||
],
|
||||
},
|
||||
'export_dependent_settings': [
|
||||
@ -145,19 +154,19 @@
|
||||
'gtest/googletest',
|
||||
],
|
||||
'sources': [
|
||||
'gtest/googlemock/test/gmock-actions_test.cc',
|
||||
'gtest/googlemock/test/gmock-cardinalities_test.cc',
|
||||
'gtest/googlemock/test/gmock-generated-actions_test.cc',
|
||||
'gtest/googlemock/test/gmock-generated-function-mockers_test.cc',
|
||||
'gtest/googlemock/test/gmock-generated-internal-utils_test.cc',
|
||||
'gtest/googlemock/test/gmock-generated-matchers_test.cc',
|
||||
'gtest/googlemock/test/gmock-internal-utils_test.cc',
|
||||
'gtest/googlemock/test/gmock-matchers_test.cc',
|
||||
'gtest/googlemock/test/gmock-more-actions_test.cc',
|
||||
'gtest/googlemock/test/gmock-nice-strict_test.cc',
|
||||
'gtest/googlemock/test/gmock-port_test.cc',
|
||||
'gtest/googlemock/test/gmock-spec-builders_test.cc',
|
||||
'gtest/googlemock/test/gmock_test.cc',
|
||||
'<(gmock_dir)/test/gmock-actions_test.cc',
|
||||
'<(gmock_dir)/test/gmock-cardinalities_test.cc',
|
||||
'<(gmock_dir)/test/gmock-generated-actions_test.cc',
|
||||
'<(gmock_dir)/test/gmock-generated-function-mockers_test.cc',
|
||||
'<(gmock_dir)/test/gmock-generated-internal-utils_test.cc',
|
||||
'<(gmock_dir)/test/gmock-generated-matchers_test.cc',
|
||||
'<(gmock_dir)/test/gmock-internal-utils_test.cc',
|
||||
'<(gmock_dir)/test/gmock-matchers_test.cc',
|
||||
'<(gmock_dir)/test/gmock-more-actions_test.cc',
|
||||
'<(gmock_dir)/test/gmock-nice-strict_test.cc',
|
||||
'<(gmock_dir)/test/gmock-port_test.cc',
|
||||
'<(gmock_dir)/test/gmock-spec-builders_test.cc',
|
||||
'<(gmock_dir)/test/gmock_test.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -167,9 +176,9 @@
|
||||
'gmock_main',
|
||||
],
|
||||
'sources': [
|
||||
'gtest/googlemock/test/gmock_link_test.cc',
|
||||
'gtest/googlemock/test/gmock_link_test.h',
|
||||
'gtest/googlemock/test/gmock_link2_test.cc',
|
||||
'<(gmock_dir)/test/gmock_link_test.cc',
|
||||
'<(gmock_dir)/test/gmock_link_test.h',
|
||||
'<(gmock_dir)/test/gmock_link2_test.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -178,7 +187,7 @@
|
||||
'gmock_test_executable',
|
||||
],
|
||||
'sources': [
|
||||
'gtest/googlemock/test/gmock_stress_test.cc',
|
||||
'<(gmock_dir)/test/gmock_stress_test.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -191,7 +200,7 @@
|
||||
],
|
||||
},
|
||||
],
|
||||
}, { # else: crashpad_in_chromium!=0
|
||||
}, { # else: crashpad_dependencies=="chromium"
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'gmock',
|
||||
|
168
third_party/gtest/gtest.gyp
vendored
168
third_party/gtest/gtest.gyp
vendored
@ -14,10 +14,19 @@
|
||||
|
||||
{
|
||||
'includes': [
|
||||
'../../build/crashpad_in_chromium.gypi',
|
||||
'../../build/crashpad_dependencies.gypi',
|
||||
],
|
||||
'conditions': [
|
||||
['crashpad_in_chromium==0', {
|
||||
['crashpad_dependencies!="chromium"', {
|
||||
'variables': {
|
||||
'conditions': [
|
||||
['crashpad_dependencies=="standalone"', {
|
||||
'gtest_dir': 'gtest/googletest',
|
||||
}, {
|
||||
'gtest_dir': '../../../gtest',
|
||||
}],
|
||||
],
|
||||
},
|
||||
'target_defaults': {
|
||||
# gtest relies heavily on objects with static storage duration.
|
||||
'xcode_settings': {
|
||||
@ -35,53 +44,70 @@
|
||||
'target_name': 'gtest',
|
||||
'type': 'static_library',
|
||||
'include_dirs': [
|
||||
'gtest/googletest',
|
||||
'gtest/googletest/include',
|
||||
'<(gtest_dir)',
|
||||
'<(gtest_dir)/include',
|
||||
],
|
||||
'sources': [
|
||||
'gtest/googletest/include/gtest/gtest-death-test.h',
|
||||
'gtest/googletest/include/gtest/gtest-message.h',
|
||||
'gtest/googletest/include/gtest/gtest-param-test.h',
|
||||
'gtest/googletest/include/gtest/gtest-printers.h',
|
||||
'gtest/googletest/include/gtest/gtest-spi.h',
|
||||
'gtest/googletest/include/gtest/gtest-test-part.h',
|
||||
'gtest/googletest/include/gtest/gtest-typed-test.h',
|
||||
'gtest/googletest/include/gtest/gtest.h',
|
||||
'gtest/googletest/include/gtest/gtest_pred_impl.h',
|
||||
'gtest/googletest/include/gtest/gtest_prod.h',
|
||||
'gtest/googletest/include/gtest/internal/custom/gtest-port.h',
|
||||
'gtest/googletest/include/gtest/internal/custom/gtest-printers.h',
|
||||
'gtest/googletest/include/gtest/internal/custom/gtest.h',
|
||||
'gtest/googletest/include/gtest/internal/gtest-death-test-internal.h',
|
||||
'gtest/googletest/include/gtest/internal/gtest-filepath.h',
|
||||
'gtest/googletest/include/gtest/internal/gtest-internal.h',
|
||||
'gtest/googletest/include/gtest/internal/gtest-linked_ptr.h',
|
||||
'gtest/googletest/include/gtest/internal/gtest-param-util-generated.h',
|
||||
'gtest/googletest/include/gtest/internal/gtest-param-util.h',
|
||||
'gtest/googletest/include/gtest/internal/gtest-port-arch.h',
|
||||
'gtest/googletest/include/gtest/internal/gtest-port.h',
|
||||
'gtest/googletest/include/gtest/internal/gtest-string.h',
|
||||
'gtest/googletest/include/gtest/internal/gtest-tuple.h',
|
||||
'gtest/googletest/include/gtest/internal/gtest-type-util.h',
|
||||
'gtest/googletest/src/gtest-all.cc',
|
||||
'gtest/googletest/src/gtest-death-test.cc',
|
||||
'gtest/googletest/src/gtest-filepath.cc',
|
||||
'gtest/googletest/src/gtest-internal-inl.h',
|
||||
'gtest/googletest/src/gtest-port.cc',
|
||||
'gtest/googletest/src/gtest-printers.cc',
|
||||
'gtest/googletest/src/gtest-test-part.cc',
|
||||
'gtest/googletest/src/gtest-typed-test.cc',
|
||||
'gtest/googletest/src/gtest.cc',
|
||||
'<(gtest_dir)/include/gtest/gtest-death-test.h',
|
||||
'<(gtest_dir)/include/gtest/gtest-message.h',
|
||||
'<(gtest_dir)/include/gtest/gtest-param-test.h',
|
||||
'<(gtest_dir)/include/gtest/gtest-printers.h',
|
||||
'<(gtest_dir)/include/gtest/gtest-spi.h',
|
||||
'<(gtest_dir)/include/gtest/gtest-test-part.h',
|
||||
'<(gtest_dir)/include/gtest/gtest-typed-test.h',
|
||||
'<(gtest_dir)/include/gtest/gtest.h',
|
||||
'<(gtest_dir)/include/gtest/gtest_pred_impl.h',
|
||||
'<(gtest_dir)/include/gtest/gtest_prod.h',
|
||||
'<(gtest_dir)/include/gtest/internal/custom/gtest-port.h',
|
||||
'<(gtest_dir)/include/gtest/internal/custom/gtest-printers.h',
|
||||
'<(gtest_dir)/include/gtest/internal/custom/gtest.h',
|
||||
'<(gtest_dir)/include/gtest/internal/gtest-death-test-internal.h',
|
||||
'<(gtest_dir)/include/gtest/internal/gtest-filepath.h',
|
||||
'<(gtest_dir)/include/gtest/internal/gtest-internal.h',
|
||||
'<(gtest_dir)/include/gtest/internal/gtest-linked_ptr.h',
|
||||
'<(gtest_dir)/include/gtest/internal/gtest-param-util-generated.h',
|
||||
'<(gtest_dir)/include/gtest/internal/gtest-param-util.h',
|
||||
'<(gtest_dir)/include/gtest/internal/gtest-port-arch.h',
|
||||
'<(gtest_dir)/include/gtest/internal/gtest-port.h',
|
||||
'<(gtest_dir)/include/gtest/internal/gtest-string.h',
|
||||
'<(gtest_dir)/include/gtest/internal/gtest-tuple.h',
|
||||
'<(gtest_dir)/include/gtest/internal/gtest-type-util.h',
|
||||
'<(gtest_dir)/src/gtest-all.cc',
|
||||
'<(gtest_dir)/src/gtest-death-test.cc',
|
||||
'<(gtest_dir)/src/gtest-filepath.cc',
|
||||
'<(gtest_dir)/src/gtest-internal-inl.h',
|
||||
'<(gtest_dir)/src/gtest-port.cc',
|
||||
'<(gtest_dir)/src/gtest-printers.cc',
|
||||
'<(gtest_dir)/src/gtest-test-part.cc',
|
||||
'<(gtest_dir)/src/gtest-typed-test.cc',
|
||||
'<(gtest_dir)/src/gtest.cc',
|
||||
],
|
||||
'sources!': [
|
||||
'gtest/googletest/src/gtest-all.cc',
|
||||
'<(gtest_dir)/src/gtest-all.cc',
|
||||
],
|
||||
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'gtest/googletest/include',
|
||||
'<(gtest_dir)/include',
|
||||
],
|
||||
},
|
||||
'conditions': [
|
||||
['crashpad_dependencies=="external"', {
|
||||
'include_dirs': [
|
||||
'<(gtest_dir)/../..',
|
||||
],
|
||||
'defines': [
|
||||
'GUNIT_NO_GOOGLE3=1',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'<(gtest_dir)/../..',
|
||||
],
|
||||
'defines': [
|
||||
'GUNIT_NO_GOOGLE3=1',
|
||||
],
|
||||
},
|
||||
}],
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'gtest_main',
|
||||
@ -90,7 +116,7 @@
|
||||
'gtest',
|
||||
],
|
||||
'sources': [
|
||||
'gtest/googletest/src/gtest_main.cc',
|
||||
'<(gtest_dir)/src/gtest_main.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -102,7 +128,7 @@
|
||||
'direct_dependent_settings': {
|
||||
'type': 'executable',
|
||||
'include_dirs': [
|
||||
'gtest/googletest',
|
||||
'<(gtest_dir)',
|
||||
],
|
||||
},
|
||||
'export_dependent_settings': [
|
||||
@ -116,23 +142,23 @@
|
||||
'gtest_main',
|
||||
],
|
||||
'sources': [
|
||||
'gtest/googletest/test/gtest-death-test_test.cc',
|
||||
'gtest/googletest/test/gtest-filepath_test.cc',
|
||||
'gtest/googletest/test/gtest-linked_ptr_test.cc',
|
||||
'gtest/googletest/test/gtest-message_test.cc',
|
||||
'gtest/googletest/test/gtest-options_test.cc',
|
||||
'gtest/googletest/test/gtest-port_test.cc',
|
||||
'gtest/googletest/test/gtest-printers_test.cc',
|
||||
'gtest/googletest/test/gtest-test-part_test.cc',
|
||||
'gtest/googletest/test/gtest-typed-test2_test.cc',
|
||||
'gtest/googletest/test/gtest-typed-test_test.cc',
|
||||
'gtest/googletest/test/gtest-typed-test_test.h',
|
||||
'gtest/googletest/test/gtest_main_unittest.cc',
|
||||
'gtest/googletest/test/gtest_pred_impl_unittest.cc',
|
||||
'gtest/googletest/test/gtest_prod_test.cc',
|
||||
'gtest/googletest/test/gtest_unittest.cc',
|
||||
'gtest/googletest/test/production.cc',
|
||||
'gtest/googletest/test/production.h',
|
||||
'<(gtest_dir)/test/gtest-death-test_test.cc',
|
||||
'<(gtest_dir)/test/gtest-filepath_test.cc',
|
||||
'<(gtest_dir)/test/gtest-linked_ptr_test.cc',
|
||||
'<(gtest_dir)/test/gtest-message_test.cc',
|
||||
'<(gtest_dir)/test/gtest-options_test.cc',
|
||||
'<(gtest_dir)/test/gtest-port_test.cc',
|
||||
'<(gtest_dir)/test/gtest-printers_test.cc',
|
||||
'<(gtest_dir)/test/gtest-test-part_test.cc',
|
||||
'<(gtest_dir)/test/gtest-typed-test2_test.cc',
|
||||
'<(gtest_dir)/test/gtest-typed-test_test.cc',
|
||||
'<(gtest_dir)/test/gtest-typed-test_test.h',
|
||||
'<(gtest_dir)/test/gtest_main_unittest.cc',
|
||||
'<(gtest_dir)/test/gtest_pred_impl_unittest.cc',
|
||||
'<(gtest_dir)/test/gtest_prod_test.cc',
|
||||
'<(gtest_dir)/test/gtest_unittest.cc',
|
||||
'<(gtest_dir)/test/production.cc',
|
||||
'<(gtest_dir)/test/production.h',
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -141,7 +167,7 @@
|
||||
'gtest_test_executable',
|
||||
],
|
||||
'sources': [
|
||||
'gtest/googletest/test/gtest_environment_test.cc',
|
||||
'<(gtest_dir)/test/gtest_environment_test.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -150,7 +176,7 @@
|
||||
'gtest_test_executable',
|
||||
],
|
||||
'sources': [
|
||||
'gtest/googletest/test/gtest-listener_test.cc',
|
||||
'<(gtest_dir)/test/gtest-listener_test.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -159,7 +185,7 @@
|
||||
'gtest_test_executable',
|
||||
],
|
||||
'sources': [
|
||||
'gtest/googletest/test/gtest_no_test_unittest.cc',
|
||||
'<(gtest_dir)/test/gtest_no_test_unittest.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -168,9 +194,9 @@
|
||||
'gtest_test_executable',
|
||||
],
|
||||
'sources': [
|
||||
'gtest/googletest/test/gtest-param-test2_test.cc',
|
||||
'gtest/googletest/test/gtest-param-test_test.cc',
|
||||
'gtest/googletest/test/gtest-param-test_test.h',
|
||||
'<(gtest_dir)/test/gtest-param-test2_test.cc',
|
||||
'<(gtest_dir)/test/gtest-param-test_test.cc',
|
||||
'<(gtest_dir)/test/gtest-param-test_test.h',
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -179,7 +205,7 @@
|
||||
'gtest_test_executable',
|
||||
],
|
||||
'sources': [
|
||||
'gtest/googletest/test/gtest_premature_exit_test.cc',
|
||||
'<(gtest_dir)/test/gtest_premature_exit_test.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -188,7 +214,7 @@
|
||||
'gtest_test_executable',
|
||||
],
|
||||
'sources': [
|
||||
'gtest/googletest/test/gtest_repeat_test.cc',
|
||||
'<(gtest_dir)/test/gtest_repeat_test.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -198,7 +224,7 @@
|
||||
'gtest_main',
|
||||
],
|
||||
'sources': [
|
||||
'gtest/googletest/test/gtest_sole_header_test.cc',
|
||||
'<(gtest_dir)/test/gtest_sole_header_test.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -207,7 +233,7 @@
|
||||
'gtest_test_executable',
|
||||
],
|
||||
'sources': [
|
||||
'gtest/googletest/test/gtest_stress_test.cc',
|
||||
'<(gtest_dir)/test/gtest_stress_test.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -216,7 +242,7 @@
|
||||
'gtest_test_executable',
|
||||
],
|
||||
'sources': [
|
||||
'gtest/googletest/test/gtest-unittest-api_test.cc',
|
||||
'<(gtest_dir)/test/gtest-unittest-api_test.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -236,7 +262,7 @@
|
||||
],
|
||||
},
|
||||
],
|
||||
}, { # else: crashpad_in_chromium!=0
|
||||
}, { # else: crashpad_dependencies=="chromium"
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'gtest',
|
||||
|
24
third_party/mini_chromium/mini_chromium.gyp
vendored
24
third_party/mini_chromium/mini_chromium.gyp
vendored
@ -14,25 +14,27 @@
|
||||
|
||||
{
|
||||
'includes': [
|
||||
'../../build/crashpad_in_chromium.gypi',
|
||||
'../../build/crashpad_dependencies.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
# To support both Crashpad’s standalone build and its in-Chromium build,
|
||||
# Crashpad code depending on base should do so through this shim, which
|
||||
# will either get base from mini_chromium or Chromium depending on the
|
||||
# build type.
|
||||
# To support Crashpad’s standalone build, its in-Chromium build, and its
|
||||
# build depending on external libraries, Crashpad code depending on base
|
||||
# should do so through this shim, which will either get base from
|
||||
# mini_chromium, Chromium, or an external library depending on the build
|
||||
# type.
|
||||
'target_name': 'base',
|
||||
'type': 'none',
|
||||
'conditions': [
|
||||
['crashpad_in_chromium==0', {
|
||||
['crashpad_dependencies=="standalone"', {
|
||||
'dependencies': [
|
||||
'mini_chromium/base/base.gyp:base',
|
||||
],
|
||||
'export_dependent_settings': [
|
||||
'mini_chromium/base/base.gyp:base',
|
||||
],
|
||||
}, { # else: crashpad_in_chromium!=0
|
||||
}],
|
||||
['crashpad_dependencies=="chromium"', {
|
||||
'dependencies': [
|
||||
'<(DEPTH)/base/base.gyp:base',
|
||||
],
|
||||
@ -40,6 +42,14 @@
|
||||
'<(DEPTH)/base/base.gyp:base',
|
||||
],
|
||||
}],
|
||||
['crashpad_dependencies=="external"', {
|
||||
'dependencies': [
|
||||
'<(DEPTH)/../mini_chromium/base/base.gyp:base',
|
||||
],
|
||||
'export_dependent_settings': [
|
||||
'<(DEPTH)/../mini_chromium/base/base.gyp:base',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user