]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake: use CXX_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN
authorKefu Chai <kchai@redhat.com>
Fri, 13 Oct 2017 05:53:29 +0000 (13:53 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 13 Oct 2017 06:32:32 +0000 (14:32 +0800)
instead of using "-fvisibility=hidden -fvisibility-inlines-hidden", more
cmake-ish this way.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/librados/CMakeLists.txt
src/librbd/CMakeLists.txt

index 634893916f78fc921804c9c9d457cb691fa04953..07ed54099a3a41e6cb71ddedca6c59b118db440c 100644 (file)
@@ -24,10 +24,8 @@ if(ENABLE_SHARED)
     OUTPUT_NAME rados
     VERSION 2.0.0
     SOVERSION 2
-    # use COMPILE_FLAGS for the backward compatibility with cmake 2.8.11, should have been:
-    #  CXX_VISIBILITY_PRESET hidden
-    #  VISIBILITY_INLINES_HIDDEN ON
-    COMPILE_FLAGS "-fvisibility=hidden -fvisibility-inlines-hidden")
+    CXX_VISIBILITY_PRESET hidden
+    VISIBILITY_INLINES_HIDDEN ON)
   if(NOT APPLE)
     set_property(TARGET librados APPEND_STRING PROPERTY
       LINK_FLAGS " -Wl,--exclude-libs,ALL")
index a34f14f3bfc989395d2573f0c0253bcbee4f5de7..f6aa8dc92598521952599aec4fa52ae18fff5312 100644 (file)
@@ -136,7 +136,8 @@ if(ENABLE_SHARED)
     OUTPUT_NAME rbd
     VERSION 1.12.0
     SOVERSION 1
-    COMPILE_FLAGS "-fvisibility=hidden -fvisibility-inlines-hidden")
+    CXX_VISIBILITY_PRESET hidden
+    VISIBILITY_INLINES_HIDDEN ON)
     if(NOT APPLE)
       set_property(TARGET librbd APPEND_STRING PROPERTY
         LINK_FLAGS " -Wl,--exclude-libs,ALL")