mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
Cleanup NLP support
This commit is contained in:
parent
a75b748fee
commit
323fe70fcd
@ -487,7 +487,6 @@ message (STATUS
|
||||
include (GNUInstallDirs)
|
||||
|
||||
include (cmake/find/llvm.cmake)
|
||||
include (cmake/find/nlp.cmake)
|
||||
|
||||
# When testing for memory leaks with Valgrind, don't link tcmalloc or jemalloc.
|
||||
|
||||
|
@ -1,32 +0,0 @@
|
||||
option(ENABLE_NLP "Enable NLP functions support" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (NOT ENABLE_NLP)
|
||||
|
||||
message (STATUS "NLP functions disabled")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libstemmer_c/Makefile")
|
||||
message (WARNING "submodule contrib/libstemmer_c is missing. to fix try run: \n git submodule update --init")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal libstemmer_c library, NLP functions will be disabled")
|
||||
set (USE_NLP 0)
|
||||
return()
|
||||
endif ()
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/wordnet-blast/wnb")
|
||||
message (WARNING "submodule contrib/wordnet-blast is missing. to fix try run: \n git submodule update --init")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal wordnet-blast library, NLP functions will be disabled")
|
||||
set (USE_NLP 0)
|
||||
return()
|
||||
endif ()
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/lemmagen-c/README.md")
|
||||
message (WARNING "submodule contrib/lemmagen-c is missing. to fix try run: \n git submodule update --init")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal lemmagen-c library, NLP functions will be disabled")
|
||||
set (USE_NLP 0)
|
||||
return()
|
||||
endif ()
|
||||
|
||||
set (USE_NLP 1)
|
||||
|
||||
message (STATUS "Using Libraries for NLP functions: contrib/wordnet-blast, contrib/libstemmer_c, contrib/lemmagen-c")
|
9
contrib/CMakeLists.txt
vendored
9
contrib/CMakeLists.txt
vendored
@ -127,11 +127,10 @@ add_subdirectory (nuraft-cmake)
|
||||
add_subdirectory (fast_float-cmake)
|
||||
add_subdirectory (datasketches-cpp-cmake)
|
||||
|
||||
if (USE_NLP)
|
||||
add_subdirectory(libstemmer-c-cmake)
|
||||
add_subdirectory(wordnet-blast-cmake)
|
||||
add_subdirectory(lemmagen-c-cmake)
|
||||
endif()
|
||||
option(ENABLE_NLP "Enable NLP functions support" ${ENABLE_LIBRARIES})
|
||||
add_subdirectory(libstemmer-c-cmake) # ENABLE_NLP
|
||||
add_subdirectory(wordnet-blast-cmake) # ENABLE_NLP
|
||||
add_subdirectory(lemmagen-c-cmake) # ENABLE_NLP
|
||||
|
||||
add_subdirectory (sqlite-cmake)
|
||||
add_subdirectory (s2geometry-cmake)
|
||||
|
@ -7,3 +7,4 @@ set(SRCS
|
||||
|
||||
add_library(lemmagen STATIC ${SRCS})
|
||||
target_include_directories(lemmagen SYSTEM PUBLIC "${LEMMAGEN_INCLUDE_DIR}")
|
||||
add_library(ch_contrib::lemmagen ALIAS lemmagen)
|
||||
|
@ -29,3 +29,4 @@ endforeach ()
|
||||
# all the sources parsed. Now just add the lib
|
||||
add_library ( stemmer STATIC ${_SOURCES} ${_HEADERS} )
|
||||
target_include_directories (stemmer SYSTEM PUBLIC "${STEMMER_INCLUDE_DIR}")
|
||||
add_library(ch_contrib::stemmer ALIAS stemmer)
|
||||
|
@ -7,7 +7,6 @@ set(SRCS
|
||||
)
|
||||
|
||||
add_library(wnb ${SRCS})
|
||||
|
||||
target_link_libraries(wnb PRIVATE boost::headers_only boost::graph)
|
||||
|
||||
target_include_directories(wnb SYSTEM PUBLIC "${LIBRARY_DIR}")
|
||||
add_library(ch_contrib::wnb ALIAS wnb)
|
||||
|
@ -494,10 +494,10 @@ target_link_libraries (clickhouse_common_io PRIVATE ch_contrib::lz4)
|
||||
|
||||
dbms_target_link_libraries(PRIVATE _boost_context)
|
||||
|
||||
if (USE_NLP)
|
||||
dbms_target_link_libraries (PUBLIC stemmer)
|
||||
dbms_target_link_libraries (PUBLIC wnb)
|
||||
dbms_target_link_libraries (PUBLIC lemmagen)
|
||||
if (ENABLE_NLP)
|
||||
dbms_target_link_libraries (PUBLIC ch_contrib::stemmer)
|
||||
dbms_target_link_libraries (PUBLIC ch_contrib::wnb)
|
||||
dbms_target_link_libraries (PUBLIC ch_contrib::lemmagen)
|
||||
endif()
|
||||
|
||||
if (TARGET ch_contrib::bzip2)
|
||||
|
@ -79,3 +79,6 @@ endif()
|
||||
if (TARGET ch_contrib::mariadbclient) # ch::mysqlxx
|
||||
set(USE_MYSQL 1)
|
||||
endif()
|
||||
if (ENABLE_NLP)
|
||||
set(USE_NLP 1)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user