- 11 May, 2016 6 commits
-
-
Chris Kitching authored
The resulting install tree, when tests are enabled, looks like this: ``` . ├── cmake │ ├── nlohmann_jsonConfig.cmake │ ├── nlohmann_jsonConfigVersion.cmake │ └── nlohmann_jsonTargets.cmake ├── include │ └── nlohmann │ └── json.hpp └── test ├── bin │ └── json_unit └── data ├── json_nlohmann_tests │ ├── all_unicode.json │ └── bom.json ├── json.org │ ├── 1.json │ ├── ... ├── json_roundtrip │ ├── roundtrip01.json │ ├── roundtrip02.json │ └── ... ├── json_tests │ ├── fail10.json │ └── ... └── json_testsuite └── sample.json ``` It has the property that you can invoke the test binary from the root of the install tree and the tests work correctly (you no longer depend on the test binary being run inside the source tree). If tests are disabled, the entire `test/` subtree is omitted. Notice how that yields exactly what you want for using this library in other projects. I do not believe I need to update travis due to this change, as the evil Makefile continues to do in-tree builds. I expect I'll find out soon enough.
-
Chris Kitching authored
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...
-
Chris Kitching authored
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.
-
Chris Kitching authored
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.
-
Chris Kitching authored
-
Chris Kitching authored
-
- 08 May, 2016 2 commits
- 07 May, 2016 3 commits
- 30 Apr, 2016 1 commit
-
-
Niels authored
-
- 29 Apr, 2016 17 commits
- 26 Apr, 2016 4 commits
- 25 Apr, 2016 4 commits
-
-
Niels authored
-
Robert Marki authored
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.
-
Robert Marki authored
- 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
-
Robert Marki authored
-
- 24 Apr, 2016 3 commits
-
-
Robert Marki authored
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.
-
Niels authored
-
Niels authored
-