Commit Graph

1 Commits

Author SHA1 Message Date
Paul C Roberts
0c6e9d77a4 Add cmake support
This uses cmake to allow building as a static library and to build the tests

To use `cmake`

```
$ mkdir build
$ cd build
$ cmake ..
 .
 .
-- Build files have been written to: ~/json11/build
$ make
Scanning dependencies of target json11
[ 20%] Building CXX object CMakeFiles/json11.dir/json11.cpp.o
[ 40%] Linking CXX static library libjson11.a
[ 40%] Built target json11
Scanning dependencies of target json11_test
[ 60%] Building CXX object CMakeFiles/json11_test.dir/json11.cpp.o
[ 80%] Building CXX object CMakeFiles/json11_test.dir/test.cpp.o
[100%] Linking CXX executable json11_test
[100%] Built target json11_test
$ make test
running tests...
Test project /Users/paul/dev/json11/build
    Start 1: json11_test
    1/1 Test #1: json11_test ......................   Passed    0.00 sec

    100% tests passed, 0 tests failed out of 1

    Total Test time (real) =   0.01 sec
$
```
2015-08-19 14:53:28 -07:00