This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
new b06177977d [fix](status) fix cmake warning with message
'Manually-specified variables were not used by the project:ENABLE_STACKTRACE'
(#21932)
b06177977d is described below
commit b06177977d8735844c357903436682d9f8d6b54e
Author: caiconghui <[email protected]>
AuthorDate: Tue Jul 18 18:25:50 2023 +0800
[fix](status) fix cmake warning with message 'Manually-specified variables
were not used by the project:ENABLE_STACKTRACE' (#21932)
Co-authored-by: caiconghui1 <[email protected]>
---
be/CMakeLists.txt | 4 ++++
be/src/common/status.h | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index 9307e018f0..09f607b80a 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -531,6 +531,10 @@ if (USE_JEMALLOC)
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -DUSE_JEMALLOC")
endif()
+if (ENABLE_STACKTRACE)
+ add_compile_options(-DENABLE_STACKTRACE)
+endif()
+
# STRICT_MEMORY_USE=ON` expects BE to use less memory, and gives priority to
ensuring stability
# when the cluster memory is limited.
# TODO In the future, expect a dynamic soft memory limit, combined with
real-time memory usage of the cluster,
diff --git a/be/src/common/status.h b/be/src/common/status.h
index cefc8d6402..6f49de3ec2 100644
--- a/be/src/common/status.h
+++ b/be/src/common/status.h
@@ -470,8 +470,8 @@ inline std::ostream& operator<<(std::ostream& ostr, const
Status& status) {
ostr << '[' << status.code_as_string() << ']';
ostr << (status._err_msg ? status._err_msg->_msg : "");
#ifdef ENABLE_STACKTRACE
- if (status->_err_msg && !status->_err_msg._stack.empty()) {
- ostr << '\n' << status->_err_msg._stack;
+ if (status._err_msg && !status._err_msg->_stack.empty()) {
+ ostr << '\n' << status._err_msg->_stack;
}
#endif
return ostr;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]