Skip to content

Commit

Permalink
Merge branch 'release/3.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Aug 20, 2018
2 parents 183390c + 9f3857e commit 8c20571
Show file tree
Hide file tree
Showing 459 changed files with 9,326 additions and 3,026 deletions.
41 changes: 19 additions & 22 deletions .github/ISSUE_TEMPLATE.md → .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
**Bug Report**

- What is the issue you have?

- Please describe the steps to reproduce the issue. Can you provide a small but working code example?

- What is the expected behavior?

- And what is the actual behavior instead?

- Which compiler and operating system are you using? Is it a [supported compiler](https://github.com/nlohmann/json#supported-compilers)?

- Did you use a released version of the library or the version from the `develop` branch?

- If you experience a compilation error: can you [compile and run the unit tests](https://github.com/nlohmann/json#execute-unit-tests)?


**Feature Request**

- Describe the feature in as much detail as possible.

- Include sample usage where appropriate.
---
name: Bug report
about: Create a report to help us improve

---

- What is the issue you have?

- Please describe the steps to reproduce the issue. Can you provide a small but working code example?

- What is the expected behavior?

- And what is the actual behavior instead?

- Which compiler and operating system are you using? Is it a [supported compiler](https://github.com/nlohmann/json#supported-compilers)?

- Did you use a released version of the library or the version from the `develop` branch?

- If you experience a compilation error: can you [compile and run the unit tests](https://github.com/nlohmann/json#execute-unit-tests)?
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project

---

- Describe the feature in as much detail as possible.

- Include sample usage where appropriate.
33 changes: 28 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ matrix:
- os: osx
osx_image: xcode9.2

- os: osx
osx_image: xcode9.3

- os: osx
osx_image: xcode9.4

# Linux / GCC

- os: linux
Expand Down Expand Up @@ -189,15 +195,23 @@ matrix:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-7', 'ninja-build']

- os: linux
compiler: gcc
env: COMPILER=g++-8
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-8', 'ninja-build']

- os: linux
compiler: gcc
env:
- COMPILER=g++-7
- COMPILER=g++-8
- CXXFLAGS=-std=c++17
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-7', 'ninja-build']
packages: ['g++-8', 'ninja-build']

# Linux / Clang

Expand Down Expand Up @@ -257,15 +271,23 @@ matrix:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0']
packages: ['g++-6', 'clang-5.0', 'ninja-build']

- os: linux
compiler: clang
env: COMPILER=clang++-6.0
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-6.0']
packages: ['g++-6', 'clang-6.0', 'ninja-build']

- os: linux
compiler: clang
env:
- COMPILER=clang++-5.0
- COMPILER=clang++-6.0
- CXXFLAGS=-std=c++1z
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0']
packages: ['g++-6', 'clang-5.0', 'ninja-build']
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-6.0']
packages: ['g++-6', 'clang-6.0', 'ninja-build']

################
# build script #
Expand All @@ -277,6 +299,7 @@ script:
if [[ (-x $(which brew)) ]]; then
brew update
brew install cmake ninja
brew upgrade cmake
cmake --version
fi
Expand Down
24 changes: 17 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
cmake_minimum_required(VERSION 3.0.0)
cmake_minimum_required(VERSION 3.8)

##
## PROJECT
## name and version
##
project(nlohmann_json VERSION 3.1.2 LANGUAGES CXX)
project(nlohmann_json VERSION 3.2.0 LANGUAGES CXX)

##
## INCLUDE
Expand All @@ -22,13 +22,15 @@ option(JSON_MultipleHeaders "Use non-amalgamated version of the library." OFF)
## CONFIGURATION
##
set(NLOHMANN_JSON_TARGET_NAME ${PROJECT_NAME})
set(NLOHMANN_JSON_CONFIG_INSTALL_DIR "lib/cmake/${PROJECT_NAME}")
set(NLOHMANN_JSON_CONFIG_INSTALL_DIR "lib/cmake/${PROJECT_NAME}"
CACHE INTERNAL "")
set(NLOHMANN_JSON_INCLUDE_INSTALL_DIR "include")
set(NLOHMANN_JSON_TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
set(NLOHMANN_JSON_CMAKE_CONFIG_TEMPLATE "cmake/config.cmake.in")
set(NLOHMANN_JSON_CMAKE_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/cmake_config")
set(NLOHMANN_JSON_CMAKE_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}")
set(NLOHMANN_JSON_CMAKE_VERSION_CONFIG_FILE "${NLOHMANN_JSON_CMAKE_CONFIG_DIR}/${PROJECT_NAME}ConfigVersion.cmake")
set(NLOHMANN_JSON_CMAKE_PROJECT_CONFIG_FILE "${NLOHMANN_JSON_CMAKE_CONFIG_DIR}/${PROJECT_NAME}Config.cmake")
set(NLOHMANN_JSON_CMAKE_PROJECT_TARGETS_FILE "${NLOHMANN_JSON_CMAKE_CONFIG_DIR}/${PROJECT_NAME}Targets.cmake")

if (JSON_MultipleHeaders)
set(NLOHMANN_JSON_INCLUDE_BUILD_DIR "${PROJECT_SOURCE_DIR}/include/")
Expand All @@ -43,6 +45,8 @@ endif()
## create target and add include path
##
add_library(${NLOHMANN_JSON_TARGET_NAME} INTERFACE)
add_library(${PROJECT_NAME}::${NLOHMANN_JSON_TARGET_NAME} ALIAS ${NLOHMANN_JSON_TARGET_NAME})
target_compile_features(${NLOHMANN_JSON_TARGET_NAME} INTERFACE cxx_std_11)

target_include_directories(
${NLOHMANN_JSON_TARGET_NAME}
Expand All @@ -51,8 +55,8 @@ target_include_directories(
$<INSTALL_INTERFACE:include>
)

## add debug view defintion file for msvc (natvis) [cmake <= 3.2.2 does not support export of source files]
if (MSVC AND CMAKE_VERSION VERSION_GREATER "3.2.2")
## add debug view definition file for msvc (natvis)
if (MSVC)
set(NLOHMANN_ADD_NATVIS TRUE)
set(NLOHMANN_NATVIS_FILE "nlohmann_json.natvis")
target_sources(
Expand All @@ -62,7 +66,7 @@ if (MSVC AND CMAKE_VERSION VERSION_GREATER "3.2.2")
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/${NLOHMANN_NATVIS_FILE}>
)
endif()

##
## TESTS
## create and configure the unit test target
Expand Down Expand Up @@ -102,12 +106,18 @@ if (NLOHMANN_ADD_NATVIS)
DESTINATION .
)
endif()
export(
TARGETS ${NLOHMANN_JSON_TARGET_NAME}
NAMESPACE ${PROJECT_NAME}::
FILE ${NLOHMANN_JSON_CMAKE_PROJECT_TARGETS_FILE}
)
install(
TARGETS ${NLOHMANN_JSON_TARGET_NAME}
EXPORT ${NLOHMANN_JSON_TARGETS_EXPORT_NAME}
INCLUDES DESTINATION ${NLOHMANN_JSON_INCLUDE_INSTALL_DIR}
)
install(
EXPORT ${NLOHMANN_JSON_TARGETS_EXPORT_NAME}
NAMESPACE ${PROJECT_NAME}::
DESTINATION ${NLOHMANN_JSON_CONFIG_INSTALL_DIR}
)
Loading

0 comments on commit 8c20571

Please sign in to comment.