Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey@blender.org>2021-07-29 15:27:26 +0300
committerSergey Sharybin <sergey@blender.org>2021-07-29 15:32:10 +0300
commit810c88b5f138af9df1096dcf64f277fc3f91b5d3 (patch)
treedc30d1cb84f3f843140e548c4060c8a2554c8d8d /intern/cycles
parent3f84f0123ebe09791677db235b2474d55c72c974 (diff)
Fix building without Cycles logging
Ideally can use assert() checks instead of suppressing the check entirely, but for now just fix compilation error quickly.
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/util/util_logging.cpp6
-rw-r--r--intern/cycles/util/util_logging.h32
2 files changed, 33 insertions, 5 deletions
diff --git a/intern/cycles/util/util_logging.cpp b/intern/cycles/util/util_logging.cpp
index 3782187d78c..8272728a7a0 100644
--- a/intern/cycles/util/util_logging.cpp
+++ b/intern/cycles/util/util_logging.cpp
@@ -26,9 +26,9 @@
CCL_NAMESPACE_BEGIN
+#ifdef WITH_CYCLES_LOGGING
static bool is_verbosity_set()
{
-#ifdef WITH_CYCLES_LOGGING
using CYCLES_GFLAGS_NAMESPACE::GetCommandLineOption;
std::string verbosity;
@@ -36,10 +36,8 @@ static bool is_verbosity_set()
return false;
}
return verbosity != "0";
-#else
- return false;
-#endif
}
+#endif
void util_logging_init(const char *argv0)
{
diff --git a/intern/cycles/util/util_logging.h b/intern/cycles/util/util_logging.h
index 3e56f0a0193..c161299acd0 100644
--- a/intern/cycles/util/util_logging.h
+++ b/intern/cycles/util/util_logging.h
@@ -40,7 +40,7 @@ class LogMessageVoidify {
LogMessageVoidify()
{
}
- void operator&(StubStream &)
+ void operator&(const StubStream &)
{
}
};
@@ -49,6 +49,36 @@ class LogMessageVoidify {
# define LOG(severity) LOG_SUPPRESS()
# define VLOG(severity) LOG_SUPPRESS()
# define VLOG_IF(severity, condition) LOG_SUPPRESS()
+
+# define CHECK(expression) LOG_SUPPRESS()
+
+# define CHECK_NOTNULL(expression) LOG_SUPPRESS()
+# define CHECK_NULL(expression) LOG_SUPPRESS()
+
+# define CHECK_NEAR(actual, expected, eps) LOG_SUPPRESS()
+
+# define CHECK_GE(a, b) LOG_SUPPRESS()
+# define CHECK_NE(a, b) LOG_SUPPRESS()
+# define CHECK_EQ(a, b) LOG_SUPPRESS()
+# define CHECK_GT(a, b) LOG_SUPPRESS()
+# define CHECK_LT(a, b) LOG_SUPPRESS()
+# define CHECK_LE(a, b) LOG_SUPPRESS()
+
+# define DCHECK(expression) LOG_SUPPRESS()
+
+# define DCHECK_NOTNULL(expression) LOG_SUPPRESS()
+# define DCHECK_NULL(expression) LOG_SUPPRESS()
+
+# define DCHECK_NEAR(actual, expected, eps) LOG_SUPPRESS()
+
+# define DCHECK_GE(a, b) LOG_SUPPRESS()
+# define DCHECK_NE(a, b) LOG_SUPPRESS()
+# define DCHECK_EQ(a, b) LOG_SUPPRESS()
+# define DCHECK_GT(a, b) LOG_SUPPRESS()
+# define DCHECK_LT(a, b) LOG_SUPPRESS()
+# define DCHECK_LE(a, b) LOG_SUPPRESS()
+
+# define LOG_ASSERT(expression) LOG_SUPPRESS()
#endif
#define VLOG_ONCE(level, flag) \