diff options
author | Marcin Junczys-Dowmunt <marcinjd@microsoft.com> | 2021-04-08 10:30:38 +0300 |
---|---|---|
committer | Marcin Junczys-Dowmunt <marcinjd@microsoft.com> | 2021-04-08 10:30:38 +0300 |
commit | bfa6180033307f579f91d4220971474d0c3de86d (patch) | |
tree | 723adfb39214f2fc103e6a5e90c1fc30a56bc6eb /src | |
parent | c29cc83dc4d234f0e3a00a46a729053132b408b8 (diff) |
Revert "remove TC_MALLOC from optional dependencies (#840)"
This reverts commit 096c48e51cd2e61bb275345d7cca99cbfd6bc5c7.
Diffstat (limited to 'src')
-rw-r--r-- | src/3rd_party/CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/3rd_party/CMakeLists.txt b/src/3rd_party/CMakeLists.txt index 9a809d5e..2bef3129 100644 --- a/src/3rd_party/CMakeLists.txt +++ b/src/3rd_party/CMakeLists.txt @@ -74,9 +74,13 @@ if(USE_SENTENCEPIECE) if(NOT GENERATE_MARIAN_INSTALL_TARGETS) set(SPM_ENABLE_SHARED OFF CACHE BOOL "Builds shared libaries in addition to static libraries." FORCE) endif() + set(SPM_ENABLE_TCMALLOC ON CACHE BOOL "Enable TCMalloc if available.") - # disable TCMALLOC for SentencePiece - set(SPM_ENABLE_TCMALLOC OFF CACHE BOOL "Enable TCMalloc if available." FORCE) + if(USE_STATIC_LIBS) + set(SPM_TCMALLOC_STATIC ON CACHE BOOL "Link static library of TCMALLOC." FORCE) + else(USE_STATIC_LIBS) + set(SPM_TCMALLOC_STATIC OFF CACHE BOOL "Link static library of TCMALLOC.") + endif(USE_STATIC_LIBS) add_subdirectory(./sentencepiece) include_directories(./sentencepiece) |