This is an automated email from the ASF dual-hosted git repository. jianliangqi pushed a commit to branch clucene-2.0 in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git
The following commit(s) were added to refs/heads/clucene-2.0 by this push: new 873d49b7 [fix](compile)Fix compile error in MacOS (#162) (#163) 873d49b7 is described below commit 873d49b7c31dd086199c3918a7168e55f53c9181 Author: qiye <jianliang5...@gmail.com> AuthorDate: Mon Dec 25 15:13:00 2023 +0800 [fix](compile)Fix compile error in MacOS (#162) (#163) --- CMakeLists.txt | 2 +- src/core/CLucene/util/stringUtil.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c231772..f7b2a022 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,7 +101,7 @@ OPTION(BUILD_CONTRIBS OFF) OPTION(BUILD_CONTRIBS_LIB "create targets for building the clucene-contribs-lib" - OFF) + ON) SET(LUCENE_SYS_INCLUDES "" CACHE PATH "location for non-system independent files. defaults to CMAKE_INSTALL_PREFIX. see INSTALL documentation for further information." ) diff --git a/src/core/CLucene/util/stringUtil.h b/src/core/CLucene/util/stringUtil.h index 7d97e735..070ebe9c 100644 --- a/src/core/CLucene/util/stringUtil.h +++ b/src/core/CLucene/util/stringUtil.h @@ -205,6 +205,8 @@ public: return compareSSE2(p1 + size - 16, p2 + size - 16); } +#endif + // Compare two strings using sse4.2 intrinsics if they are available. This code assumes // that the trivial cases are already handled (i.e. one string is empty). // Returns: @@ -222,7 +224,7 @@ public: __m128i xmm0 = _mm_loadu_si128(reinterpret_cast<const __m128i*>(s1)); __m128i xmm1 = _mm_loadu_si128(reinterpret_cast<const __m128i*>(s2)); int chars_match = _mm_cmpestri(xmm0, sse_util::CHARS_PER_128_BIT_REGISTER, xmm1, - sse_util::CHARS_PER_128_BIT_REGISTER, sse_util::STRCMP_MODE); + sse_util::CHARS_PER_128_BIT_REGISTER, sse_util::STRCMP_MODE); if (chars_match != sse_util::CHARS_PER_128_BIT_REGISTER) { return (unsigned char)s1[chars_match] - (unsigned char)s2[chars_match]; } @@ -243,8 +245,6 @@ public: return n1 - n2; } -#endif - static inline int32_t utf8_byte_count(uint8_t c) { static constexpr int32_t LUT[256] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org