Commit Graph

21 Commits

Author SHA1 Message Date
Hamilton Turner
402bcde713 Protect against literal interpretation (#137)
* Protect against literal interpretation

On msvc 2017 this seems to have been checking for existence of a flag called `_warning_flag`

* Stop checking for flag called "IN"

* Ensure compiler flag checks are not cached

Per the docs of CMake the call to CHECK_CXX_COMPILER_FLAG 
stores the result in an internal cache entry. In this loop we were 
basically skipping the "supported" check for all flags after the 
first one. Forcibly unsetting the variable before each check 
ensures that we actually check if each specific flag is supported
2019-04-15 16:06:48 -07:00
Akira Miasato
b3c769da9b Revert VERSION change, now setting CMP0048 policy to NEW 2017-04-28 14:46:38 -03:00
akira-miasato
d68527c539 Remove VERSION temporarily 2017-04-27 14:58:55 -03:00
akira-miasato
e19ef2bb84 Add compatibility with older 2.8 version of CMake
Some legacy systems (Ubuntu 14.04, RHEL7.2) have older versions of CMake.
2017-04-26 15:05:25 -03:00
Andrew Twyman
db00e9369a Merge pull request #96 from jnguyen75/fix-windows-compile
Fix MSVC Compilation: Add MSVC warning flags
2017-04-11 13:26:10 -07:00
Bruno Coelho
44944359c8 Disable build tests by default in CMake and enable them in make file 2017-02-16 17:35:24 +00:00
Jimmy Nguyen
067fd4934b Refactored warning flag checks to use CheckCXXCompilerFlag module since Windows can compile without MSVC 2017-02-07 11:54:10 -08:00
Arwed Mett
d3f504d58c see https://github.com/dropbox/json11/pull/95#issuecomment-277693953 2017-02-07 20:32:23 +01:00
Jimmy Nguyen
3d69faa498 Add MSVC warning flags 2017-02-06 17:10:38 -08:00
Arwed Mett
149c5021fc installation if json11 is added as a library works now 2017-01-31 00:09:26 +01:00
Nick White
f6b4989d3b don't override CMAKE_INSTALL_PREFIX if specified 2017-01-12 18:03:09 +00:00
Adam Carlucci
6de8cacf3c default to OFF for DR1467 canary test 2016-12-27 18:28:00 -08:00
Adam Carlucci
42ce09babf add cmake option for dr1467 canary tests 2016-12-27 18:28:00 -08:00
hhony
f6b2731f2b CMakeLists: pkgconfig: stage for architecture specific compile/install 2016-09-07 17:33:00 -07:00
hhony
ba5c850b59 CMakeLists: avoid LD errors library should be compiled as position independent code 2016-09-07 17:22:50 -07:00
Adam Carlucci
580fd44b5f Use CXX_STANDARD to specify c++11 compile flags 2016-08-10 18:16:59 -07:00
Bruno Coelho
3704671508 Add option to disable unit tests 2016-07-05 15:37:44 +01:00
Chris Kitching
05b5514400
Don't assume in-tree builds when installing json11.pc 2016-05-05 02:43:43 +01:00
Nick White
8076ba74e0 Generate pkg-config File & Add Install
...to the CMake build script. The pkg-config file needs a version number (which
it takes from the CMakeLists.txt variable), which I've set to 1.0.0. The cmake
project declaration needs to be after the minimum-requirement declaration to
avoid errors from the cmake's change in VERSION semantics.
2016-04-16 18:43:09 +01:00
kirisetsz
5e664c99d8 Update CMakeLists to 3.x style 2016-04-08 01:16:21 +08:00
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