Enable C++11 in gtest
Change-Id: I2860a34eee12bc2bdb584cc89c871da0ffb127ff
This commit is contained in:
parent
eb98a87f7d
commit
cc92cca6b9
|
@ -30,6 +30,7 @@
|
|||
'gmock/src/gmock-matchers.cc',
|
||||
'gmock/src/gmock-spec-builders.cc',
|
||||
'gmock/src/gmock.cc',
|
||||
"gmock_custom/gmock/internal/custom/gmock-port.h",
|
||||
'gmock_mutant.h', # gMock helpers
|
||||
],
|
||||
'sources!': [
|
||||
|
@ -37,11 +38,13 @@
|
|||
],
|
||||
'include_dirs': [
|
||||
'gmock',
|
||||
'gmock_custom',
|
||||
'gmock/include',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'gmock/include', # So that gmock headers can find themselves.
|
||||
'gmock_custom',
|
||||
'gmock/include', # Allow #include <gmock/gmock.h>
|
||||
],
|
||||
},
|
||||
'export_dependent_settings': [
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
// Copyright 2017 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
#ifndef PACKAGER_TESTING_GMOCK_CUSTOM_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_
|
||||
#define PACKAGER_TESTING_GMOCK_CUSTOM_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace std {
|
||||
|
||||
// Provide alternative implementation of std::is_default_constructible for
|
||||
// old, pre-4.7 of libstdc++, where is_default_constructible is missing.
|
||||
// <20120322 below implies pre-4.7.0. In addition we blacklist several version
|
||||
// that released after 4.7.0 from pre-4.7.0 branch. 20120702 implies 4.5.4, and
|
||||
// 20121127 implies 4.6.4.
|
||||
#if defined(__GLIBCXX__) && \
|
||||
(__GLIBCXX__ < 20120322 || __GLIBCXX__ == 20120702 || \
|
||||
__GLIBCXX__ == 20121127)
|
||||
template <typename T>
|
||||
using is_default_constructible = std::is_constructible<T>;
|
||||
#endif
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif // PACKAGER_TESTING_GMOCK_CUSTOM_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_
|
|
@ -25,13 +25,12 @@
|
|||
# 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',
|
||||
# Chrome doesn't support / require C++11, yet.
|
||||
'GTEST_LANG_CXX11=0',
|
||||
'GTEST_LANG_CXX11=1',
|
||||
],
|
||||
'all_dependent_settings': {
|
||||
'defines': [
|
||||
'GTEST_HAS_POSIX_RE=0',
|
||||
'GTEST_LANG_CXX11=0',
|
||||
'GTEST_LANG_CXX11=1',
|
||||
],
|
||||
},
|
||||
'conditions': [
|
||||
|
|
Loading…
Reference in New Issue