Commit 3de01399 authored by ncbray@chromium.org's avatar ncbray@chromium.org

Create NaCl build of gtest.

Originally landed as 289216 and reverted as 289223 due to a GYP bug.

BUG=401761

Review URL: https://codereview.chromium.org/401453002

Cr-Commit-Position: refs/heads/master@{#289558}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289558 0039d316-1c4b-4281-b951-d872f2087c98
parent 646a59f7
......@@ -409,6 +409,11 @@
'../components/nacl.gyp:nacl_loader_unittests',
],
}],
['disable_nacl==0 and disable_nacl_untrusted==0', {
'dependencies': [
'../testing/gtest_nacl.gyp:*',
],
}],
],
}, # target_name: chromium_builder_tests
],
......
......@@ -3,46 +3,16 @@
# found in the LICENSE file.
{
'includes': [
'gtest.gypi',
],
'targets': [
{
'target_name': 'gtest',
'toolsets': ['host', 'target'],
'type': 'static_library',
'sources': [
'gtest/include/gtest/gtest-death-test.h',
'gtest/include/gtest/gtest-message.h',
'gtest/include/gtest/gtest-param-test.h',
'gtest/include/gtest/gtest-printers.h',
'gtest/include/gtest/gtest-spi.h',
'gtest/include/gtest/gtest-test-part.h',
'gtest/include/gtest/gtest-typed-test.h',
'gtest/include/gtest/gtest.h',
'gtest/include/gtest/gtest_pred_impl.h',
'gtest/include/gtest/internal/gtest-death-test-internal.h',
'gtest/include/gtest/internal/gtest-filepath.h',
'gtest/include/gtest/internal/gtest-internal.h',
'gtest/include/gtest/internal/gtest-linked_ptr.h',
'gtest/include/gtest/internal/gtest-param-util-generated.h',
'gtest/include/gtest/internal/gtest-param-util.h',
'gtest/include/gtest/internal/gtest-port.h',
'gtest/include/gtest/internal/gtest-string.h',
'gtest/include/gtest/internal/gtest-tuple.h',
'gtest/include/gtest/internal/gtest-type-util.h',
'gtest/src/gtest-all.cc',
'gtest/src/gtest-death-test.cc',
'gtest/src/gtest-filepath.cc',
'gtest/src/gtest-internal-inl.h',
'gtest/src/gtest-port.cc',
'gtest/src/gtest-printers.cc',
'gtest/src/gtest-test-part.cc',
'gtest/src/gtest-typed-test.cc',
'gtest/src/gtest.cc',
'multiprocess_func_list.cc',
'multiprocess_func_list.h',
'platform_test.h',
],
'sources!': [
'gtest/src/gtest-all.cc', # Not needed by our build.
'<@(gtest_sources)',
],
'include_dirs': [
'gtest',
......
# 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.
{
'variables': {
'gtest_sources': [
'gtest/include/gtest/gtest-death-test.h',
'gtest/include/gtest/gtest-message.h',
'gtest/include/gtest/gtest-param-test.h',
'gtest/include/gtest/gtest-printers.h',
'gtest/include/gtest/gtest-spi.h',
'gtest/include/gtest/gtest-test-part.h',
'gtest/include/gtest/gtest-typed-test.h',
'gtest/include/gtest/gtest.h',
'gtest/include/gtest/gtest_pred_impl.h',
'gtest/include/gtest/gtest_prod.h',
'gtest/include/gtest/internal/gtest-death-test-internal.h',
'gtest/include/gtest/internal/gtest-filepath.h',
'gtest/include/gtest/internal/gtest-internal.h',
'gtest/include/gtest/internal/gtest-linked_ptr.h',
'gtest/include/gtest/internal/gtest-param-util-generated.h',
'gtest/include/gtest/internal/gtest-param-util.h',
'gtest/include/gtest/internal/gtest-port.h',
'gtest/include/gtest/internal/gtest-string.h',
'gtest/include/gtest/internal/gtest-tuple.h',
'gtest/include/gtest/internal/gtest-type-util.h',
'gtest/src/gtest-death-test.cc',
'gtest/src/gtest-filepath.cc',
'gtest/src/gtest-internal-inl.h',
'gtest/src/gtest-port.cc',
'gtest/src/gtest-printers.cc',
'gtest/src/gtest-test-part.cc',
'gtest/src/gtest-typed-test.cc',
'gtest/src/gtest.cc',
'multiprocess_func_list.cc',
'multiprocess_func_list.h',
'platform_test.h',
],
},
}
# 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.
{
'variables': {
'chromium_code': 1,
},
'includes': [
'../build/common_untrusted.gypi',
'gtest.gypi',
],
'conditions': [
['disable_nacl==0 and disable_nacl_untrusted==0', {
'targets': [
{
'target_name': 'gtest_nacl',
'type': 'none',
'variables': {
'nlib_target': 'libgtest_nacl.a',
'build_glibc': 0,
'build_newlib': 1,
'build_pnacl_newlib': 0,
},
'sources': [
'<@(gtest_sources)',
],
'include_dirs': [
'gtest',
'gtest/include',
],
'defines': [
# In order to allow regex matches in gtest to be shared between
# Windows and other systems, we tell gtest to always use it's
# internal engine.
'GTEST_HAS_POSIX_RE=0',
'GTEST_LANG_CXX11=0',
# gtest isn't able to figure out when RTTI is disabled for gcc
# versions older than 4.3.2, and assumes it's enabled. Our Mac
# and Linux builds disable RTTI, and cannot guarantee that the
# compiler will be 4.3.2. or newer. The Mac, for example, uses
# 4.2.1 as that is the latest available on that platform. gtest
# must be instructed that RTTI is disabled here, and for any
# direct dependents that might include gtest headers.
'GTEST_HAS_RTTI=0',
],
'all_dependent_settings': {
'defines': [
'GTEST_HAS_POSIX_RE=0',
'GTEST_LANG_CXX11=0',
],
'link_flags': [
'-lgtest_nacl',
],
},
'direct_dependent_settings': {
'defines': [
'UNIT_TEST',
'GTEST_HAS_RTTI=0',
],
'include_dirs': [
'gtest/include', # So that gtest headers can find themselves.
],
},
},
{
'target_name': 'gtest_main_nacl',
'type': 'none',
'variables': {
'nlib_target': 'libgtest_main_nacl.a',
'build_glibc': 0,
'build_newlib': 1,
'build_pnacl_newlib': 0,
},
'dependencies': [
'gtest_nacl',
],
'sources': [
'gtest/src/gtest_main.cc',
],
'all_dependent_settings': {
'link_flags': [
'-lgtest_main_nacl',
],
},
},
],
}],
],
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment