[Bf-blender-cvs] [24ae7633ab6] temp-cxx-upgrade: Upgrade Google libraries

Sergey Sharybin noreply at git.blender.org
Thu Jun 18 13:24:58 CEST 2020


Commit: 24ae7633ab6239ff68d870fba83f25aa241b5027
Author: Sergey Sharybin
Date:   Thu Jun 18 13:23:12 2020 +0200
Branches: temp-cxx-upgrade
https://developer.blender.org/rB24ae7633ab6239ff68d870fba83f25aa241b5027

Upgrade Google libraries

Upgrades Glog from 0.3.5 to 0.4.0, and Gtest from 0.8.0 to 0.10.0.

Hopefully this will solve compilation error on MSVC with C++17.

===================================================================

M	extern/glog/AUTHORS
M	extern/glog/CMakeLists.txt
M	extern/glog/ChangeLog
M	extern/glog/README.blender
M	extern/glog/include/glog/logging.h
M	extern/glog/include/glog/raw_logging.h
M	extern/glog/src/config.h
M	extern/glog/src/config_mac.h
M	extern/glog/src/demangle.cc
M	extern/glog/src/logging.cc
M	extern/glog/src/raw_logging.cc
M	extern/glog/src/signalhandler.cc
M	extern/glog/src/stacktrace.h
A	extern/glog/src/stacktrace_windows-inl.h
M	extern/glog/src/stacktrace_x86-inl.h
M	extern/glog/src/symbolize.cc
M	extern/glog/src/symbolize.h
M	extern/glog/src/utilities.cc
M	extern/glog/src/utilities.h
M	extern/glog/src/vlog_is_on.cc
M	extern/glog/src/windows/glog/logging.h
M	extern/glog/src/windows/glog/raw_logging.h
M	extern/glog/src/windows/port.cc
M	extern/glog/src/windows/port.h
M	extern/glog/src/windows/preprocess.sh
D	extern/gmock/CHANGES
M	extern/gmock/CMakeLists.txt
M	extern/gmock/README.blender
M	extern/gmock/README.md
M	extern/gmock/include/gmock/gmock-actions.h
M	extern/gmock/include/gmock/gmock-cardinalities.h
A	extern/gmock/include/gmock/gmock-function-mocker.h
M	extern/gmock/include/gmock/gmock-generated-actions.h
M	extern/gmock/include/gmock/gmock-generated-function-mockers.h
M	extern/gmock/include/gmock/gmock-generated-matchers.h
D	extern/gmock/include/gmock/gmock-generated-nice-strict.h
M	extern/gmock/include/gmock/gmock-matchers.h
M	extern/gmock/include/gmock/gmock-more-actions.h
M	extern/gmock/include/gmock/gmock-more-matchers.h
A	extern/gmock/include/gmock/gmock-nice-strict.h
M	extern/gmock/include/gmock/gmock-spec-builders.h
M	extern/gmock/include/gmock/gmock.h
A	extern/gmock/include/gmock/internal/custom/README.md
M	extern/gmock/include/gmock/internal/custom/gmock-generated-actions.h
M	extern/gmock/include/gmock/internal/custom/gmock-matchers.h
M	extern/gmock/include/gmock/internal/custom/gmock-port.h
D	extern/gmock/include/gmock/internal/gmock-generated-internal-utils.h
M	extern/gmock/include/gmock/internal/gmock-internal-utils.h
M	extern/gmock/include/gmock/internal/gmock-port.h
A	extern/gmock/include/gmock/internal/gmock-pp.h
M	extern/gmock/src/gmock-all.cc
M	extern/gmock/src/gmock-cardinalities.cc
M	extern/gmock/src/gmock-internal-utils.cc
M	extern/gmock/src/gmock-matchers.cc
M	extern/gmock/src/gmock-spec-builders.cc
M	extern/gmock/src/gmock.cc
M	extern/gmock/src/gmock_main.cc
A	extern/gtest/CHANGES
M	extern/gtest/CMakeLists.txt
A	extern/gtest/CONTRIBUTORS
M	extern/gtest/README.blender
M	extern/gtest/README.md
M	extern/gtest/include/gtest/gtest-death-test.h
A	extern/gtest/include/gtest/gtest-matchers.h
M	extern/gtest/include/gtest/gtest-message.h
M	extern/gtest/include/gtest/gtest-param-test.h
M	extern/gtest/include/gtest/gtest-printers.h
M	extern/gtest/include/gtest/gtest-spi.h
M	extern/gtest/include/gtest/gtest-test-part.h
M	extern/gtest/include/gtest/gtest-typed-test.h
M	extern/gtest/include/gtest/gtest.h
M	extern/gtest/include/gtest/gtest_pred_impl.h
M	extern/gtest/include/gtest/gtest_prod.h
A	extern/gtest/include/gtest/internal/custom/README.md
M	extern/gtest/include/gtest/internal/custom/gtest-port.h
M	extern/gtest/include/gtest/internal/custom/gtest-printers.h
M	extern/gtest/include/gtest/internal/custom/gtest.h
M	extern/gtest/include/gtest/internal/gtest-death-test-internal.h
M	extern/gtest/include/gtest/internal/gtest-filepath.h
M	extern/gtest/include/gtest/internal/gtest-internal.h
D	extern/gtest/include/gtest/internal/gtest-linked_ptr.h
D	extern/gtest/include/gtest/internal/gtest-param-util-generated.h
M	extern/gtest/include/gtest/internal/gtest-param-util.h
M	extern/gtest/include/gtest/internal/gtest-port-arch.h
M	extern/gtest/include/gtest/internal/gtest-port.h
M	extern/gtest/include/gtest/internal/gtest-string.h
D	extern/gtest/include/gtest/internal/gtest-tuple.h
M	extern/gtest/include/gtest/internal/gtest-type-util.h
M	extern/gtest/src/gtest-all.cc
M	extern/gtest/src/gtest-death-test.cc
M	extern/gtest/src/gtest-filepath.cc
M	extern/gtest/src/gtest-internal-inl.h
A	extern/gtest/src/gtest-matchers.cc
M	extern/gtest/src/gtest-port.cc
M	extern/gtest/src/gtest-printers.cc
M	extern/gtest/src/gtest-test-part.cc
M	extern/gtest/src/gtest-typed-test.cc
M	extern/gtest/src/gtest.cc
M	extern/gtest/src/gtest_main.cc

===================================================================

diff --git a/extern/glog/AUTHORS b/extern/glog/AUTHORS
index 8e654101b7c..e5111cea7dd 100644
--- a/extern/glog/AUTHORS
+++ b/extern/glog/AUTHORS
@@ -10,6 +10,7 @@
 
 Abhishek Dasgupta <abhi2743 at gmail.com>
 Abhishek Parmar <abhishek at orng.net>
+Andrew Schwartzmeyer <andrew at schwartzmeyer.com>
 Andy Ying <andy at trailofbits.com>
 Brian Silverman <bsilver16384 at gmail.com>
 Google Inc.
@@ -17,6 +18,8 @@ Guillaume Dumont <dumont.guillaume at gmail.com>
 Michael Tanner <michael at tannertaxpro.com>
 MiniLight <MiniLightAR at Gmail.com>
 romange <romange at users.noreply.github.com>
+Roman Perepelitsa <roman.perepelitsa at gmail.com>
 Sergiu Deitsch <sergiu.deitsch at gmail.com>
 tbennun <tbennun at gmail.com>
 Teddy Reed <teddy at prosauce.org>
+Zhongming Qu <qzmfranklin at gmail.com>
diff --git a/extern/glog/CMakeLists.txt b/extern/glog/CMakeLists.txt
index bfe715d3463..14b6d6ca109 100644
--- a/extern/glog/CMakeLists.txt
+++ b/extern/glog/CMakeLists.txt
@@ -51,6 +51,7 @@ set(SRC
   src/stacktrace_powerpc-inl.h
   src/stacktrace_x86_64-inl.h
   src/stacktrace_x86-inl.h
+  src/stacktrace_windows-inl.h
 )
 
 set(LIB
diff --git a/extern/glog/ChangeLog b/extern/glog/ChangeLog
index d1b42484416..f8e43f8b39d 100644
--- a/extern/glog/ChangeLog
+++ b/extern/glog/ChangeLog
@@ -1,3 +1,18 @@
+2019-01-22  Google Inc. <opensource at google.com>
+
+	* google-glog: version 0.4.0.
+	* See git log for the details.
+
+2017-05-09  Google Inc. <opensource at google.com>
+
+	* google-glog: version 0.3.5
+	* See git log for the details.
+
+2015-03-09  Google Inc. <opensource at google.com>
+
+	* google-glog: version 0.3.4
+	* See git log for the details.
+
 2013-02-01  Google Inc. <opensource at google.com>
 
 	* google-glog: version 0.3.3
diff --git a/extern/glog/README.blender b/extern/glog/README.blender
index 38d5ff05c86..62cd065ef0f 100644
--- a/extern/glog/README.blender
+++ b/extern/glog/README.blender
@@ -1,7 +1,7 @@
 Project: Google Logging
 URL: https://github.com/google/glog
 License: New BSD
-Upstream version: 0.3.5, a6a166db069
+Upstream version: 0.4.0, 96a2f23dca4
 Local modifications:
 * Added per-platform config.h files so no configuration-time
   checks for functions and so are needed.
diff --git a/extern/glog/include/glog/logging.h b/extern/glog/include/glog/logging.h
index 8238ca9610f..7254b8dd62c 100644
--- a/extern/glog/include/glog/logging.h
+++ b/extern/glog/include/glog/logging.h
@@ -431,9 +431,15 @@ DECLARE_bool(stop_logging_if_full_disk);
 #define LOG_TO_STRING_FATAL(message) google::NullStreamFatal()
 #endif
 
+#if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
+#define DCHECK_IS_ON() 0
+#else
+#define DCHECK_IS_ON() 1
+#endif
+
 // For DFATAL, we want to use LogMessage (as opposed to
 // LogMessageFatal), to be consistent with the original behavior.
-#ifdef NDEBUG
+#if !DCHECK_IS_ON()
 #define COMPACT_GOOGLE_LOG_DFATAL COMPACT_GOOGLE_LOG_ERROR
 #elif GOOGLE_STRIP_LOG <= 3
 #define COMPACT_GOOGLE_LOG_DFATAL google::LogMessage( \
@@ -562,8 +568,10 @@ class LogSink;  // defined below
   LOG_TO_STRING_##severity(static_cast<std::vector<std::string>*>(outvec)).stream()
 
 #define LOG_IF(severity, condition) \
+  static_cast<void>(0),             \
   !(condition) ? (void) 0 : google::LogMessageVoidify() & LOG(severity)
 #define SYSLOG_IF(severity, condition) \
+  static_cast<void>(0),                \
   !(condition) ? (void) 0 : google::LogMessageVoidify() & SYSLOG(severity)
 
 #define LOG_ASSERT(condition)  \
@@ -572,7 +580,7 @@ class LogSink;  // defined below
   SYSLOG_IF(FATAL, !(condition)) << "Assert failed: " #condition
 
 // CHECK dies with a fatal error if condition is not true.  It is *not*
-// controlled by NDEBUG, so the check will be executed regardless of
+// controlled by DCHECK_IS_ON(), so the check will be executed regardless of
 // compilation mode.  Therefore, it is safe to do things like:
 //    CHECK(fp->Write(x) == 4)
 #define CHECK(condition)  \
@@ -644,7 +652,7 @@ void MakeCheckOpValueString(std::ostream* os, const unsigned char& v);
 // Build the error message string. Specify no inlining for code size.
 template <typename T1, typename T2>
 std::string* MakeCheckOpString(const T1& v1, const T2& v2, const char* exprtext)
-    __attribute__ ((noinline));
+    __attribute__((noinline));
 
 namespace base {
 namespace internal {
@@ -722,7 +730,7 @@ DEFINE_CHECK_OP_IMPL(Check_GT, > )
 #if defined(STATIC_ANALYSIS)
 // Only for static analysis tool to know that it is equivalent to assert
 #define CHECK_OP_LOG(name, op, val1, val2, log) CHECK((val1) op (val2))
-#elif !defined(NDEBUG)
+#elif DCHECK_IS_ON()
 // In debug mode, avoid constructing CheckOpStrings if possible,
 // to reduce the overhead of CHECK statments by 2x.
 // Real DCHECK-heavy tests have seen 1.5x speedups.
@@ -751,7 +759,7 @@ typedef std::string _Check_string;
              google::GetReferenceableValue(val2),        \
              #val1 " " #op " " #val2))                                  \
     log(__FILE__, __LINE__, _result).stream()
-#endif  // STATIC_ANALYSIS, !NDEBUG
+#endif  // STATIC_ANALYSIS, DCHECK_IS_ON()
 
 #if GOOGLE_STRIP_LOG <= 3
 #define CHECK_OP(name, op, val1, val2) \
@@ -853,6 +861,7 @@ DECLARE_CHECK_STROP_IMPL(strcasecmp, false)
       &google::LogMessage::SendToLog)
 
 #define PLOG_IF(severity, condition) \
+  static_cast<void>(0),              \
   !(condition) ? (void) 0 : google::LogMessageVoidify() & PLOG(severity)
 
 // A CHECK() macro that postpends errno if the condition is false. E.g.
@@ -925,16 +934,11 @@ struct CompileAssert {
 struct CrashReason;
 
 // Returns true if FailureSignalHandler is installed.
-bool IsFailureSignalHandlerInstalled();
+// Needs to be exported since it's used by the signalhandler_unittest.
+GOOGLE_GLOG_DLL_DECL bool IsFailureSignalHandlerInstalled();
 }  // namespace glog_internal_namespace_
 
-#define GOOGLE_GLOG_COMPILE_ASSERT(expr, msg) \
-  typedef google::glog_internal_namespace_::CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]
-
 #define LOG_EVERY_N(severity, n)                                        \
-  GOOGLE_GLOG_COMPILE_ASSERT(google::GLOG_ ## severity < \
-                             google::NUM_SEVERITIES,     \
-                             INVALID_REQUESTED_LOG_SEVERITY);           \
   SOME_KIND_OF_LOG_EVERY_N(severity, (n), google::LogMessage::SendToLog)
 
 #define SYSLOG_EVERY_N(severity, n) \
@@ -976,7 +980,7 @@ const LogSeverity GLOG_0 = GLOG_ERROR;
 
 // Plus some debug-logging macros that get compiled to nothing for production
 
-#ifndef NDEBUG
+#if DCHECK_IS_ON()
 
 #define DLOG(severity) LOG(severity)
 #define DVLOG(verboselevel) VLOG(verboselevel)
@@ -986,7 +990,7 @@ const LogSeverity GLOG_0 = GLOG_ERROR;
   LOG_IF_EVERY_N(severity, condition, n)
 #define DLOG_ASSERT(condition) LOG_ASSERT(condition)
 
-// debug-only checking.  not executed in NDEBUG mode.
+// debug-only checking.  executed if DCHECK_IS_ON().
 #define DCHECK(condition) CHECK(condition)
 #define DCHECK_EQ(val1, val2) CHECK_EQ(val1, val2)
 #define DCHECK_NE(val1, val2) CHECK_NE(val1, val2)
@@ -1000,25 +1004,31 @@ const LogSeverity GLOG_0 = GLOG_ERROR;
 #define DCHECK_STRNE(str1, str2) CHECK_STRNE(str1, str2)
 #define DCHECK_STRCASENE(str1, str2) CHECK_STRCASENE(str1, str2)
 
-#else  // NDEBUG
+#else  // !DCHECK_IS_ON()
 
-#define DLOG(severity) \
+#define DLOG(severity)  \
+  static_cast<void>(0), \
   true ? (void) 0 : google::LogMessageVoidify() & LOG(severity)
 
-#define DVLOG(verboselevel) \
-  (true || !VLOG_IS_ON(verboselevel)) ?\
-    (void) 0 : google::LogMessageVoidify() & LOG(INFO)
+#define DVLOG(verboselevel)             \
+  static_cast<void>(0),                 \
+  (true || !VLOG_IS_ON(verboselevel)) ? \
+      (void) 0 : google::LogMessageVoidify() & LOG(INFO)
 
 #define DLOG_IF(severity, condition) \
+  static_cast<void>(0),              \
   (true || !(condition)) ? (void) 0 : google::LogMessageVoidify() & LOG(severity)
 
 #define DLOG_EVERY_N(severity, n) \
+  static_cast<void>(0),           \
   true ? (void) 0 : google::LogMessageVoidify() & LOG(severity)
 
 #define DLOG_IF_EVERY_N(severity, condition, n) \
+  static_cast<void>(0),                         \
   (true || !(condition))? (void) 0 : google::LogMessageVoidify() & LOG(severity)
 
 #define DLOG_ASSERT(condition) \
+  static_cast<void>(0),        \
   true ? (void) 0 : LOG_ASSERT(condition)
 
 // MSVC warning C4127: conditional expression is constant
@@ -1081,7 +1091,7 @@ const LogSeverity GLOG_0 = GLOG_ERROR;
   while (false) \
     GLOG_MSVC_POP_WARNING() CHECK_STRCASENE(str1, str2)
 
-#endif  // NDEBUG
+#endif  // DCHECK_IS_ON()
 
 // Log only in verbose mode.
 
@@ -1103,10 +1113,11 @@ namespace base_logging {
 // buffer to allow for a '\n' and '\0'.
 class GOOGLE_GLOG_DLL_DECL LogStreamBuf : public std::streambuf {
  public:
-  // REQUIREMENTS: "len" must be >= 2 to account for the '\n' and '\n'.
+  // REQUIREMENTS: "len" must be >= 2 to account for the '\n' and '\0'.
   LogStreamBuf(char *buf, int len) {
     setp(buf, buf + len - 2);
   }
+
   // This effectively ignores overflow.
   virtual int_type overflow(int_type ch) {
     return ch;
@@ -1145,13 +1156,9 @@ public:
   // 2005 if you are deriving from a type in the Standard C++ Library"
   // http://msdn.microsoft.com/en-us/library/3tdb471s(VS.80).aspx
   // Let's just ignore the warning.
-#ifdef _MSC_VER
-# pragma warning(disable: 4275)
-#endif
+GLOG_MSVC_PUSH_DISABLE_WARNING(4275)
   class GOOGLE_GLOG_DLL_DECL LogStream : public std::ostream {
-#ifdef _MSC_VER
-# pragma warning(default: 4275)
-#endif
+GLOG_MSVC_POP_WARNING()
   public:
     LogStream(char *buf, int len, int ctr)
         : std::ostream(NULL),
@@ -1240,7 +1247,7 @@ public:
   void SendToSyslogAndLog();  // Actually dispatch to syslog and the logs
 
   // Call abort() or similar to perform LOG(FATAL) crash.
-  static void __attribute__ ((noreturn)) Fail();
+  static void __attribute__((noreturn)) Fail();
 
   std::ostream& stream();
 
@@ -1288,7 +1295,7 @@ class GOOGLE_GLOG_DLL_DECL LogMessageFatal : public LogMessage {
  public:
   LogMessageFatal(const char* file, int line);
   LogMessageFatal(const char* file, int line, const CheckOpString& result);
-  __attribute__ ((noreturn)) ~LogMessageFatal();
+  __attribute__((noreturn)) ~LogMessageFatal();
 };


@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list