Fixing up gtest to work with scons (better!)
This commit is contained in:
parent
47ca68760a
commit
301a7fa525
5 changed files with 14 additions and 4 deletions
|
@ -72,7 +72,7 @@
|
||||||
// prevent a user from accidentally including gtest-internal-inl.h in
|
// prevent a user from accidentally including gtest-internal-inl.h in
|
||||||
// his code.
|
// his code.
|
||||||
#define GTEST_IMPLEMENTATION_ 1
|
#define GTEST_IMPLEMENTATION_ 1
|
||||||
#include "src/gtest-internal-inl.h"
|
#include "gtest-internal-inl.h"
|
||||||
#undef GTEST_IMPLEMENTATION_
|
#undef GTEST_IMPLEMENTATION_
|
||||||
|
|
||||||
namespace testing {
|
namespace testing {
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
// prevent a user from accidentally including gtest-internal-inl.h in
|
// prevent a user from accidentally including gtest-internal-inl.h in
|
||||||
// his code.
|
// his code.
|
||||||
#define GTEST_IMPLEMENTATION_ 1
|
#define GTEST_IMPLEMENTATION_ 1
|
||||||
#include "src/gtest-internal-inl.h"
|
#include "gtest-internal-inl.h"
|
||||||
#undef GTEST_IMPLEMENTATION_
|
#undef GTEST_IMPLEMENTATION_
|
||||||
|
|
||||||
namespace testing {
|
namespace testing {
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
// prevent a user from accidentally including gtest-internal-inl.h in
|
// prevent a user from accidentally including gtest-internal-inl.h in
|
||||||
// his code.
|
// his code.
|
||||||
#define GTEST_IMPLEMENTATION_ 1
|
#define GTEST_IMPLEMENTATION_ 1
|
||||||
#include "src/gtest-internal-inl.h"
|
#include "gtest-internal-inl.h"
|
||||||
#undef GTEST_IMPLEMENTATION_
|
#undef GTEST_IMPLEMENTATION_
|
||||||
|
|
||||||
namespace testing {
|
namespace testing {
|
||||||
|
|
|
@ -132,7 +132,7 @@
|
||||||
// prevent a user from accidentally including gtest-internal-inl.h in
|
// prevent a user from accidentally including gtest-internal-inl.h in
|
||||||
// his code.
|
// his code.
|
||||||
#define GTEST_IMPLEMENTATION_ 1
|
#define GTEST_IMPLEMENTATION_ 1
|
||||||
#include "src/gtest-internal-inl.h"
|
#include "gtest-internal-inl.h"
|
||||||
#undef GTEST_IMPLEMENTATION_
|
#undef GTEST_IMPLEMENTATION_
|
||||||
|
|
||||||
#if GTEST_OS_WINDOWS
|
#if GTEST_OS_WINDOWS
|
||||||
|
@ -366,9 +366,14 @@ void AssertHelper::operator=(const Message& message) const {
|
||||||
); // NOLINT
|
); // NOLINT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
|
||||||
|
|
||||||
// Mutex for linked pointers.
|
// Mutex for linked pointers.
|
||||||
GTEST_API_ GTEST_DEFINE_STATIC_MUTEX_(g_linked_ptr_mutex);
|
GTEST_API_ GTEST_DEFINE_STATIC_MUTEX_(g_linked_ptr_mutex);
|
||||||
|
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
// Application pathname gotten in InitGoogleTest.
|
// Application pathname gotten in InitGoogleTest.
|
||||||
std::string g_executable_path;
|
std::string g_executable_path;
|
||||||
|
|
||||||
|
|
|
@ -1380,6 +1380,9 @@ class MutexBase {
|
||||||
# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
|
# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
|
||||||
extern ::testing::internal::MutexBase mutex
|
extern ::testing::internal::MutexBase mutex
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
|
||||||
|
|
||||||
// Defines and statically (i.e. at link time) initializes a static mutex.
|
// Defines and statically (i.e. at link time) initializes a static mutex.
|
||||||
// The initialization list here does not explicitly initialize each field,
|
// The initialization list here does not explicitly initialize each field,
|
||||||
// instead relying on default initialization for the unspecified fields. In
|
// instead relying on default initialization for the unspecified fields. In
|
||||||
|
@ -1389,6 +1392,8 @@ class MutexBase {
|
||||||
# define GTEST_DEFINE_STATIC_MUTEX_(mutex) \
|
# define GTEST_DEFINE_STATIC_MUTEX_(mutex) \
|
||||||
::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, false }
|
::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, false }
|
||||||
|
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
// The Mutex class can only be used for mutexes created at runtime. It
|
// The Mutex class can only be used for mutexes created at runtime. It
|
||||||
// shares its API with MutexBase otherwise.
|
// shares its API with MutexBase otherwise.
|
||||||
class Mutex : public MutexBase {
|
class Mutex : public MutexBase {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue