ipkn / crow

Crow is very fast and easy to use C++ micro web framework (inspired by Python Flask)
BSD 3-Clause "New" or "Revised" License
7.46k stars 889 forks source link

How to use Crow with Tcmalloc? #370

Open guteksan opened 4 years ago

guteksan commented 4 years ago

It is hinted in the doc to link with Tcmalloc, but how exactly? The output of building Crow is just a single header: crow_all.h, but there is no difference whether Crow project was build with or without tcmalloc found. So should I link tcmalloc with my Crow-based project? But Tcmalloc has no Cmake support yet, so it is not exactly clear how can I take advantage if it.

The-EDev commented 3 years ago

looking at the code, find_package(Tcmalloc) in CMakeLists.txt and FindTcmalloc.cmake seem to be the main relevant files, but as far as I understand, you only need to link Tcmalloc to your program when you compile it.