Commit Graph

130 Commits (c35d260c2fb91b8a53e585d480607a0f088cbbbb)

Author SHA1 Message Date
Niels Lohmann 48e1fe03b5
🔖 set version to 3.7.0 2019-07-28 20:20:41 +02:00
Tommy Nguyen 3184e9bd8b
Use GNUInstallDirs instead of hard-coded path. 2019-07-16 11:44:32 -04:00
Niels Lohmann 191aa0fd6f
🔧 overworked maintaner targets 2019-03-28 14:22:48 +01:00
Niels Lohmann efa1b9a7bb
🔖 set version to 3.6.1 2019-03-20 20:50:05 +01:00
Niels Lohmann b37392b7ac
🔖 set version to 3.6.0 2019-03-20 00:19:07 +01:00
Niels Lohmann d39842e68f
Merge pull request #1330 from ax3l/topic-installEmbed
CMake: Optional Install if Embedded
2019-03-13 11:13:09 +01:00
Ivor Wanders 4fd9b52fc2 Use C++11 features supported by CMake 3.1. 2019-01-16 08:50:58 -05:00
Yann E. MORIN e8b6b7adc1 buildsystem: relax requirement on cmake version
Commit 73cc5089 (Using target_compile_features to specify C++ 11
standard) bumped the required cmake version, from 3.0 to 3.8, so
as to get the definition of target_compile_features().

However, target_compile_features() was introduced in cmake-3.1:
    https://cmake.org/cmake/help/v3.1/command/target_compile_features.html

And using cmake-3.1 is indeed sufficient to properly build.

As such, relax the minimum required version down to cmake-3.1,
so we can build on oldish, entreprise-grade distributions that
only have cmake-3.1 (or at least, don't have up to cmake-3.8).

Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2018-12-31 18:52:04 +01:00
Niels Lohmann 78348afeb6
🔖 set version to 3.5.0 2018-12-21 23:52:29 +01:00
Axel Huebl f049836d68
CMake: Optional Install if Embedded
When adding this library as embedded library with private
"target link", e.g. only used inside private source files, the
library does not need to be installed when the main project gets
installed.

This adds an additional option `JSON_Install` similar to the
test-build control switch in order to skip installing headers and
CMake config files if requested.

Avoids using
```cmake
add_subdirectory(path/to/nlohmann_json EXCLUDE_FROM_ALL)
```

which has further side-effects:
https://cmake.org/cmake/help/v3.0/command/add_subdirectory.html
2018-11-02 10:18:00 +01:00
Axel Huebl 689382a722
Fix EOL Whitespaces & CMake Spelling
Fix little leftover EOL whitespaces in `CMakeLists.txt` and
a spelling of CMake in README.md
2018-11-02 09:35:17 +01:00
Niels Lohmann 7b2f8cce03
🔖 set version to 3.4.0 2018-10-30 21:30:20 +01:00
Niels Lohmann b968faa882
🔖 set version to 3.3.0 2018-10-05 10:59:33 +02:00
Chuck Atkins 1729db85c1 cmake: fix package config to deal with versioning and namespaces 2018-09-30 09:56:33 -04:00
Niels Lohmann d713727f22
Merge pull request #1202 from dennisfischer/develop
Export package to allow builds without installing
2018-08-25 10:56:30 +02:00
Dennis Fischer dfe607c6ff Export package to allow builds without installing 2018-08-20 09:23:12 +02:00
Niels Lohmann 9f3857ef6f
🔖 set version to 3.2.0 2018-08-18 18:46:15 +02:00
Chuck Atkins 33a2154f8d Enable target namespaces and build dir project config
CMake convention is to use a project namespace, i.e. Foo::, for imported
targets.  When multiple targets are imported from a project, this looks
like Foo::Bar1 Foo::Bar2, etc.  This adds the nlohmann_json:: namespace to
the exported target names.

This also allows the generated project config files to be used from the
build directory instead of just the install directory.
2018-04-10 09:08:38 -04:00
Chuck Atkins 031b88d315 Make the CMake install dir user-configurable 2018-04-09 11:31:25 -04:00
Carlos O'Ryan 4286b16b71
Fix trivial typo in comment.
Not really important, but since I saw it.
2018-04-08 15:46:25 -04:00
Axel Huebl e439a1a9a7
CMake: 3.8+ is Sufficient
The current CMake scripts depend on CMake 3.8+.
This allows us to remove previous work-arounds.
2018-04-07 13:15:44 +02:00
Kevin Tonon 73cc5089e3 Using target_compile_features to specify C++ 11 standard 2018-03-28 13:11:49 -04:00
Niels Lohmann afef474c0d
🔖 set version to 3.1.2 2018-03-14 21:09:27 +01:00
Niels Lohmann 938c861a09
🔖 set version to 3.1.1 2018-02-12 22:59:36 +01:00
Niels Lohmann 548f488941
🔨 overworked Makefile 2018-02-10 14:46:39 +01:00
Niels Lohmann 0258484626
🔖 set version to 3.1.0
- updated documentation wrt. new repository layout
- temporarily switched off Homebrew --HEAD building (can only be switched on after release)
- set copyright date to 2018
2018-02-01 22:20:26 +01:00
Théo DELRIEU 14cd019861
fix cmake install directory (for real this time)
* Rename 'develop' folder to 'include/nlohmann'
* Rename 'src' folder to 'single_include/nlohmann'
* Use <nlohmann/*> headers in sources and tests
* Change amalgamate config file
2018-02-01 11:06:51 +01:00
Théo DELRIEU 5775084ffc
cmake: add option to use/install the non-amalgamated version 2018-01-13 13:07:03 +01:00
Théo DELRIEU 922b56e492
cmake: add back trailing slash to NLOHMANN_JSON_SOURCE_DIR 2018-01-13 12:27:33 +01:00
Niels Lohmann ce53537ba2
replaces amalgamation tool
The tool used before created a lot of duplicates inside the generated amalgamation. The new tool is a single Python file which seems to do the same job.
2018-01-09 23:15:06 +01:00
Niels Lohmann 0a2920e0fd
♻️ reorganized code 2018-01-09 18:30:02 +01:00
Théo DELRIEU 7e4ee23f40
add single_header CMake target 2018-01-08 20:09:43 +01:00
Niels Lohmann 92484f0caf
🔖 set version to 3.0.1 2017-12-29 18:31:13 +01:00
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