You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by li...@apache.org on 2022/07/28 10:08:39 UTC

[rocketmq-clients] branch cpp_dev updated (24bc2ce -> 4fddbba)

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

lizhanhui pushed a change to branch cpp_dev
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git


    omit 24bc2ce  Retry ack/nack/forward-to-dlq of messages unless the lifecycle completes: success or receipt-handle becomes invalid
    omit 5538179  Delete unused files from opencensus
    omit e78c54c  Make client-id unique in case container clients retart
     add a4718c8  Retry ack/nack/forward-to-dlq of messages unless the lifecycle completes: success or receipt-handle becomes invalid (#82)
     new 4fddbba  Verify compile using CMake on Ubuntu

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (24bc2ce)
            \
             N -- N -- N   refs/heads/cpp_dev (4fddbba)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 cpp/CMakeLists.txt          |  1 +
 cpp/README.md               | 51 ++++++++++++++++++++++++++++++++++++++++-----
 cpp/examples/CMakeLists.txt |  2 +-
 3 files changed, 48 insertions(+), 6 deletions(-)


[rocketmq-clients] 01/01: Verify compile using CMake on Ubuntu

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lizhanhui pushed a commit to branch cpp_dev
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git

commit 4fddbba985c297dc20a514df1057cfe896330ffd
Author: Li Zhanhui <li...@gmail.com>
AuthorDate: Thu Jul 28 18:06:27 2022 +0800

    Verify compile using CMake on Ubuntu
---
 cpp/CMakeLists.txt          |  1 +
 cpp/README.md               | 51 ++++++++++++++++++++++++++++++++++++++++-----
 cpp/examples/CMakeLists.txt |  2 +-
 3 files changed, 48 insertions(+), 6 deletions(-)

diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 031130c..374466e 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -29,5 +29,6 @@ if (BUILD_EXAMPLES)
     # Assume gflags is install in $HOME/gflags
     list(APPEND CMAKE_PREFIX_PATH $ENV{HOME}/gflags)
     find_package(gflags REQUIRED)
+    find_package(ZLIB REQUIRED)
     add_subdirectory(examples)
 endif ()
\ No newline at end of file
diff --git a/cpp/README.md b/cpp/README.md
index a0a04c4..8b7796b 100644
--- a/cpp/README.md
+++ b/cpp/README.md
@@ -65,11 +65,52 @@ if "com_google_googletest" not in native.existing_rules():
 
 2. Following [gRPC installation instructions](https://grpc.io/docs/languages/cpp/quickstart/) to install grpc.
 
-   Note: Remember to `export MY_INSTALL_DIR=$HOME/grpc` as our primary CMakeLists.txt hints 
-   ```cmake
-   list(APPEND CMAKE_PREFIX_PATH $ENV{HOME}/grpc)
-   ```
-   If your grpc is installed somewhere else yet non-standard, please adjust accordingly.
+   Note: 
+      * Remember to `export MY_INSTALL_DIR=$HOME/grpc` as our primary CMakeLists.txt hints 
+
+         ```cmake
+         list(APPEND CMAKE_PREFIX_PATH $ENV{HOME}/grpc)
+         ```
+         If your grpc is installed somewhere else yet non-standard, please adjust accordingly.
+
+      * When configure grpc, use your pre-installed system package if possible; 
+         ```shell
+         cmake -DCMAKE_INSTALL_PREFIX=$HOME/grpc -DgRPC_SSL_PROVIDER=package -DgRPC_ZLIB_PROVIDER=package
+         ```
+         A few more options are involved. Check CMakeLists.txt of grpc
+         ```cmake
+         # Providers for third-party dependencies (gRPC_*_PROVIDER properties):
+         # "module": build the dependency using sources from git submodule (under third_party)
+         # "package": use cmake's find_package functionality to locate a pre-installed dependency
+
+         set(gRPC_ZLIB_PROVIDER "module" CACHE STRING "Provider of zlib library")
+         set_property(CACHE gRPC_ZLIB_PROVIDER PROPERTY STRINGS "module" "package")
+
+         set(gRPC_CARES_PROVIDER "module" CACHE STRING "Provider of c-ares library")
+         set_property(CACHE gRPC_CARES_PROVIDER PROPERTY STRINGS "module" "package")
+
+         set(gRPC_RE2_PROVIDER "module" CACHE STRING "Provider of re2 library")
+         set_property(CACHE gRPC_RE2_PROVIDER PROPERTY STRINGS "module" "package")
+
+         set(gRPC_SSL_PROVIDER "module" CACHE STRING "Provider of ssl library")
+         set_property(CACHE gRPC_SSL_PROVIDER PROPERTY STRINGS "module" "package")
+
+         set(gRPC_PROTOBUF_PROVIDER "module" CACHE STRING "Provider of protobuf library")
+         set_property(CACHE gRPC_PROTOBUF_PROVIDER PROPERTY STRINGS "module" "package")
+
+         set(gRPC_PROTOBUF_PACKAGE_TYPE "" CACHE STRING "Algorithm for searching protobuf package")
+         set_property(CACHE gRPC_PROTOBUF_PACKAGE_TYPE PROPERTY STRINGS "CONFIG" "MODULE")
+
+         if(gRPC_BUILD_TESTS)
+         set(gRPC_BENCHMARK_PROVIDER "module" CACHE STRING "Provider of benchmark library")
+         set_property(CACHE gRPC_BENCHMARK_PROVIDER PROPERTY STRINGS "module" "package")
+         else()
+         set(gRPC_BENCHMARK_PROVIDER "none")
+         endif()
+
+         set(gRPC_ABSL_PROVIDER "module" CACHE STRING "Provider of absl library")
+         set_property(CACHE gRPC_ABSL_PROVIDER PROPERTY STRINGS "module" "package")
+         ```
 
 3. Example programs uses [gflags](https://github.com/gflags/gflags) to parse command arguments. Please install it to $HOME/gflags
    as CMakeLists.txt has the following find package statements
diff --git a/cpp/examples/CMakeLists.txt b/cpp/examples/CMakeLists.txt
index b19c65e..8d6b039 100644
--- a/cpp/examples/CMakeLists.txt
+++ b/cpp/examples/CMakeLists.txt
@@ -1,6 +1,6 @@
 function(add_example name file)
     add_executable(${name} ${file})
-    target_link_libraries(${name} PRIVATE api gflags rocketmq)
+    target_link_libraries(${name} PRIVATE api gflags ZLIB::ZLIB rocketmq)
 endfunction()
 
 add_example(example_producer ExampleProducer.cpp)