]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: disable plugins using isa-l on osx
authorKefu Chai <kchai@redhat.com>
Wed, 13 Sep 2017 03:23:21 +0000 (11:23 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 16 Sep 2017 02:43:32 +0000 (10:43 +0800)
clang on osx emits functions with leading underscore, but the isa-l
assembly's functions have no leading underscore. we could label the
function declaration like `int foo asm("foo")` to remove the leading
underscore, but isa-l is a git submodule, let do this later. and in the
meanwhile, disable this plugin on osx.

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

index 62e76c6e15d6adfd78cec3930034947d30e0460c..510bd173d23727dc6182437366a1bf8fe80c7307 100644 (file)
@@ -917,9 +917,9 @@ if(WITH_TESTS AND WITH_DMCLOCK_TESTS)
   add_subdirectory(dmclock/support/test)
 endif(WITH_TESTS AND WITH_DMCLOCK_TESTS)
 
-if(HAVE_INTEL AND HAVE_BETTER_YASM_ELF64)
+if(HAVE_INTEL AND HAVE_BETTER_YASM_ELF64 AND (NOT APPLE))
   add_subdirectory(crypto/isa-l)
-endif(HAVE_INTEL AND HAVE_BETTER_YASM_ELF64)
+endif()
 
 if(WITH_TESTS)
 
index 1b3bc259a3514811309d5c035dccb6717c8e3a21..78bf67c5984f3c2787695c1bce083ce9e38ae154 100644 (file)
@@ -1,6 +1,6 @@
 # zlib
 
-if(HAVE_INTEL_SSE4_1 AND HAVE_BETTER_YASM_ELF64)
+if(HAVE_INTEL_SSE4_1 AND HAVE_BETTER_YASM_ELF64 AND (NOT APPLE))
        set(zlib_sources
          CompressionPluginZlib.cc
          ZlibCompressor.cc
@@ -30,12 +30,12 @@ if(HAVE_INTEL_SSE4_1 AND HAVE_BETTER_YASM_ELF64)
          ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/proc_heap.asm
          ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/rfc1951_lookup.asm
        )
-else(HAVE_INTEL_SSE4_1 AND HAVE_BETTER_YASM_ELF64)
+else(HAVE_INTEL_SSE4_1 AND HAVE_BETTER_YASM_ELF64 AND (NOT APPLE))
        set(zlib_sources
          CompressionPluginZlib.cc
          ZlibCompressor.cc
        )
-endif(HAVE_INTEL_SSE4_1 AND HAVE_BETTER_YASM_ELF64)
+endif(HAVE_INTEL_SSE4_1 AND HAVE_BETTER_YASM_ELF64 AND (NOT APPLE))
 
 add_library(ceph_zlib SHARED ${zlib_sources})
 add_dependencies(ceph_zlib ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)