version 2.3.0

(and CMakeLists whitespace changes)
This commit is contained in:
Patrick Boettcher 2023-11-27 10:20:26 +01:00
parent e3aa397f41
commit 349cba9f7e

View File

@ -12,7 +12,7 @@ endif ()
# TODO: Version 3, rename the project and namespace to something more compact # TODO: Version 3, rename the project and namespace to something more compact
project(nlohmann_json_schema_validator project(nlohmann_json_schema_validator
VERSION 2.2.0 VERSION 2.3.0
DESCRIPTION "Json validator for nlohmann::json library" DESCRIPTION "Json validator for nlohmann::json library"
HOMEPAGE_URL "https://github.com/pboettch/json-schema-validator" HOMEPAGE_URL "https://github.com/pboettch/json-schema-validator"
LANGUAGES CXX) LANGUAGES CXX)
@ -63,16 +63,16 @@ endif ()
set(BUILD_SHARED_LIBS ${nlohmann_json_schema_validator_SHARED_LIBS}) set(BUILD_SHARED_LIBS ${nlohmann_json_schema_validator_SHARED_LIBS})
if (JSON_VALIDATOR_TEST_COVERAGE) if (JSON_VALIDATOR_TEST_COVERAGE)
if (CMAKE_CXX_COMPILER_ID STREQUAL Clang) if (CMAKE_CXX_COMPILER_ID STREQUAL Clang)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-instr-generate -fcoverage-mapping") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-instr-generate -fcoverage-mapping")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL GNU) elseif (CMAKE_CXX_COMPILER_ID STREQUAL GNU)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
else () else ()
message(WARNING message(WARNING
"JsonValidator: Other toolchain coverage flags unknown.\n" "JsonValidator: Other toolchain coverage flags unknown.\n"
"Using --coverage as default") "Using --coverage as default")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
endif () endif ()
endif () endif ()
#[==============================================================================================[ #[==============================================================================================[
@ -106,19 +106,19 @@ endif ()
# Handle configure flags # Handle configure flags
if (JSON_VALIDATOR_INSTALL) if (JSON_VALIDATOR_INSTALL)
# TODO: This is not ideal, this package should not be installing nlohmann::json # TODO: This is not ideal, this package should not be installing nlohmann::json
# Currently required in order to satisfy cmake exporter # Currently required in order to satisfy cmake exporter
set(JSON_Install ON CACHE BOOL "") set(JSON_Install ON CACHE BOOL "")
endif () endif ()
# Get all dependencies # Get all dependencies
FetchContent_MakeAvailable(${fetch_packages}) FetchContent_MakeAvailable(${fetch_packages})
if (JSON_VALIDATOR_INSTALL AND NOT nlohmann_json_FOUND AND JSON_Install) if (JSON_VALIDATOR_INSTALL AND NOT nlohmann_json_FOUND AND JSON_Install)
# TODO: This is not ideal # TODO: This is not ideal
message(WARNING message(WARNING
"JsonValidator: No nlohmann::json found on the system and nlohmann_json_schema_validator will be installed\n" "JsonValidator: No nlohmann::json found on the system and nlohmann_json_schema_validator will be installed\n"
"This will also install nlohmann::json in its typical installation path\n" "This will also install nlohmann::json in its typical installation path\n"
"This is not ideal because it might overwrite system installed") "This is not ideal because it might overwrite system installed")
endif () endif ()
#[==============================================================================================[ #[==============================================================================================[