You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by di...@apache.org on 2019/07/30 09:39:02 UTC

[rocketmq-ons-cpp] 35/35: As default, close dual abi

This is an automated email from the ASF dual-hosted git repository.

dinglei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-ons-cpp.git

commit 02ea69fa6a6934d3db36194260f9b1b14b4c2216
Author: ShannonDing <li...@163.com>
AuthorDate: Mon Jul 29 20:54:43 2019 +0800

    As default, close dual abi
---
 src/main/cpp/demos/CMakeLists.Release | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/main/cpp/demos/CMakeLists.Release b/src/main/cpp/demos/CMakeLists.Release
index fd7ff83..73d55a7 100644
--- a/src/main/cpp/demos/CMakeLists.Release
+++ b/src/main/cpp/demos/CMakeLists.Release
@@ -4,6 +4,18 @@ set(PROJECT_NAME_DEMO rocketmq-ons-cpp-demo)
 project(${PROJECT_NAME_DEMO} VERSION 1.0
         LANGUAGES C CXX)
 set(CMAKE_CXX_STANDARD 11)
+
+if (CONAN_LIBCXX STREQUAL "libstdc++11")
+    message("-- Detect libstdc++11,Using -D_GLIBCXX_USE_CXX11_ABI=1")
+    add_definitions(-D_GLIBCXX_USE_CXX11_ABI=1)
+elseif (CONAN_LIBCXX STREQUAL "libstdc++")
+    message("-- Detect libstdc++, Using -D_GLIBCXX_USE_CXX11_ABI=0")
+    add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
+else ()
+    message("-- As Default, Will not open Dual ABI.")
+    add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0
+endif ()
+
 include_directories(../include)
 
 find_library(ROCKETMQ_CLIENT_CORE