Skip to content

Commit

Permalink
Silence build warnings when building rabbitmq example (nv-morpheus#658)
Browse files Browse the repository at this point in the history
* Track recent commit for rabbitmq, which resolved warnings coming from cmake. Unfortunately these fixes are unreleased (alanxz/rabbitmq-c#740) 
* Silence warnings coming from SimpleAmqpClient

fixes nv-morpheus#471

Authors:
  - David Gardner (https://github.com/dagardner-nv)

Approvers:
  - Devin Robison (https://github.com/drobison00)
  - Michael Demoret (https://github.com/mdemoret-nv)

URL: nv-morpheus#658
  • Loading branch information
dagardner-nv authored and jjacobelli committed Mar 7, 2023
1 parent 0f75b91 commit 49c3a22
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,18 @@ function(find_and_configure_SimpleAmqpClient version)
GIT_REPOSITORY https://github.com/alanxz/SimpleAmqpClient
GIT_TAG "v${version}"
GIT_SHALLOW TRUE
OPTIONS "Rabbitmqc_INCLUDE_DIR ${rabbitmq_SOURCE_DIR}/librabbitmq"
OPTIONS "Rabbitmqc_INCLUDE_DIR ${rabbitmq_SOURCE_DIR}/include"
"Rabbitmqc_LIBRARY ${rabbitmq_BINARY_DIR}/librabbitmq/librabbitmq.so"
"BUILD_API_DOCS OFF"
"BUILD_SHARED_LIBS OFF"
)

# Needed to pick up the generated export.h
target_include_directories(SimpleAmqpClient PUBLIC "${rabbitmq_BINARY_DIR}/include")

# Suppress #warning deprecation messages from rabbitmq
target_compile_options(SimpleAmqpClient PRIVATE -Wno-cpp)

endfunction()

find_and_configure_SimpleAmqpClient(${SIMPLE_AMQP_CLIENT_VERSION})
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ function(find_and_configure_rabbitmq version)

list(APPEND CMAKE_MESSAGE_CONTEXT "rabbitmq")

# Commit 7fa7b0b contains unreleased cmake fixes which currently only exist in the master branch of the repo.
# https://github.com/alanxz/rabbitmq-c/issues/740

rapids_cpm_find(rabbitmq ${version}
GLOBAL_TARGETS
rabbitmq rabbitmq::rabbitmq
Expand All @@ -28,7 +31,7 @@ function(find_and_configure_rabbitmq version)
${PROJECT_NAME}-exports
CPM_ARGS
GIT_REPOSITORY https://github.com/alanxz/rabbitmq-c
GIT_TAG "v${version}"
GIT_TAG 7fa7b0b
GIT_SHALLOW TRUE
OPTIONS "BUILD_EXAMPLES OFF"
"BUILD_TESTING OFF"
Expand Down

0 comments on commit 49c3a22

Please sign in to comment.