I tried to compile the jemalloc demo using cmake/And here is my initial cmake code.
//brew install jemalloc
in CMakeLists link_directories(/usr/local/lib)