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 /CMakeLists.txt | |
parent | c29cc83dc4d234f0e3a00a46a729053132b408b8 (diff) |
Revert "remove TC_MALLOC from optional dependencies (#840)"
This reverts commit 096c48e51cd2e61bb275345d7cca99cbfd6bc5c7.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index dffbd1ff..4ee33978 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -421,6 +421,18 @@ if(USE_STATIC_LIBS) endif() ############################################################################### +# Find Tcmalloc +if(NOT WIN32) + find_package(Tcmalloc) + if(Tcmalloc_FOUND) + include_directories(${Tcmalloc_INCLUDE_DIR}) + set(EXT_LIBS ${EXT_LIBS} ${Tcmalloc_LIBRARIES}) + else(Tcmalloc_FOUND) + message(WARNING "Cannot find TCMalloc library. Continuing.") + endif(Tcmalloc_FOUND) +endif() + +############################################################################### # Find BLAS library if(COMPILE_CPU) if(NOT GENERATE_MARIAN_INSTALL_TARGETS) |