Commit Graph

89 Commits

Author SHA1 Message Date
Alex Reinking
ec43371e07
Enable CMake policy CMP0077
Projects that import json via [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html) or `add_subdirectory` pointed at a git submodule may want to set `JSON_BuildTests` to "NO". However, this doesn't work without creating an identical `option()` in the importing project. Enabling CMP0077 in supported versions of CMake changes the behavior of `option()` to allow importing projects to set default values for the variables without touching the cache.

See the documentation for CMP0077 here: https://cmake.org/cmake/help/latest/policy/CMP0077.html
2020-06-26 11:47:36 -07:00
Niels Lohmann
5f862710fe
🔖 set version to 3.8.0 2020-06-14 17:16:45 +02:00
Niels Lohmann
c92a696852
📝 update documentation 2020-05-22 18:21:37 +02:00
Niels Lohmann
be137609df
Merge pull request #1746 from uhoreg/cmake_arch_indep
make CMake's version config file architecture-independent
2020-04-19 10:09:28 +02:00
Hubert Chathi
2b0e4c7a94 add comments 2020-04-17 15:44:12 -04:00
Niels Lohmann
c5eafe74e8
🔖 set version to 3.7.3 2019-11-17 12:09:12 +01:00
Niels Lohmann
56109eacd7
🔖 set version to 3.7.2 2019-11-10 21:23:39 +01:00
Niels Lohmann
aacdc6bbe3
🔖 set version to 3.7.1 2019-11-06 18:37:26 +01:00
Hubert Chathi
cade804c1a make CMake's version config file architecture-independent 2019-09-10 23:41:38 -04:00
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