This is an automated email from the ASF dual-hosted git repository.
zykkk pushed a commit to branch clucene
in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git
The following commit(s) were added to refs/heads/clucene by this push:
new 38fa525c [fix](compile)Fix compile error in MacOS (#162)
38fa525c is described below
commit 38fa525c5b93dc50d8f04aab5d6b8085d2362768
Author: qiye <[email protected]>
AuthorDate: Mon Dec 25 14:45:40 2023 +0800
[fix](compile)Fix compile error in MacOS (#162)
---
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 1616737d..4a022e3e 100644
--- a/src/core/CLucene/util/stringUtil.h
+++ b/src/core/CLucene/util/stringUtil.h
@@ -206,6 +206,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:
@@ -223,7 +225,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];
}
@@ -244,8 +246,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: [email protected]
For additional commands, e-mail: [email protected]