From d75cf756c58133da413cbf6d3192eb7179593956 Mon Sep 17 00:00:00 2001 From: Adonis Ling Date: Mon, 16 Jan 2023 17:12:40 +0800 Subject: [PATCH] [fix](third-party) Pass search paths of dependencies to CLucene explicitly (#15959) When building CLucene, CMake may find the wrong Boost and zlib. We should pass the search paths to the build command for CLucene explicitly to find the correct dependencies. --- thirdparty/build-thirdparty.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/thirdparty/build-thirdparty.sh b/thirdparty/build-thirdparty.sh index 905b2410d6..934a2c441e 100755 --- a/thirdparty/build-thirdparty.sh +++ b/thirdparty/build-thirdparty.sh @@ -1566,9 +1566,17 @@ build_clucene() { cd "${BUILD_DIR}" rm -rf CMakeCache.txt CMakeFiles/ - ${CMAKE_CMD} -G "${GENERATOR}" -DCMAKE_INSTALL_PREFIX="${TP_INSTALL_DIR}" -DBUILD_STATIC_LIBRARIES=ON \ - -DBUILD_SHARED_LIBRARIES=OFF -DCMAKE_CXX_FLAGS="-fno-omit-frame-pointer ${warning_narrowing}" \ - -DUSE_STAT64=0 -DUSE_AVX2="${USE_AVX2}" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" -DBUILD_CONTRIBS_LIB=ON .. + ${CMAKE_CMD} -G "${GENERATOR}" \ + -DCMAKE_INSTALL_PREFIX="${TP_INSTALL_DIR}" \ + -DBUILD_STATIC_LIBRARIES=ON \ + -DBUILD_SHARED_LIBRARIES=OFF \ + -DBOOST_ROOT="${TP_INSTALL_DIR}" \ + -DZLIB_ROOT="${TP_INSTALL_DIR}" \ + -DCMAKE_CXX_FLAGS="-fno-omit-frame-pointer ${warning_narrowing}" \ + -DUSE_STAT64=0 \ + -DUSE_AVX2="${USE_AVX2}" \ + -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \ + -DBUILD_CONTRIBS_LIB=ON .. ${BUILD_SYSTEM} -j "${PARALLEL}" ${BUILD_SYSTEM} install