diff --git a/CMakeLists.txt b/CMakeLists.txt index d55a53231618530eeaf5e706e00fcb74064c7b2c..85f4b23dab020b528c6c4154285429b8fb74ec8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,6 +83,7 @@ opt(SGEOM "Enable SGEOM interface to OCC (experimental)" OFF) opt(SLEPC "Enable SLEPc eigensolvers (required for conformal compounds)" ${DEFAULT}) opt(SOLVER "Enable built-in finite element solvers (required for compounds)" ${DEFAULT}) opt(TAUCS "Enable Taucs linear solver (alternative to PETSc)" ${DEFAULT}) +opt(TCMALLOC "Enable libtcmalloc, a fast malloc implementation but that does not release memory" OFF) opt(TETGEN "Enable Tetgen 3D initial mesh generator" ${DEFAULT}) opt(TETGEN_OLD "Enable older version of Tetgen" OFF) opt(VORO3D "Enable Voro3D (for hex meshing, experimental)" ${DEFAULT}) @@ -389,6 +390,14 @@ if(ENABLE_BLAS_LAPACK) endif(BLAS_LAPACK_LIBRARIES) endif(ENABLE_BLAS_LAPACK) +if(ENABLE_TCMALLOC) + find_library(TCMALLOC tcmalloc) + if(TCMALLOC) + set_config_option(HAVE_TCMALLOC "TCMalloc") + list(APPEND EXTERNAL_LIBRARIES ${TCMALLOC}) + endif(TCMALLOC) +endif(ENABLE_TCMALLOC) + add_subdirectory(Common) add_subdirectory(Numeric) add_subdirectory(Geo)