This is an automated email from the ASF dual-hosted git repository. asf-gitbox-commits pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
commit d2d4b5ccdd344f1e7dbb92d82636e43dac500934 Author: Andrew Stitcher <[email protected]> AuthorDate: Thu Aug 13 13:55:13 2026 -0400 NO-JIRA: Fix/silence ruby configure and build time warnings --- ruby/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ruby/CMakeLists.txt b/ruby/CMakeLists.txt index 33a5395dc..79fddfe6d 100644 --- a/ruby/CMakeLists.txt +++ b/ruby/CMakeLists.txt @@ -35,7 +35,7 @@ set(SWIG_OUTFILE_DIR "${CMAKE_CURRENT_BINARY_DIR}") include_directories(${PN_C_INCLUDE_DIR} ${RUBY_INCLUDE_PATH}) swig_add_library(cproton-ruby LANGUAGE ruby SOURCES cproton.i) -swig_link_libraries(cproton-ruby ${BINDING_DEPS_FULL} ${RUBY_LIBRARY}) +target_link_libraries(cproton-ruby PRIVATE ${BINDING_DEPS_FULL} ${RUBY_LIBRARY}) # Set version-dependent compile flags if (RUBY_VERSION VERSION_LESS 1.9.0) @@ -49,6 +49,13 @@ endif() # Remove -fvisibility=hidden, it causes an obscure failure in release builds. string(REGEX REPLACE "-fvisibility=[a-z]*" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") +# Suppress deprecation warnings from SWIG-generated code +# SWIG 4.4.1 still uses Data_Wrap_Struct instead of TypedData API +if (RUBY_VERSION VERSION_GREATER_EQUAL 3.0.0) + set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/cprotonRUBY_wrap.c + PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations") +endif() + set_target_properties(cproton-ruby PROPERTIES PREFIX "" --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
