From b71967adaef9db04ffdedd64e87bca2658f61a20 Mon Sep 17 00:00:00 2001 From: Xin Pan Date: Mon, 29 Oct 2018 19:55:28 +0800 Subject: [PATCH] Merge pull request #14107 from jacquesqiao/fix-xxhash-compile-on-mac test=release/1.1 fix xxhash compile on macos --- cmake/external/xxhash.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/external/xxhash.cmake b/cmake/external/xxhash.cmake index 4deaab7545c..c227e09719b 100644 --- a/cmake/external/xxhash.cmake +++ b/cmake/external/xxhash.cmake @@ -7,7 +7,11 @@ set(XXHASH_INCLUDE_DIR "${XXHASH_INSTALL_DIR}/include") IF(WITH_STATIC_LIB) SET(BUILD_CMD make lib) ELSE() - SET(BUILD_CMD sed -i "s/-Wstrict-prototypes -Wundef/-Wstrict-prototypes -Wundef -fPIC/g" ${XXHASH_SOURCE_DIR}/src/extern_xxhash/Makefile && make lib) + IF(APPLE) + SET(BUILD_CMD sed -i \"\" "s/-Wstrict-prototypes -Wundef/-Wstrict-prototypes -Wundef -fPIC/g" ${XXHASH_SOURCE_DIR}/src/extern_xxhash/Makefile && make lib) + ELSE(APPLE) + SET(BUILD_CMD sed -i "s/-Wstrict-prototypes -Wundef/-Wstrict-prototypes -Wundef -fPIC/g" ${XXHASH_SOURCE_DIR}/src/extern_xxhash/Makefile && make lib) + ENDIF(APPLE) ENDIF() ExternalProject_Add( -- GitLab