Commit graph

47 commits

Author SHA1 Message Date
Matthias Möller
d1cda6888e includes CTest module resp. BUILD_TESTING option 2017-12-20 17:54:45 +01:00
Niels Lohmann
9e3c4ad11f
🔖 set version to 3.0.0 2017-12-17 08:31:18 +01:00
Théo DELRIEU
541ee62a05
cmake: use BUILD_INTERFACE/INSTALL_INTERFACE in target_include_directories 2017-12-05 11:27:03 +01:00
Matthias Möller
24fe572d98 missing new line 2017-11-30 13:37:58 +01:00
Matthias Möller
8e9a8792a9 moved natis to root dir 2017-11-30 13:26:45 +01:00
Matthias Möller
af775ddbb8 add compiler & cmake version check 2017-11-28 23:43:39 +01:00
Matthias Möller
48d7a32daa add .natvis for MSVC debug view 2017-11-26 10:31:33 +01:00
dan-42
966989a3f5 CONFIG: pin cmake to enable only C++ 2017-07-31 09:49:26 +02:00
dan-42
f434942371 REFACTOR: rewrite CMakeLists.txt for better inlcude and reuse
The rewrite uses more cmake build-in automatisms and build-in generates
variables to allow better generic reuse.
* cmake  files are installed to
``` <install_prefix>/lib/cmake/nlohmann_json/ ``` for best support on
most systems
* include path is set to ``` include ```  for usage as ``` #include
<nlohmann/json.hpp> ```
2017-07-29 11:59:09 +02:00
Ilya Polishchuk
a27dd3a6f6 enable_testing only if JSON_BuildTests is ON 2017-07-27 17:50:24 +03:00
Oleg Endo
cd800522e4 Rename BuildTests to JSON_BuildTests
This avoids potential conflicts with other libraries when the library is
built from source and included in a bigger cmake build.
2017-07-11 22:57:49 +09:00
Niels Lohmann
27c65b860b
🔖 version 2.1.1 2017-02-25 16:34:38 +01:00
Niels Lohmann
b49ce351eb
💄 fixed some warnings 2017-02-22 20:48:29 +01:00
Tushar Maheshwari
85ce4d7b53 cmake compile time reduce using cotire
- Add prefix header
  - Include catch.hpp
  - Include json.hpp
    - Replace private with public for all json_unit files
- Move `unit.cpp` to an object library
- cotire issue: strip whitespace from CMAKE_INCLUDE_SYSTEM_FLAG_CXX
2017-02-19 13:35:54 +05:30
Niels Lohmann
d870826811 🔖 set version to 2.1.0 2017-01-28 16:03:35 +01:00
Niels Lohmann
60b3703c62 🔖 version bump to 2.0.10 2017-01-02 09:35:57 +01:00
Niels Lohmann
303e873ae8 🔖 bumped version to 2.0.9 2016-12-16 20:45:46 +01:00
Niels Lohmann
4adb8a81bf 📝 version bump 2016-12-02 18:39:35 +01:00
Niels
700977d73e version bump 2016-11-02 20:52:15 +01:00
Niels
606098f45d release 2.0.6 2016-10-15 16:47:45 +02:00
Christoph Jud
e1b6a23049 relocation of install-include directory for other packages 2016-09-26 12:15:03 +02:00
Niels
3d104f1d43 version bump 2016-09-14 23:06:39 +02:00
Niels
768d66560e version bump 2016-09-11 23:36:59 +02:00
Niels
df9fd6237e release 2.0.3 2016-08-31 21:27:23 +02:00
Niels
a05df038cd prepared release 2016-07-31 13:37:04 +02:00
Robert Marki
639d63217e Define CMake/CTest tests
Instead of copying the test executable and the JSON files used by
the tests at install time, define CMake/CTest tests for running
the json_unit executable from any build directory with the project's
source directory as its working directory.

- call enable_testing in the main lists file to allow the definition
of tests
- remove install commands from the test directory's lists file
- define two tests
  - json_unit_default for running the default tests by executing
json_unit without any arguments
  - json_unit_all for running all the tests by executing json_unit
with the "*" argument
- update the AppVeyor configuration file to use the new testing method
2016-05-18 11:53:49 +02:00
Chris Kitching
af76508fe7
Introduce structure to the test/ directory
This introduces a clear separation between test data and test
binaries. Test data is moved into test/data, and the test binaries
move into test/src. A new CMake script specific to building the
tests is introduced in /test to slightly clean up the toplevel
one.

As well as tidying things up, this makes the next step trivial...
2016-05-11 01:30:08 +01:00
Chris Kitching
4e6aacda36
Use definitely-unique target/project name
There exist lots of json libraries, and project/target names must
be globally unique. If someone integrated with this library in a
particularly stupid way, using a generic name like "json" might
cause a problem.
2016-05-11 01:14:56 +01:00
Chris Kitching
b6becce8fb
Don't use variable for the test target name
I'm not sure that using a variable for target names really helps
with clarity. Unlike paths, target names aren't really something
you change. In a sense, targets are themselves a sort of variable,
so having a variable to name a variable seems just a bit gnarly.
2016-05-11 01:12:56 +01:00
Chris Kitching
6a98a6c964
Add CMake option to disable building the tests (Default builds) 2016-05-11 01:06:32 +01:00
Robert Marki
192a692034 Generate package config files in cmake's current binary directory
Generate the config files of the package in CMAKE_CURRENT_BINARY_DIR
instead of CMAKE_BINARY_DIR because the later will refer to the main
project's binary directory if the library is included in the project
using the add_subdirectory command.
2016-04-25 11:55:03 +02:00
Robert Marki
b1a2e9a715 Create an install target for the project
- define the project's version in the cmake listfile
- create a config and config version file for the cmake package
- install the json.hpp file and the package's targets, config and
config version files
2016-04-25 10:27:19 +02:00
Robert Marki
30e396043a Export library target and store build directory in package registry 2016-04-25 09:36:05 +02:00
Robert Marki
28f73ed406 Refactor CMake listfile to define an interface imported library
Define the library as an interface imported library so other targets
can use the library as a dependency and use the interface properties
of the library.
2016-04-24 19:56:20 +02:00
emvivre
4f27004dd5 remove invalid parameter '-stdlib=libc++' in CMakeLists.txt 2015-09-22 16:57:18 +02:00
Niels
afb17d7fac typo... 2015-07-16 19:39:18 +02:00
Niels
c89ca716c5 switch off optimizations in MSVC 2015-07-16 19:32:19 +02:00
Niels
5084159048 added changes from #105: MSVC fixes
- additionally, switch off optimization flags to maybe allow build to
complete on AppVeyor
2015-07-16 18:45:19 +02:00
Niels
4f92731823 remove warnings on unit tests (from #88) 2015-06-20 14:16:57 +02:00
Niels
14e54b2b72 Appveyor 2015-04-27 22:53:46 +02:00
Niels
e7da0b4b7c Appveyor 2015-04-26 23:56:42 +02:00
Niels
c16ee07601 Appveyor 2015-04-26 23:31:22 +02:00
Niels
35485c05e3 Appveyor 2015-04-26 23:21:16 +02:00
Niels
1e20bfa14a another try 2015-04-26 22:47:40 +02:00
Niels
befd90dead cleanup 2015-01-31 20:13:11 +01:00
Raphael Isemann
0fcc414995 More testing and updated CMake to allow calling private functions from the tests 2015-01-10 18:28:53 +01:00
Raphael Isemann
0f371b4086 CMake and coverage report 2015-01-05 11:19:42 +01:00