Skip to content

Commit

Permalink
Merge branch 'releases/2024/1' into releases/2024/1
Browse files Browse the repository at this point in the history
  • Loading branch information
apaniukov authored May 7, 2024
2 parents 56c6c8a + 16927d0 commit 7378184
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,24 @@ FetchContent_Declare(
)
FetchContent_GetProperties(sentencepiece)
if(NOT sentencepiece_POPULATED)
# OpenVINO conda package dynamically linked with external protobuf,
# and we need to link sentencepiece with external protobuf too.
if(DEFINED ENV{CONDA_PREFIX})
set(SPM_USE_BUILTIN_PROTOBUF OFF CACHE BOOL "")
set(SPM_PROTOBUF_PROVIDER "package" CACHE STRING "")
set(SPM_ABSL_PROVIDER "package" CACHE STRING "")
else()
set(SPM_USE_BUILTIN_PROTOBUF ON CACHE BOOL "")
set(SPM_PROTOBUF_PROVIDER "internal" CACHE STRING "")
set(SPM_ABSL_PROVIDER "internal" CACHE STRING "")
endif()

set(SPM_ENABLE_SHARED OFF CACHE BOOL "")
set(SPM_ENABLE_TCMALLOC OFF CACHE BOOL "")
set(SPM_USE_BUILTIN_PROTOBUF ON)
FetchContent_Populate(sentencepiece)
add_subdirectory(${sentencepiece_SOURCE_DIR} ${sentencepiece_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()


if(BUILD_FAST_TOKENIZERS)
FetchContent_Declare(
fast_tokenizer
Expand Down

0 comments on commit 7378184

Please sign in to comment.