Skip to content

Commit

Permalink
build: fix gtest build for C++17
Browse files Browse the repository at this point in the history
* Remove use of `tr1` namespace
* Sync file list
  • Loading branch information
refack committed Apr 11, 2019
1 parent 2d25fcf commit 380d1a6
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 6 deletions.
37 changes: 34 additions & 3 deletions deps/gtest/gtest.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,22 @@
{
'target_name': 'gtest',
'type': 'static_library',
'cflags': ['-Wno-missing-field-initializers'],
'cflags': [
'-Wno-missing-field-initializers',
],
'direct_dependent_settings': {
'include_dirs': ['include'],
'include_dirs': [
'include',
],
},
'include_dirs': ['.', 'include'],
'defines': [
'GTEST_LANG_CXX11=1',
'GTEST_HAS_TR1_TUPLE=0',
],
'include_dirs': [
'.',
'include',
],
'sources': [
'src/gtest-death-test.cc',
'src/gtest-filepath.cc',
Expand All @@ -18,6 +29,26 @@
'src/gtest-typed-test.cc',
'src/gtest.cc',
'src/gtest_main.cc',
'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.h',
'include/gtest/internal/gtest-param-util-generated.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',
'include/gtest/gtest.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_pred_impl.h',
'include/gtest/gtest_prod.h',
],
}
],
Expand Down
14 changes: 11 additions & 3 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -826,20 +826,28 @@
'deps/uv/include',
],

'defines': [ 'NODE_WANT_INTERNALS=1' ],
'defines': [
'NODE_WANT_INTERNALS=1',
'GTEST_LANG_CXX11=1',
'GTEST_HAS_TR1_TUPLE=0',
],

'sources': [
'test/cctest/node_test_fixture.cc',
'test/cctest/test_aliased_buffer.cc',
'test/cctest/test_base64.cc',
'test/cctest/test_node_postmortem_metadata.cc',
'test/cctest/test_environment.cc',
# Listed here for completeness. Actual inclusion is conditional.
# 'test/cctest/test_inspector_socket.cc',
# 'test/cctest/test_inspector_socket_server.cc',
'test/cctest/test_linked_binding.cc',
'test/cctest/test_node_postmortem_metadata.cc',
'test/cctest/test_platform.cc',
'test/cctest/test_report_util.cc',
'test/cctest/test_traced_value.cc',
'test/cctest/test_url.cc',
'test/cctest/test_util.cc',
'test/cctest/test_url.cc'
'test/cctest/node_test_fixture.h',
],

'conditions': [
Expand Down

0 comments on commit 380d1a6

Please sign in to comment.