From 69c189b41a8d9edf0c614fef54c4a8fbb051db4a Mon Sep 17 00:00:00 2001 From: ipkn Date: Fri, 8 Aug 2014 04:13:10 +0900 Subject: Update README.md --- README.md | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index a26bd9a..e4831cc 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ Crow is C++ microframework for web. (inspired by Python Flask) - Type-safe Handlers (see Example) - Fast built-in JSON parser (crow::json) - [Mustache](http://mustache.github.io/) based templating library (crow::mustache) + - Header only + - Provide an amalgamated header file `crow_all.h' with every features ## Still in development - Built-in ORM @@ -76,25 +78,38 @@ int main() ## How to Build +If you just want to use crow, copy amalgamate/crow_all.h and include it. + ### Requirements - C++ compiler with good C++11 support (tested with g++>=4.8) - boost library - - tcmalloc (optional) + - CMake -### Ubuntu -#### Installing missing dependencies - sudo apt-get install build-essential libtcmalloc-minimal4 && sudo ln -s /usr/lib/libtcmalloc_minimal.so.4 /usr/lib/libtcmalloc_minimal.so + - Linking with tcmalloc/jemalloc is recommended for speed. -#### Building - git submodule init && git submodule update - make -j$(($(grep -c '^processor' /proc/cpuinfo)+1)) +### Building (Tests, Examples) -### OSX -#### Installing missing dependencies - brew install boost google-perftools +Out-of-source build with CMake is recommended. + +``` +mkdir build +cd build +cmake .. +make +``` + +You can run tests with following commands: +``` +ctest +``` + + +### Installing missing dependencies -#### Building - git submodule init && git submodule update - make -j$(($(sysctl -a | grep machdep.cpu.thread_count | awk -F " " '{print $2}')+1)) +#### Ubuntu + sudo apt-get install build-essential libtcmalloc-minimal4 && sudo ln -s /usr/lib/libtcmalloc_minimal.so.4 /usr/lib/libtcmalloc_minimal.so + +#### OSX + brew install boost google-perftools -- cgit v1.2.3-54-g00ecf