You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2018/09/07 13:56:47 UTC

[2/3] qpid-proton git commit: PROTON-1798: [ruby] Use CMAKE_C_FLAGS to build ruby module

PROTON-1798: [ruby] Use CMAKE_C_FLAGS to build ruby module

Don't overwrite CMAKE_C_FLAGS when building ruby SWIG modules,
just remove the troublesome -fvisibility=* but keep the rest.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/6275c986
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/6275c986
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/6275c986

Branch: refs/heads/master
Commit: 6275c986902fe2d16cefb1ae860f1d8af3caacd1
Parents: a1b7d50
Author: Alan Conway <ac...@redhat.com>
Authored: Thu Sep 6 16:57:41 2018 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Fri Sep 7 09:45:50 2018 -0400

----------------------------------------------------------------------
 ruby/CMakeLists.txt | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/6275c986/ruby/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/ruby/CMakeLists.txt b/ruby/CMakeLists.txt
index 848d1c9..e205250 100644
--- a/ruby/CMakeLists.txt
+++ b/ruby/CMakeLists.txt
@@ -41,12 +41,13 @@ swig_link_libraries(cproton-ruby ${BINDING_DEPS} ${RUBY_LIBRARY})
 if (RUBY_VERSION VERSION_LESS 1.9.0)
    # Don't have blocking control API
 elseif(RUBY_VERSION VERSION_LESS 2.0.0)
-  set(RUBY_C_FLAGS "-DRUBY_USE_rb_thread_blocking_region")
+  string(APPEND CMAKE_C_FLAGS " -DRUBY_USE_rb_thread_blocking_region")
 else()
-  set(RUBY_C_FLAGS "-DRUBY_USE_rb_thread_call_without_gvl")
+  string(APPEND CMAKE_C_FLAGS " -DRUBY_USE_rb_thread_call_without_gvl")
 endif()
-# Replace global CMAKE_C_FLAGS, -fvisibility=hidden causes an obscure failure with release builds.
-set(CMAKE_C_FLAGS "${RUBY_C_FLAGS}")
+
+# Remove -fvisibility=hidden, it causes an obscure failure in release builds.
+string(REGEX REPLACE "-fvisibility=[a-z]*" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
 
 set_target_properties(cproton-ruby
     PROPERTIES


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org