From 629ad1986d47ba0ee28cbeb39bd30c8bb90c38ea Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 13 Sep 2017 11:23:21 +0800 Subject: [PATCH] cmake: disable plugins using isa-l on osx 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 --- src/CMakeLists.txt | 4 ++-- src/compressor/zlib/CMakeLists.txt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 62e76c6e15d6a..510bd173d2372 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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) diff --git a/src/compressor/zlib/CMakeLists.txt b/src/compressor/zlib/CMakeLists.txt index 1b3bc259a3514..78bf67c5984f3 100644 --- a/src/compressor/zlib/CMakeLists.txt +++ b/src/compressor/zlib/CMakeLists.txt @@ -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) -- 2.39.5