miloyip/rapidjson — pull request #185 by drewnoakes (2014-10-30 16:49:25+00:00)
Title: Add initial CMake build support.

This CMakeLists.txt` provides targets for `unittests`, `perftests` and all example programs.

Note that this file does not copy the `bin` folder contents to the target directory, which only applies if you do out-of-source builds. In which case you may copy the folder manually, or ideally update `CMakeLists.txt` to perform this. I didn't manage to get this to work.

It's possible the minimum CMake version required is actually lower than that published, but I cannot test. Users of this file on earlier versions should modify this if earlier versions do in fact work.

To use:

rapidjson$ mkdir out
rapidjson$ cd out
rapidjson/out$ cmake ..
rapidjson/out$ make unittests

This CMake file has also been tested with beta builds of the new CLion IDE and works well.

You may also configure the build using a tool such as `ccmake`.

rapidjson/out$ ccmake .