nishant94 commented on code in PR #64667:
URL: https://github.com/apache/doris/pull/64667#discussion_r3755099970
##########
be/CMakeLists.txt:
##########
@@ -976,6 +996,49 @@ if (BUILD_META_TOOL OR BUILD_INDEX_TOOL)
add_subdirectory(${SRC_DIR}/tools)
endif()
+if (NOT MAKE_TEST)
+ # Offline generator: compiles the UTF-8 mecab-ipadic source into binary
files.
+ add_executable(kuromoji_build_dict EXCLUDE_FROM_ALL
${SRC_DIR}/tools/kuromoji_build_dict.cpp)
+ target_include_directories(kuromoji_build_dict PRIVATE
${PROJECT_SOURCE_DIR}/..)
+ pch_reuse(kuromoji_build_dict)
+ set_target_properties(kuromoji_build_dict PROPERTIES ENABLE_EXPORTS 1)
+ if (COMPILER_CLANG)
+ target_compile_options(kuromoji_build_dict PRIVATE
+ -Wno-implicit-int-conversion
+ -Wno-shorten-64-to-32)
+ endif()
+ target_link_libraries(kuromoji_build_dict ${DORIS_LINK_LIBS})
+
+ set(KUROMOJI_IPADIC_SRC
"${THIRDPARTY_DIR}/share/mecab-ipadic-2.7.0-20250920"
+ CACHE PATH "UTF-8 mecab-ipadic source directory used to generate the
kuromoji dictionary")
+ set(KUROMOJI_DICT_OUT "${BASE_DIR}/dict/kuromoji")
+ file(GLOB KUROMOJI_IPADIC_SRC_FILES CONFIGURE_DEPENDS
+ "${KUROMOJI_IPADIC_SRC}/*.csv"
+ "${KUROMOJI_IPADIC_SRC}/*.def")
+ get_filename_component(KUROMOJI_LIBJVM_DIR "${LIB_JVM}" DIRECTORY)
+ set(KUROMOJI_DYLD_PATH "${KUROMOJI_LIBJVM_DIR}")
+ set(KUROMOJI_LD_PATH "${KUROMOJI_LIBJVM_DIR}")
+ if (NOT "$ENV{DYLD_LIBRARY_PATH}" STREQUAL "")
+ set(KUROMOJI_DYLD_PATH
"${KUROMOJI_LIBJVM_DIR}:$ENV{DYLD_LIBRARY_PATH}")
+ endif()
+ if (NOT "$ENV{LD_LIBRARY_PATH}" STREQUAL "")
+ set(KUROMOJI_LD_PATH "${KUROMOJI_LIBJVM_DIR}:$ENV{LD_LIBRARY_PATH}")
+ endif()
+ add_custom_command(
Review Comment:
Fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]