This is an automated email from the ASF dual-hosted git repository.
charleli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new eac33d36e [INLONG-5138][Bug][TubeMQ] compile error with gcc >= 8.0 on
rapidjson (#5151)
eac33d36e is described below
commit eac33d36e6733f8bf2c1f1082afd531b9408d825
Author: Goson Zhang <[email protected]>
AuthorDate: Thu Jul 21 09:43:12 2022 +0800
[INLONG-5138][Bug][TubeMQ] compile error with gcc >= 8.0 on rapidjson
(#5151)
---
inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/CMakeLists.txt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/CMakeLists.txt
b/inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/CMakeLists.txt
index 2746426a6..e9eb76114 100644
--- a/inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/CMakeLists.txt
+++ b/inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/CMakeLists.txt
@@ -24,7 +24,11 @@ project (TubeMQ)
find_package(Protobuf REQUIRED)
-SET(CMAKE_CXX_FLAGS "-std=c++11 -O2 -g -Wall -Werror
-Wno-error=class-memaccess -Wsign-compare -Wfloat-equal -fno-strict-aliasing
-fPIC -DASIO_STANDALONE")
+if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0.0)
+ SET(CMAKE_CXX_FLAGS "-std=c++11 -O2 -g -Wall -Werror -Wsign-compare
-Wfloat-equal -fno-strict-aliasing -fPIC -DASIO_STANDALONE")
+else ()
+ SET(CMAKE_CXX_FLAGS "-std=c++11 -O2 -g -Wall -Werror
-Wno-error=class-memaccess -Wsign-compare -Wfloat-equal -fno-strict-aliasing
-fPIC -DASIO_STANDALONE")
+endif ()
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/proto)