diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ac59735..0933153f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,6 +108,12 @@ jobs: - run: cmake --build ./build --config Release --target clang_format_test - run: cmake --build ./build --config Release --parallel 4 + - run: > + cmake --install ./build --prefix ./build/dist --config Release --verbose + --component sourcemeta_noa + - run: > + cmake --install ./build --prefix ./build/dist --config Release --verbose + --component sourcemeta_noa_dev - run: > cmake --install ./build --prefix ./build/dist --config Release --verbose --component sourcemeta_jsontoolkit diff --git a/CMakeLists.txt b/CMakeLists.txt index b1e6bd89..a711072f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,6 @@ format based on JSON Schema with \ both schema-driven and schema-less support." HOMEPAGE_URL "https://jsonbinpack.sourcemeta.com") list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") -include(vendor/noa/cmake/noa.cmake) # Options option(JSONBINPACK_NUMERIC "Build the JSON BinPack numeric library" ON) @@ -19,6 +18,8 @@ option(JSONBINPACK_DOCS "Build the JSON BinPack documentation" OFF) option(JSONBINPACK_ADDRESS_SANITIZER "Build JSON BinPack with an address sanitizer" OFF) option(JSONBINPACK_UNDEFINED_SANITIZER "Build JSON BinPack with an undefined behavior sanitizer" OFF) +find_package(Noa REQUIRED) + if(JSONBINPACK_INSTALL) include(GNUInstallDirs) include(CMakePackageConfigHelpers) @@ -80,7 +81,6 @@ endif() # Testing if(JSONBINPACK_TESTS) - find_package(GoogleTest REQUIRED) enable_testing() if(JSONBINPACK_NUMERIC) diff --git a/DEPENDENCIES b/DEPENDENCIES index 02e19217..a983e25a 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -1,6 +1,5 @@ vendorpull https://github.com/sourcemeta/vendorpull 70342aaf458e6cb80baeb5b718901075fc42ede6 -jsontoolkit https://github.com/sourcemeta/jsontoolkit 93a921d0f1e99bfdfe14bfd4d2acf5981294080b -alterschema https://github.com/sourcemeta/alterschema 0fcd3b3b921bd47dc0867477619383f6519939fa -googletest https://github.com/google/googletest 987e225614755fec7253aa95bf959c09e0d380d7 +noa https://github.com/sourcemeta/noa a8d36453236abc365f08a76a486f92c84f976fd9 +jsontoolkit https://github.com/sourcemeta/jsontoolkit 60a3862ad0d9642c97685f94aeaed96ab3509690 +alterschema https://github.com/sourcemeta/alterschema 3579095980f5d53033a457725dd95eca27de96f4 bootstrap https://github.com/twbs/bootstrap 1a6fdfae6be09b09eaced8f0e442ca6f7680a61e -noa https://github.com/sourcemeta/noa 924f5cc8549af7f12227869dcbab4259029ac650 diff --git a/Makefile b/Makefile index b116e5f6..f3c71f21 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,10 @@ configure: .always compile: .always $(CMAKE) --build ./build --config $(PRESET) --target clang_format $(CMAKE) --build ./build --config $(PRESET) --parallel 4 + $(CMAKE) --install ./build --prefix ./build/dist --config $(PRESET) --verbose \ + --component sourcemeta_noa + $(CMAKE) --install ./build --prefix ./build/dist --config $(PRESET) --verbose \ + --component sourcemeta_noa_dev $(CMAKE) --install ./build --prefix ./build/dist --config $(PRESET) --verbose \ --component sourcemeta_jsontoolkit $(CMAKE) --install ./build --prefix ./build/dist --config $(PRESET) --verbose \ diff --git a/cmake/FindNoa.cmake b/cmake/FindNoa.cmake new file mode 100644 index 00000000..16c9f687 --- /dev/null +++ b/cmake/FindNoa.cmake @@ -0,0 +1,12 @@ +if(NOT Noa_FOUND) + if(JSONBINPACK_INSTALL) + set(NOA_INSTALL ON CACHE BOOL "enable Noa installation") + else() + set(NOA_INSTALL OFF CACHE BOOL "disable Noa installation") + endif() + + set(NOA_GOOGLETEST ${JSONBINPACK_TESTS} CACHE BOOL "GoogleTest") + set(NOA_GOOGLEBENCHMARK OFF CACHE BOOL "GoogleBenchmark") + add_subdirectory("${PROJECT_SOURCE_DIR}/vendor/noa") + set(Noa_FOUND ON) +endif() diff --git a/test/compiler/CMakeLists.txt b/test/compiler/CMakeLists.txt index 702051c6..817b7dc3 100644 --- a/test/compiler/CMakeLists.txt +++ b/test/compiler/CMakeLists.txt @@ -1,27 +1,23 @@ -add_executable(sourcemeta_jsonbinpack_compiler_unit - canonicalizer_test.cc compiler_test.cc +noa_googletest(NAMESPACE sourcemeta PROJECT jsonbinpack NAME compiler + FOLDER "JSON BinPack/Compiler" + SOURCES + canonicalizer_test.cc compiler_test.cc - 2020_12_canonicalizer_any_test.cc - 2020_12_canonicalizer_array_test.cc - 2020_12_canonicalizer_boolean_test.cc - 2020_12_canonicalizer_null_test.cc - 2020_12_canonicalizer_number_test.cc - 2020_12_canonicalizer_object_test.cc - 2020_12_canonicalizer_string_test.cc + 2020_12_canonicalizer_any_test.cc + 2020_12_canonicalizer_array_test.cc + 2020_12_canonicalizer_boolean_test.cc + 2020_12_canonicalizer_null_test.cc + 2020_12_canonicalizer_number_test.cc + 2020_12_canonicalizer_object_test.cc + 2020_12_canonicalizer_string_test.cc - 2020_12_compiler_any_test.cc - 2020_12_compiler_integer_test.cc - 2020_12_compiler_number_test.cc) + 2020_12_compiler_any_test.cc + 2020_12_compiler_integer_test.cc + 2020_12_compiler_number_test.cc) -noa_add_default_options(PRIVATE sourcemeta_jsonbinpack_compiler_unit) -target_link_libraries(sourcemeta_jsonbinpack_compiler_unit - PRIVATE GTest::gtest GTest::gtest_main) target_link_libraries(sourcemeta_jsonbinpack_compiler_unit PRIVATE sourcemeta::jsonbinpack::compiler) target_link_libraries(sourcemeta_jsonbinpack_compiler_unit PRIVATE sourcemeta::jsontoolkit::json) target_link_libraries(sourcemeta_jsonbinpack_compiler_unit PRIVATE sourcemeta::jsontoolkit::jsonschema) -gtest_discover_tests(sourcemeta_jsonbinpack_compiler_unit) -set_target_properties(sourcemeta_jsonbinpack_compiler_unit - PROPERTIES FOLDER "JSON BinPack/Compiler") diff --git a/test/numeric/CMakeLists.txt b/test/numeric/CMakeLists.txt index 1dc9c925..e5ba7e19 100644 --- a/test/numeric/CMakeLists.txt +++ b/test/numeric/CMakeLists.txt @@ -1,17 +1,11 @@ -add_executable(sourcemeta_jsonbinpack_numeric_unit - zigzag_test.cc - closest_smallest_exponent_test.cc - divide_ceil_test.cc - divide_floor_test.cc - uint_max_test.cc) +noa_googletest(NAMESPACE sourcemeta PROJECT jsonbinpack NAME numeric + FOLDER "JSON BinPack/Numeric" + SOURCES + zigzag_test.cc + closest_smallest_exponent_test.cc + divide_ceil_test.cc + divide_floor_test.cc + uint_max_test.cc) -noa_add_default_options(PRIVATE sourcemeta_jsonbinpack_numeric_unit) - -target_link_libraries(sourcemeta_jsonbinpack_numeric_unit - PRIVATE GTest::gtest GTest::gtest_main) target_link_libraries(sourcemeta_jsonbinpack_numeric_unit PRIVATE sourcemeta::jsonbinpack::numeric) - -gtest_discover_tests(sourcemeta_jsonbinpack_numeric_unit) -set_target_properties(sourcemeta_jsonbinpack_numeric_unit - PROPERTIES FOLDER "JSON BinPack/Numeric") diff --git a/test/runtime/CMakeLists.txt b/test/runtime/CMakeLists.txt index 26a4aa28..e441d513 100644 --- a/test/runtime/CMakeLists.txt +++ b/test/runtime/CMakeLists.txt @@ -1,43 +1,37 @@ -add_executable(sourcemeta_jsonbinpack_runtime_unit - decode_any_test.cc - decode_array_test.cc - decode_integer_test.cc - decode_number_test.cc - decode_object_test.cc - decode_string_test.cc - decode_test.cc - decode_traits_test.cc - decode_utils.h - encode_any_test.cc - encode_array_test.cc - encode_cache_test.cc - encode_integer_test.cc - encode_number_test.cc - encode_object_test.cc - encode_real_test.cc - encode_string_test.cc - encode_test.cc - encode_traits_test.cc - encode_utils.h - input_stream_varint_test.cc - output_stream_varint_test.cc - encoding_traits_test.cc - v1_loader_test.cc - v1_any_loader_test.cc - v1_array_loader_test.cc - v1_integer_loader_test.cc - v1_number_loader_test.cc - v1_string_loader_test.cc) +noa_googletest(NAMESPACE sourcemeta PROJECT jsonbinpack NAME runtime + FOLDER "JSON BinPack/Runtime" + SOURCES + decode_any_test.cc + decode_array_test.cc + decode_integer_test.cc + decode_number_test.cc + decode_object_test.cc + decode_string_test.cc + decode_test.cc + decode_traits_test.cc + decode_utils.h + encode_any_test.cc + encode_array_test.cc + encode_cache_test.cc + encode_integer_test.cc + encode_number_test.cc + encode_object_test.cc + encode_real_test.cc + encode_string_test.cc + encode_test.cc + encode_traits_test.cc + encode_utils.h + input_stream_varint_test.cc + output_stream_varint_test.cc + encoding_traits_test.cc + v1_loader_test.cc + v1_any_loader_test.cc + v1_array_loader_test.cc + v1_integer_loader_test.cc + v1_number_loader_test.cc + v1_string_loader_test.cc) -noa_add_default_options(PRIVATE sourcemeta_jsonbinpack_runtime_unit) - -target_link_libraries(sourcemeta_jsonbinpack_runtime_unit - PRIVATE GTest::gtest GTest::gtest_main) target_link_libraries(sourcemeta_jsonbinpack_runtime_unit PRIVATE sourcemeta::jsonbinpack::runtime) target_link_libraries(sourcemeta_jsonbinpack_runtime_unit PRIVATE sourcemeta::jsontoolkit::json) - -gtest_discover_tests(sourcemeta_jsonbinpack_runtime_unit) -set_target_properties(sourcemeta_jsonbinpack_runtime_unit - PROPERTIES FOLDER "JSON BinPack/Runtime") diff --git a/vendor/alterschema/CMakeLists.txt b/vendor/alterschema/CMakeLists.txt index ac8608d8..91320a08 100644 --- a/vendor/alterschema/CMakeLists.txt +++ b/vendor/alterschema/CMakeLists.txt @@ -3,7 +3,6 @@ project(alterschema VERSION 0.0.1 LANGUAGES CXX DESCRIPTION "Perform advanced transformations on JSON Schemas" HOMEPAGE_URL "https://alterschema.sourcemeta.com") list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") -include(vendor/noa/cmake/noa.cmake) # Options option(ALTERSCHEMA_ENGINE "Build the AlterSchema Engine library" ON) @@ -14,6 +13,8 @@ option(ALTERSCHEMA_INSTALL "Install the AlterSchema library" ON) option(ALTERSCHEMA_ADDRESS_SANITIZER "Build AlterSchema with an address sanitizer" OFF) option(ALTERSCHEMA_UNDEFINED_SANITIZER "Build AlterSchema with an undefined behavior sanitizer" OFF) +find_package(Noa REQUIRED) + if(ALTERSCHEMA_INSTALL) include(GNUInstallDirs) include(CMakePackageConfigHelpers) @@ -60,7 +61,6 @@ endif() # Testing if(ALTERSCHEMA_TESTS) - find_package(GoogleTest REQUIRED) enable_testing() if(ALTERSCHEMA_ENGINE) diff --git a/vendor/alterschema/vendor/noa/CMakeLists.txt b/vendor/alterschema/vendor/noa/CMakeLists.txt new file mode 100644 index 00000000..45ec1287 --- /dev/null +++ b/vendor/alterschema/vendor/noa/CMakeLists.txt @@ -0,0 +1,105 @@ +cmake_minimum_required(VERSION 3.16) +project(noa VERSION 0.0.0 LANGUAGES CXX + DESCRIPTION "A set of re-usable and opinionated utilities for Sourcemeta projects") +list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") +list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/noa") +include(noa) + +# Options +option(NOA_HASH "Build the Noa Hash library" ON) +option(NOA_FLAT_MAP "Build the Noa Flat Map library" ON) +option(NOA_REGEX "Build the Noa Regex library" ON) +option(NOA_GOOGLETEST "Build the Google Test library" ON) +option(NOA_GOOGLEBENCHMARK "Build the Google Benchmark library" ON) +option(NOA_TESTS "Build the Noa tests" OFF) +option(NOA_BENCHMARK "Build the Noa benchmarks" OFF) +option(NOA_DOCS "Build the Noa docs" OFF) +option(NOA_INSTALL "Install the Noa library" ON) +option(NOA_ADDRESS_SANITIZER "Build Noa with an address sanitizer" OFF) +option(NOA_UNDEFINED_SANITIZER "Build Noa with an undefined behavior sanitizer" OFF) + +if(NOA_INSTALL) + include(GNUInstallDirs) + include(CMakePackageConfigHelpers) + configure_package_config_file( + config.cmake.in + "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" + INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") + write_basic_package_version_file( + "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake" + COMPATIBILITY SameMajorVersion) + install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" + COMPONENT sourcemeta_noa_dev) +endif() + +if(NOA_HASH) + add_subdirectory(src/hash) +endif() + +if(NOA_FLAT_MAP) + add_subdirectory(src/flat_map) +endif() + +if(NOA_REGEX) + find_package(BoostRegex REQUIRED) + add_subdirectory(src/regex) +endif() + +if(NOA_GOOGLETEST) + find_package(GoogleTest REQUIRED) +endif() + +if(NOA_ADDRESS_SANITIZER) + noa_sanitizer(TYPE address) +elseif(NOA_UNDEFINED_SANITIZER) + noa_sanitizer(TYPE undefined) +endif() + +if(NOA_DOCS) + noa_target_doxygen(CONFIG "${PROJECT_SOURCE_DIR}/doxygen/Doxyfile.in" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/website") +endif() + +if(PROJECT_IS_TOP_LEVEL) + noa_target_clang_format(SOURCES + benchmark/*.h benchmark/*.cc + src/*.h src/*.cc + test/*.h test/*.cc) + noa_target_clang_tidy(SOURCES + src/*.h src/*.cc) +endif() + +if(NOA_TESTS AND NOA_GOOGLETEST) + enable_testing() + + if(NOA_HASH) + add_subdirectory(test/hash) + endif() + + if(NOA_FLAT_MAP) + add_subdirectory(test/flat_map) + endif() + + if(NOA_REGEX) + add_subdirectory(test/regex) + endif() + + if(PROJECT_IS_TOP_LEVEL) + # Otherwise we need the child project to link + # against the sanitizers too. + if(NOT NOA_ADDRESS_SANITIZER AND NOT NOA_UNDEFINED_SANITIZER) + add_subdirectory(test/packaging) + endif() + endif() +endif() + +if(NOA_GOOGLEBENCHMARK) + find_package(GoogleBenchmark REQUIRED) +endif() + +if(NOA_BENCHMARK AND NOA_GOOGLEBENCHMARK) + add_subdirectory(benchmark) +endif() diff --git a/vendor/alterschema/vendor/noa/LICENSE b/vendor/alterschema/vendor/noa/LICENSE index efbd81c9..9348973b 100644 --- a/vendor/alterschema/vendor/noa/LICENSE +++ b/vendor/alterschema/vendor/noa/LICENSE @@ -1,661 +1,12 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU Affero General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions -will be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU Affero General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU Affero General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU Affero General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - Noa - A set of re-usable and opinionated utilities for Sourcemeta projects - Copyright (C) 2022 Juan Cruz Viotti - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published - by the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU AGPL, see -. +This software is dual-licensed: you can redistribute it and/or modify it under +the terms of the GNU Affero General Public License as published by the Free +Software Foundation, either version 3 of the License, or (at your option) any +later version. For the terms of this license, see +. + +You are free to use this software under the terms of the GNU Affero General +Public License WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +Alternatively, you can use this software under a commercial license, as set out +in . diff --git a/vendor/jsontoolkit/cmake/FindBoostRegex.cmake b/vendor/alterschema/vendor/noa/cmake/FindBoostRegex.cmake similarity index 94% rename from vendor/jsontoolkit/cmake/FindBoostRegex.cmake rename to vendor/alterschema/vendor/noa/cmake/FindBoostRegex.cmake index 28c214fa..0c8b2724 100644 --- a/vendor/jsontoolkit/cmake/FindBoostRegex.cmake +++ b/vendor/alterschema/vendor/noa/cmake/FindBoostRegex.cmake @@ -137,39 +137,39 @@ if(NOT BoostRegex_FOUND) PRIVATE_HEADER "${BOOST_REGEX_PRIVATE_HEADERS}" EXPORT_NAME boost_regex) - if(JSONTOOLKIT_INSTALL) + if(NOA_INSTALL) include(GNUInstallDirs) install(TARGETS boost_regex EXPORT boost_regex PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/boost" - COMPONENT sourcemeta_jsontoolkit + COMPONENT sourcemeta_noa PRIVATE_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/boost" - COMPONENT sourcemeta_jsontoolkit + COMPONENT sourcemeta_noa RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - COMPONENT sourcemeta_jsontoolkit + COMPONENT sourcemeta_noa LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" - COMPONENT sourcemeta_jsontoolkit - NAMELINK_COMPONENT sourcemeta_jsontoolkit_dev + COMPONENT sourcemeta_noa + NAMELINK_COMPONENT sourcemeta_noa_dev ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - COMPONENT sourcemeta_jsontoolkit_dev) + COMPONENT sourcemeta_noa_dev) install(FILES ${BOOST_REGEX_PRIVATE_HEADERS_REGEX} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/boost/regex" - COMPONENT sourcemeta_jsontoolkit) + COMPONENT sourcemeta_noa) install(FILES ${BOOST_REGEX_PRIVATE_HEADERS_REGEX_CONFIG} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/boost/regex/config" - COMPONENT sourcemeta_jsontoolkit) + COMPONENT sourcemeta_noa) install(FILES ${BOOST_REGEX_PRIVATE_HEADERS_REGEX_PENDING} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/boost/regex/pending" - COMPONENT sourcemeta_jsontoolkit) + COMPONENT sourcemeta_noa) install(FILES ${BOOST_REGEX_PRIVATE_HEADERS_REGEX_V4} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/boost/regex/v4" - COMPONENT sourcemeta_jsontoolkit) + COMPONENT sourcemeta_noa) install(FILES ${BOOST_REGEX_PRIVATE_HEADERS_REGEX_V5} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/boost/regex/v5" - COMPONENT sourcemeta_jsontoolkit) + COMPONENT sourcemeta_noa) install(EXPORT boost_regex DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/boostregex" - COMPONENT sourcemeta_jsontoolkit_dev) + COMPONENT sourcemeta_noa_dev) file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/boostregex-config.cmake "include(\"\${CMAKE_CURRENT_LIST_DIR}/boost_regex.cmake\")\n" @@ -177,7 +177,7 @@ if(NOT BoostRegex_FOUND) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/boostregex-config.cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/boostregex" - COMPONENT sourcemeta_jsontoolkit_dev) + COMPONENT sourcemeta_noa_dev) endif() set(BoostRegex_FOUND ON) diff --git a/vendor/jsontoolkit/cmake/FindGoogleBenchmark.cmake b/vendor/alterschema/vendor/noa/cmake/FindGoogleBenchmark.cmake similarity index 100% rename from vendor/jsontoolkit/cmake/FindGoogleBenchmark.cmake rename to vendor/alterschema/vendor/noa/cmake/FindGoogleBenchmark.cmake diff --git a/cmake/FindGoogleTest.cmake b/vendor/alterschema/vendor/noa/cmake/FindGoogleTest.cmake similarity index 70% rename from cmake/FindGoogleTest.cmake rename to vendor/alterschema/vendor/noa/cmake/FindGoogleTest.cmake index 99c2c02e..18eb1184 100644 --- a/cmake/FindGoogleTest.cmake +++ b/vendor/alterschema/vendor/noa/cmake/FindGoogleTest.cmake @@ -1,7 +1,6 @@ if(NOT GoogleTest_FOUND) - set(BUILD_GMOCK OFF CACHE BOOL "disable googlemock") + set(BUILD_GMOCK ON CACHE BOOL "enable googlemock") set(INSTALL_GTEST OFF CACHE BOOL "disable installation") add_subdirectory("${PROJECT_SOURCE_DIR}/vendor/googletest") - include(GoogleTest) set(GoogleTest_FOUND ON) endif() diff --git a/vendor/alterschema/vendor/noa/cmake/noa/compiler/options.cmake b/vendor/alterschema/vendor/noa/cmake/noa/compiler/options.cmake index dde90f21..5db0e8e0 100644 --- a/vendor/alterschema/vendor/noa/cmake/noa/compiler/options.cmake +++ b/vendor/alterschema/vendor/noa/cmake/noa/compiler/options.cmake @@ -8,7 +8,7 @@ function(noa_add_default_options visibility target) /WL /MP /sdl) - else() + elseif(NOA_COMPILER_LLVM OR NOA_COMPILER_GCC) target_compile_options("${target}" ${visibility} -Wall -Wextra diff --git a/vendor/alterschema/vendor/noa/cmake/noa/defaults.cmake b/vendor/alterschema/vendor/noa/cmake/noa/defaults.cmake index 0709ee22..d942923c 100644 --- a/vendor/alterschema/vendor/noa/cmake/noa/defaults.cmake +++ b/vendor/alterschema/vendor/noa/cmake/noa/defaults.cmake @@ -1,56 +1,56 @@ # Standards (sane modern defaults) if("CXX" IN_LIST NOA_LANGUAGES) - set(CMAKE_CXX_STANDARD 20) + set(CMAKE_CXX_STANDARD 20 PARENT_SCOPE) endif() if("C" IN_LIST NOA_LANGUAGES) - set(CMAKE_C_STANDARD 11) + set(CMAKE_C_STANDARD 11 PARENT_SCOPE) endif() if("OBJCXX" IN_LIST NOA_LANGUAGES) - set(CMAKE_OBJCXX_STANDARD "${CMAKE_CXX_STANDARD}") + set(CMAKE_OBJCXX_STANDARD "${CMAKE_CXX_STANDARD}" PARENT_SCOPE) endif() # Hide symbols from shared libraries by default # In certain compilers, like GCC and Clang, # symbols are visible by default. -set(CMAKE_VISIBILITY_INLINES_HIDDEN YES) +set(CMAKE_VISIBILITY_INLINES_HIDDEN YES PARENT_SCOPE) if("CXX" IN_LIST NOA_LANGUAGES) - set(CMAKE_CXX_VISIBILITY_PRESET hidden) + set(CMAKE_CXX_VISIBILITY_PRESET hidden PARENT_SCOPE) endif() if("C" IN_LIST NOA_LANGUAGES) - set(CMAKE_C_VISIBILITY_PRESET hidden) + set(CMAKE_C_VISIBILITY_PRESET hidden PARENT_SCOPE) endif() if("OBJCXX" IN_LIST NOA_LANGUAGES) - set(CMAKE_OBJCXX_VISIBILITY_PRESET hidden) + set(CMAKE_OBJCXX_VISIBILITY_PRESET hidden PARENT_SCOPE) endif() # By default, stay within ISO C++ if("CXX" IN_LIST NOA_LANGUAGES) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) + set(CMAKE_CXX_STANDARD_REQUIRED ON PARENT_SCOPE) + set(CMAKE_CXX_EXTENSIONS OFF PARENT_SCOPE) endif() if("C" IN_LIST NOA_LANGUAGES) - set(CMAKE_C_STANDARD_REQUIRED ON) - set(CMAKE_C_EXTENSIONS OFF) + set(CMAKE_C_STANDARD_REQUIRED ON PARENT_SCOPE) + set(CMAKE_C_EXTENSIONS OFF PARENT_SCOPE) endif() if("OBJCXX" IN_LIST NOA_LANGUAGES) - set(CMAKE_OBJCXX_STANDARD_REQUIRED ON) - set(CMAKE_OBJCXX_EXTENSIONS OFF) + set(CMAKE_OBJCXX_STANDARD_REQUIRED ON PARENT_SCOPE) + set(CMAKE_OBJCXX_EXTENSIONS OFF PARENT_SCOPE) endif() # Export compile commands by default. # It is very useful for IDE integration, linting, etc -set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON PARENT_SCOPE) # Prevent DT_RPATH/DT_RUNPATH problem # This problem is not present on Apple platforms. # See https://www.youtube.com/watch?v=m0DwB4OvDXk if(NOT APPLE) - set(CMAKE_INSTALL_RPATH $ORIGIN) + set(CMAKE_INSTALL_RPATH $ORIGIN PARENT_SCOPE) endif() # Delay GoogleTest discovery until before running the tests # See https://discourse.cmake.org/t/default-value-for-new-discovery-mode-option-for-gtest-discover-tests/1422 -set(CMAKE_GTEST_DISCOVER_TESTS_DISCOVERY_MODE PRE_TEST) +set(CMAKE_GTEST_DISCOVER_TESTS_DISCOVERY_MODE PRE_TEST PARENT_SCOPE) # Always use folders in IDE # See https://cmake.org/cmake/help/latest/prop_gbl/USE_FOLDERS.html @@ -73,22 +73,23 @@ endif() # Enable IPO/LTO to help the compiler optimize across modules. # Only do so in release, given these optimizations can significantly # increase build times. -# See: https://cmake.org/cmake/help/latest/module/CheckIPOSupported.html -if(CMAKE_BUILD_TYPE STREQUAL "Release" AND NOT BUILD_SHARED_LIBS) - include(CheckIPOSupported) - check_ipo_supported(RESULT ipo_supported OUTPUT ipo_supported_error) - if(ipo_supported) - # TODO: Make IPO/LTO work on Linux + LLVM - if(APPLE OR NOT NOA_COMPILER_LLVM) - message(STATUS "Enabling IPO") - cmake_policy(SET CMP0069 NEW) - set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON) - else() - message(WARNING "Avoiding IPO on this configuration") - endif() - else() - message(WARNING "IPO not supported: ${ipo_supported_error}") - endif() - unset(ipo_supported) - unset(ipo_supported_error) + +# Note we don't use CheckIPOSupported and CMAKE_INTERPROCEDURAL_OPTIMIZATION, +# as those CMake features can only enable thin LTO. For Fat LTO, see: +# - https://gcc.gnu.org/onlinedocs/gccint/LTO-Overview.html +# - https://llvm.org/docs/FatLTO.html + +if(NOA_COMPILER_GCC AND CMAKE_BUILD_TYPE STREQUAL "Release" AND NOT BUILD_SHARED_LIBS) + message(STATUS "Enabling Fat LTO") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto -ffat-lto-objects" PARENT_SCOPE) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto" PARENT_SCOPE) + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flto" PARENT_SCOPE) +endif() + +# TODO: Make this work on Linux on LLVM +if(NOA_COMPILER_LLVM AND CMAKE_BUILD_TYPE STREQUAL "Release" AND NOT BUILD_SHARED_LIBS AND APPLE) + message(STATUS "Enabling Fat LTO") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto=full" PARENT_SCOPE) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto=full" PARENT_SCOPE) + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flto=full" PARENT_SCOPE) endif() diff --git a/vendor/jsontoolkit/vendor/noa/cmake/noa.cmake b/vendor/alterschema/vendor/noa/cmake/noa/noa.cmake similarity index 67% rename from vendor/jsontoolkit/vendor/noa/cmake/noa.cmake rename to vendor/alterschema/vendor/noa/cmake/noa/noa.cmake index d55ca540..b794fd4d 100644 --- a/vendor/jsontoolkit/vendor/noa/cmake/noa.cmake +++ b/vendor/alterschema/vendor/noa/cmake/noa/noa.cmake @@ -1,13 +1,16 @@ -set(NOA_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/noa") +set(NOA_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}") include("${NOA_DIRECTORY}/shim.cmake") include("${NOA_DIRECTORY}/variables.cmake") include("${NOA_DIRECTORY}/defaults.cmake") include("${NOA_DIRECTORY}/compiler/sanitizer.cmake") include("${NOA_DIRECTORY}/compiler/options.cmake") -include("${NOA_DIRECTORY}/library.cmake") include("${NOA_DIRECTORY}/options/enum.cmake") include("${NOA_DIRECTORY}/commands/copy-file.cmake") +include("${NOA_DIRECTORY}/targets/library.cmake") +include("${NOA_DIRECTORY}/targets/executable.cmake") include("${NOA_DIRECTORY}/targets/clang-format.cmake") include("${NOA_DIRECTORY}/targets/clang-tidy.cmake") include("${NOA_DIRECTORY}/targets/shellcheck.cmake") include("${NOA_DIRECTORY}/targets/doxygen.cmake") +include("${NOA_DIRECTORY}/targets/googletest.cmake") +include("${NOA_DIRECTORY}/targets/googlebenchmark.cmake") diff --git a/vendor/alterschema/vendor/noa/cmake/noa/shim.cmake b/vendor/alterschema/vendor/noa/cmake/noa/shim.cmake index e2b63255..f5668919 100644 --- a/vendor/alterschema/vendor/noa/cmake/noa/shim.cmake +++ b/vendor/alterschema/vendor/noa/cmake/noa/shim.cmake @@ -1,5 +1,5 @@ # The PROJECT_IS_TOP_LEVEL handy variable is only # available on CMake >=3.21. if(NOT DEFINED PROJECT_IS_TOP_LEVEL AND "${CMAKE_PROJECT_NAME}" STREQUAL "${PROJECT_NAME}") - set(PROJECT_IS_TOP_LEVEL YES) + set(PROJECT_IS_TOP_LEVEL YES PARENT_SCOPE) endif() diff --git a/vendor/alterschema/vendor/noa/cmake/noa/targets/clang-format.cmake b/vendor/alterschema/vendor/noa/cmake/noa/targets/clang-format.cmake index c12b1c5b..a788e6ee 100644 --- a/vendor/alterschema/vendor/noa/cmake/noa/targets/clang-format.cmake +++ b/vendor/alterschema/vendor/noa/cmake/noa/targets/clang-format.cmake @@ -1,5 +1,3 @@ -set(NOA_TARGET_CLANG_FORMAT_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}") - function(noa_target_clang_format) cmake_parse_arguments(NOA_TARGET_CLANG_FORMAT "REQUIRED" "" "SOURCES" ${ARGN}) @@ -16,7 +14,7 @@ function(noa_target_clang_format) file(GLOB_RECURSE NOA_TARGET_CLANG_FORMAT_FILES ${NOA_TARGET_CLANG_FORMAT_SOURCES}) - set(CLANG_FORMAT_CONFIG "${NOA_TARGET_CLANG_FORMAT_DIRECTORY}/clang-format.config") + set(CLANG_FORMAT_CONFIG "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/clang-format.config") if(CLANG_FORMAT_BIN) add_custom_target(clang_format WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" diff --git a/vendor/alterschema/vendor/noa/cmake/noa/targets/clang-tidy.cmake b/vendor/alterschema/vendor/noa/cmake/noa/targets/clang-tidy.cmake index 6dbb43b5..c3767411 100644 --- a/vendor/alterschema/vendor/noa/cmake/noa/targets/clang-tidy.cmake +++ b/vendor/alterschema/vendor/noa/cmake/noa/targets/clang-tidy.cmake @@ -1,5 +1,3 @@ -set(NOA_TARGET_CLANG_TIDY_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}") - function(noa_target_clang_tidy) cmake_parse_arguments(NOA_TARGET_CLANG_TIDY "REQUIRED" "" "SOURCES" ${ARGN}) @@ -37,7 +35,7 @@ function(noa_target_clang_tidy) file(GLOB_RECURSE NOA_TARGET_CLANG_TIDY_FILES ${NOA_TARGET_CLANG_TIDY_SOURCES}) - set(CLANG_TIDY_CONFIG "${NOA_TARGET_CLANG_TIDY_DIRECTORY}/clang-tidy.config") + set(CLANG_TIDY_CONFIG "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/clang-tidy.config") if(CLANG_TIDY_BIN) add_custom_target(clang_tidy WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" diff --git a/vendor/alterschema/vendor/noa/cmake/noa/targets/executable.cmake b/vendor/alterschema/vendor/noa/cmake/noa/targets/executable.cmake new file mode 100644 index 00000000..97a49fae --- /dev/null +++ b/vendor/alterschema/vendor/noa/cmake/noa/targets/executable.cmake @@ -0,0 +1,35 @@ +function(noa_executable) + cmake_parse_arguments(NOA_EXECUTABLE "" + "NAMESPACE;PROJECT;NAME;FOLDER;VARIANT;OUTPUT" "SOURCES" ${ARGN}) + + if(NOT NOA_EXECUTABLE_PROJECT) + message(FATAL_ERROR "You must pass the project name using the PROJECT option") + endif() + if(NOT NOA_EXECUTABLE_NAME) + message(FATAL_ERROR "You must pass the executable name using the NAME option") + endif() + if(NOT NOA_EXECUTABLE_FOLDER) + message(FATAL_ERROR "You must pass the folder name using the FOLDER option") + endif() + if(NOT NOA_EXECUTABLE_SOURCES) + message(FATAL_ERROR "You must pass the sources list using the SOURCES option") + endif() + + if(NOA_EXECUTABLE_NAMESPACE) + set(TARGET_NAME "${NOA_EXECUTABLE_NAMESPACE}_${NOA_EXECUTABLE_PROJECT}_${NOA_EXECUTABLE_NAME}") + else() + set(TARGET_NAME "${NOA_EXECUTABLE_PROJECT}_${NOA_EXECUTABLE_NAME}") + endif() + + if(NOA_EXECUTABLE_VARIANT) + set(TARGET_NAME "${TARGET_NAME}_${NOA_EXECUTABLE_VARIANT}") + endif() + + if(NOA_EXECUTABLE_OUTPUT) + set("${NOA_EXECUTABLE_OUTPUT}" "${TARGET_NAME}" PARENT_SCOPE) + endif() + + add_executable("${TARGET_NAME}" ${NOA_EXECUTABLE_SOURCES}) + noa_add_default_options(PRIVATE ${TARGET_NAME}) + set_target_properties("${TARGET_NAME}" PROPERTIES FOLDER "${NOA_EXECUTABLE_FOLDER}") +endfunction() diff --git a/vendor/alterschema/vendor/noa/cmake/noa/targets/googlebenchmark.cmake b/vendor/alterschema/vendor/noa/cmake/noa/targets/googlebenchmark.cmake new file mode 100644 index 00000000..f7068346 --- /dev/null +++ b/vendor/alterschema/vendor/noa/cmake/noa/targets/googlebenchmark.cmake @@ -0,0 +1,26 @@ +function(noa_googlebenchmark) + cmake_parse_arguments(NOA_GOOGLEBENCHMARK "" + "NAMESPACE;PROJECT;FOLDER" "SOURCES" ${ARGN}) + + if(NOT NOA_GOOGLEBENCHMARK_PROJECT) + message(FATAL_ERROR "You must pass the project name using the PROJECT option") + endif() + if(NOT NOA_GOOGLEBENCHMARK_FOLDER) + message(FATAL_ERROR "You must pass the folder name using the FOLDER option") + endif() + if(NOT NOA_GOOGLEBENCHMARK_SOURCES) + message(FATAL_ERROR "You must pass the sources list using the SOURCES option") + endif() + + if(NOA_GOOGLEBENCHMARK_NAMESPACE) + set(TARGET_NAME "${NOA_GOOGLEBENCHMARK_NAMESPACE}_${NOA_GOOGLEBENCHMARK_PROJECT}_benchmark") + else() + set(TARGET_NAME "${NOA_GOOGLEBENCHMARK_PROJECT}_benchmark") + endif() + + add_executable("${TARGET_NAME}" ${NOA_GOOGLEBENCHMARK_SOURCES}) + noa_add_default_options(PRIVATE ${TARGET_NAME}) + set_target_properties("${TARGET_NAME}" PROPERTIES FOLDER "${NOA_GOOGLEBENCHMARK_FOLDER}") + target_link_libraries("${TARGET_NAME}" PRIVATE benchmark::benchmark) + target_link_libraries("${TARGET_NAME}" PRIVATE benchmark::benchmark_main) +endfunction() diff --git a/vendor/alterschema/vendor/noa/cmake/noa/targets/googletest.cmake b/vendor/alterschema/vendor/noa/cmake/noa/targets/googletest.cmake new file mode 100644 index 00000000..ee8482b9 --- /dev/null +++ b/vendor/alterschema/vendor/noa/cmake/noa/targets/googletest.cmake @@ -0,0 +1,24 @@ +function(noa_googletest) + cmake_parse_arguments(NOA_GOOGLETEST "" + "NAMESPACE;PROJECT;NAME;FOLDER;VARIANT" "SOURCES" ${ARGN}) + + if(NOA_GOOGLETEST_VARIANT) + set(TARGET_VARIANT "${NOA_GOOGLETEST_VARIANT}_unit") + else() + set(TARGET_VARIANT "unit") + endif() + + noa_executable( + NAMESPACE "${NOA_GOOGLETEST_NAMESPACE}" + PROJECT "${NOA_GOOGLETEST_PROJECT}" + NAME "${NOA_GOOGLETEST_NAME}" + FOLDER "${NOA_GOOGLETEST_FOLDER}" + VARIANT "${TARGET_VARIANT}" + SOURCES "${NOA_GOOGLETEST_SOURCES}" + OUTPUT TARGET_NAME) + + target_link_libraries("${TARGET_NAME}" + PRIVATE GTest::gtest GTest::gmock GTest::gtest_main) + add_test(NAME "${NOA_GOOGLETEST_PROJECT}.${NOA_GOOGLETEST_NAME}" + COMMAND "${TARGET_NAME}" --gtest_brief=1) +endfunction() diff --git a/vendor/jsontoolkit/vendor/noa/cmake/noa/library.cmake b/vendor/alterschema/vendor/noa/cmake/noa/targets/library.cmake similarity index 95% rename from vendor/jsontoolkit/vendor/noa/cmake/noa/library.cmake rename to vendor/alterschema/vendor/noa/cmake/noa/targets/library.cmake index 8dce5031..03311504 100644 --- a/vendor/jsontoolkit/vendor/noa/cmake/noa/library.cmake +++ b/vendor/alterschema/vendor/noa/cmake/noa/targets/library.cmake @@ -79,13 +79,13 @@ function(noa_library) "$") endif() - if(NOA_LIBRARY_SOURCES) - if(NOA_LIBRARY_VARIANT) - set(export_name "${NOA_LIBRARY_PROJECT}::${NOA_LIBRARY_NAME}::${NOA_LIBRARY_VARIANT}") - else() - set(export_name "${NOA_LIBRARY_PROJECT}::${NOA_LIBRARY_NAME}") - endif() + if(NOA_LIBRARY_VARIANT) + set(export_name "${NOA_LIBRARY_PROJECT}::${NOA_LIBRARY_NAME}::${NOA_LIBRARY_VARIANT}") + else() + set(export_name "${NOA_LIBRARY_PROJECT}::${NOA_LIBRARY_NAME}") + endif() + if(NOA_LIBRARY_SOURCES) set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME ${TARGET_NAME} @@ -99,6 +99,7 @@ function(noa_library) OUTPUT_NAME ${TARGET_NAME} PUBLIC_HEADER "${PUBLIC_HEADER}" PRIVATE_HEADER "${ABSOLUTE_PRIVATE_HEADERS}" + EXPORT_NAME "${export_name}" FOLDER "${NOA_LIBRARY_FOLDER}") endif() diff --git a/vendor/alterschema/vendor/noa/cmake/noa/targets/shellcheck.cmake b/vendor/alterschema/vendor/noa/cmake/noa/targets/shellcheck.cmake index 03f0a10d..65622470 100644 --- a/vendor/alterschema/vendor/noa/cmake/noa/targets/shellcheck.cmake +++ b/vendor/alterschema/vendor/noa/cmake/noa/targets/shellcheck.cmake @@ -1,5 +1,3 @@ -set(NOA_TARGET_SHELLCHECK_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}") - function(noa_target_shellcheck) cmake_parse_arguments(NOA_TARGET_SHELLCHECK "REQUIRED" "" "SOURCES" ${ARGN}) diff --git a/vendor/alterschema/vendor/noa/cmake/noa/variables.cmake b/vendor/alterschema/vendor/noa/cmake/noa/variables.cmake index d2948985..dff65711 100644 --- a/vendor/alterschema/vendor/noa/cmake/noa/variables.cmake +++ b/vendor/alterschema/vendor/noa/cmake/noa/variables.cmake @@ -4,9 +4,9 @@ get_property(NOA_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES) # Compiler detection (C++) # TODO: Detect compilers on programming languages other than C++ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") - set(NOA_COMPILER_LLVM ON) + set(NOA_COMPILER_LLVM ON PARENT_SCOPE) elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - set(NOA_COMPILER_GCC ON) + set(NOA_COMPILER_GCC ON PARENT_SCOPE) elseif(MSVC) - set(NOA_COMPILER_MSVC ON) + set(NOA_COMPILER_MSVC ON PARENT_SCOPE) endif() diff --git a/vendor/alterschema/vendor/noa/config.cmake.in b/vendor/alterschema/vendor/noa/config.cmake.in new file mode 100644 index 00000000..ef5baf7f --- /dev/null +++ b/vendor/alterschema/vendor/noa/config.cmake.in @@ -0,0 +1,27 @@ +@PACKAGE_INIT@ + +# Support both casing styles +list(APPEND NOA_COMPONENTS ${Noa_FIND_COMPONENTS}) +list(APPEND NOA_COMPONENTS ${noa_FIND_COMPONENTS}) +if(NOT NOA_COMPONENTS) + list(APPEND NOA_COMPONENTS hash) + list(APPEND NOA_COMPONENTS flat_map) + list(APPEND NOA_COMPONENTS regex) +endif() + +include(CMakeFindDependencyMacro) + +foreach(component ${NOA_COMPONENTS}) + if(component STREQUAL "hash") + include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_noa_hash.cmake") + elseif(component STREQUAL "flat_map") + include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_noa_flat_map.cmake") + elseif(component STREQUAL "regex") + find_dependency(BoostRegex) + include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_noa_regex.cmake") + else() + message(FATAL_ERROR "Unknown Noa component: ${component}") + endif() +endforeach() + +check_required_components("@PROJECT_NAME@") diff --git a/vendor/alterschema/vendor/noa/src/flat_map/CMakeLists.txt b/vendor/alterschema/vendor/noa/src/flat_map/CMakeLists.txt new file mode 100644 index 00000000..37e01dd2 --- /dev/null +++ b/vendor/alterschema/vendor/noa/src/flat_map/CMakeLists.txt @@ -0,0 +1,7 @@ +include(noa) + +noa_library(NAMESPACE sourcemeta PROJECT noa NAME flat_map FOLDER "Noa/Flat Map") + +if(NOA_INSTALL) + noa_library_install(NAMESPACE sourcemeta PROJECT noa NAME flat_map) +endif() diff --git a/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_flat_map.h b/vendor/alterschema/vendor/noa/src/flat_map/include/sourcemeta/noa/flat_map.h similarity index 92% rename from vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_flat_map.h rename to vendor/alterschema/vendor/noa/src/flat_map/include/sourcemeta/noa/flat_map.h index d9aa5d4b..e253326c 100644 --- a/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_flat_map.h +++ b/vendor/alterschema/vendor/noa/src/flat_map/include/sourcemeta/noa/flat_map.h @@ -1,5 +1,5 @@ -#ifndef SOURCEMETA_JSONTOOLKIT_JSON_FLAT_MAP_H_ -#define SOURCEMETA_JSONTOOLKIT_JSON_FLAT_MAP_H_ +#ifndef SOURCEMETA_NOA_FLAT_MAP_H_ +#define SOURCEMETA_NOA_FLAT_MAP_H_ #include // std::swap #include // assert @@ -8,16 +8,19 @@ #include // std::pair, std::move #include // std::vector -namespace sourcemeta::jsontoolkit { +/// @defgroup flat_map Flat Map -/// @ingroup json +namespace sourcemeta::noa { + +// TODO: Allow passing custom allocators +/// @ingroup flat_map template class FlatMap { public: FlatMap() = default; using key_type = Key; using mapped_type = Value; - using hash_type = typename Hash::property_hash_type; + using hash_type = typename Hash::hash_type; using value_type = std::pair; struct Entry { @@ -55,7 +58,7 @@ template class FlatMap { auto assign(key_type &&key, mapped_type &&value) -> hash_type { const auto key_hash{this->hash(key)}; - if (key_hash.is_perfect()) { + if (this->hasher.is_perfect(key_hash)) { for (auto &entry : this->data) { if (entry.hash == key_hash) { entry.second = std::move(value); @@ -78,7 +81,7 @@ template class FlatMap { auto assign(const key_type &key, const mapped_type &value) -> hash_type { const auto key_hash{this->hash(key)}; - if (key_hash.is_perfect()) { + if (this->hasher.is_perfect(key_hash)) { for (auto &entry : this->data) { if (entry.hash == key_hash) { entry.second = value; @@ -104,7 +107,7 @@ template class FlatMap { assert(this->hash(key) == key_hash); // Move the perfect hash condition out of the loop for extra performance - if (key_hash.is_perfect()) { + if (this->hasher.is_perfect(key_hash)) { for (size_type index = 0; index < this->data.size(); index++) { if (this->data[index].hash == key_hash) { auto iterator{this->cbegin()}; @@ -131,7 +134,7 @@ template class FlatMap { assert(this->hash(key) == key_hash); // Move the perfect hash condition out of the loop for extra performance - if (key_hash.is_perfect()) { + if (this->hasher.is_perfect(key_hash)) { for (const auto &entry : this->data) { if (entry.hash == key_hash) { return true; @@ -155,7 +158,7 @@ template class FlatMap { assert(this->hash(key) == key_hash); // Move the perfect hash condition out of the loop for extra performance - if (key_hash.is_perfect()) { + if (this->hasher.is_perfect(key_hash)) { for (const auto &entry : this->data) { if (entry.hash == key_hash) { return entry.second; @@ -182,7 +185,7 @@ template class FlatMap { assert(this->hash(key) == key_hash); // Move the perfect hash condition out of the loop for extra performance - if (key_hash.is_perfect()) { + if (this->hasher.is_perfect(key_hash)) { for (auto &entry : this->data) { if (entry.hash == key_hash) { return entry.second; @@ -207,7 +210,7 @@ template class FlatMap { auto erase(const key_type &key, const hash_type key_hash) -> size_type { const auto current_size{this->size()}; - if (key_hash.is_perfect()) { + if (this->hasher.is_perfect(key_hash)) { for (auto &entry : this->data) { if (entry.hash == key_hash) { std::swap(entry, this->data.back()); @@ -262,6 +265,6 @@ template class FlatMap { Hash hasher; }; -} // namespace sourcemeta::jsontoolkit +} // namespace sourcemeta::noa #endif diff --git a/vendor/alterschema/vendor/noa/src/hash/CMakeLists.txt b/vendor/alterschema/vendor/noa/src/hash/CMakeLists.txt new file mode 100644 index 00000000..28748a3d --- /dev/null +++ b/vendor/alterschema/vendor/noa/src/hash/CMakeLists.txt @@ -0,0 +1,7 @@ +include(noa) + +noa_library(NAMESPACE sourcemeta PROJECT noa NAME hash FOLDER "Noa/Hash") + +if(NOA_INSTALL) + noa_library_install(NAMESPACE sourcemeta PROJECT noa NAME hash) +endif() diff --git a/vendor/alterschema/vendor/noa/src/hash/include/sourcemeta/noa/hash.h b/vendor/alterschema/vendor/noa/src/hash/include/sourcemeta/noa/hash.h new file mode 100644 index 00000000..a5f2ee33 --- /dev/null +++ b/vendor/alterschema/vendor/noa/src/hash/include/sourcemeta/noa/hash.h @@ -0,0 +1,25 @@ +#ifndef SOURCEMETA_NOA_HASH_H_ +#define SOURCEMETA_NOA_HASH_H_ + +/// @defgroup hash Hash + +namespace sourcemeta::noa { + +// @ingroup hash +template struct StandardHash { + using hash_type = std::size_t; + inline auto operator()(const T &value) const -> hash_type { + return this->hasher(value); + } + + inline auto is_perfect(const hash_type &) const noexcept -> bool { + return false; + } + +private: + std::hash hasher; +}; + +} // namespace sourcemeta::noa + +#endif diff --git a/vendor/alterschema/vendor/noa/src/regex/CMakeLists.txt b/vendor/alterschema/vendor/noa/src/regex/CMakeLists.txt new file mode 100644 index 00000000..9a5c8168 --- /dev/null +++ b/vendor/alterschema/vendor/noa/src/regex/CMakeLists.txt @@ -0,0 +1,10 @@ +include(noa) + +noa_library(NAMESPACE sourcemeta PROJECT noa NAME regex + FOLDER "Noa/Regex") + +if(NOA_INSTALL) + noa_library_install(NAMESPACE sourcemeta PROJECT noa NAME regex) +endif() + +target_link_libraries(sourcemeta_noa_regex INTERFACE Boost::regex) diff --git a/vendor/alterschema/vendor/noa/src/regex/include/sourcemeta/noa/regex.h b/vendor/alterschema/vendor/noa/src/regex/include/sourcemeta/noa/regex.h new file mode 100644 index 00000000..71569c71 --- /dev/null +++ b/vendor/alterschema/vendor/noa/src/regex/include/sourcemeta/noa/regex.h @@ -0,0 +1,191 @@ +#ifndef SOURCEMETA_NOA_REGEX_H_ +#define SOURCEMETA_NOA_REGEX_H_ + +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdocumentation" +#pragma clang diagnostic ignored "-Wsign-conversion" +#pragma clang diagnostic ignored "-Wshorten-64-to-32" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsign-conversion" +#pragma GCC diagnostic ignored "-Wconversion" +#endif +#include +#if defined(__clang__) +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#endif + +#include // assert +#include // std::uint8_t, std::uint64_t +#include // std::optional +#include // std::regex +#include // std::stoull +#include // std::pair +#include // std::variant + +/// @defgroup regex Regex + +namespace sourcemeta::noa { + +/// @ingroup regex +template using RegexTypeBoost = boost::basic_regex; + +/// @ingroup regex +template using RegexTypePrefix = T; + +/// @ingroup regex +struct RegexTypeNonEmpty {}; + +/// @ingroup regex +using RegexTypeRange = std::pair; + +/// @ingroup regex +template using RegexTypeStd = std::basic_regex; + +/// @ingroup regex +struct RegexTypeNoop {}; + +/// @ingroup regex +template +using Regex = + std::variant, RegexTypePrefix, + RegexTypeNonEmpty, RegexTypeRange, + RegexTypeStd, RegexTypeNoop>; +#if !defined(DOXYGEN) +// For fast internal dispatching. It must stay in sync with the variant above +enum class RegexIndex : std::uint8_t { + Boost = 0, + Prefix, + NonEmpty, + Range, + Std, + Noop +}; +#endif + +/// @ingroup regex +/// +/// Compile a regular expression from a string. If the regular expression is +/// invalid, no value is returned. For example: +/// +/// ```cpp +/// #include +/// #include +/// +/// const sourcemeta::noa::Regex regex{ +/// sourcemeta::noa::to_regex("^foo")}; +/// assert(regex.has_value()); +/// ``` +template +auto to_regex(const T &pattern) -> std::optional> { + if (pattern == ".*" || pattern == "^.*$" || pattern == "^(.*)$" || + pattern == "(.*)" || pattern == "[\\s\\S]*" || pattern == "^[\\s\\S]*$") { + return RegexTypeNoop{}; + } else if (pattern == ".+" || pattern == "^.+$" || pattern == "^(.+)$" || + pattern == ".") { + return RegexTypeNonEmpty{}; + } + + const std::regex PREFIX_REGEX{R"(^\^([a-zA-Z0-9-_/@]+)(\.\*)?)"}; + std::smatch matches_prefix; + if (std::regex_match(pattern, matches_prefix, PREFIX_REGEX)) { + return RegexTypePrefix{matches_prefix[1].str()}; + } + + const std::regex RANGE_REGEX{R"(^\^\.\{(\d+),(\d+)\}\$$)"}; + std::smatch matches_range; + if (std::regex_match(pattern, matches_range, RANGE_REGEX)) { + const std::uint64_t minimum{std::stoull(matches_range[1].str())}; + const std::uint64_t maximum{std::stoull(matches_range[2].str())}; + assert(minimum <= maximum); + return RegexTypeRange{minimum, maximum}; + } + + RegexTypeBoost result{ + pattern, + boost::regex::no_except | + // See https://en.cppreference.com/w/cpp/regex/basic_regex/constants + boost::regex::ECMAScript | + + // When performing matches, all marked sub-expressions (expr) are + // treated as non-marking sub-expressions (?:expr) + boost::regex::nosubs | + + // Instructs the regular expression engine to make matching faster, + // with the potential cost of making construction slower + boost::regex::optimize}; + + // Returns zero if the expression contains a valid regular expression + // See + // https://www.boost.org/doc/libs/1_82_0/libs/regex/doc/html/boost_regex/ref/basic_regex.html + if (result.status() == 0) { + return result; + } + + try { + // Boost seems to sometimes be overly strict, so we still default to + // the standard implementation + return RegexTypeStd{ + pattern, + // See https://en.cppreference.com/w/cpp/regex/basic_regex/constants + std::regex::ECMAScript | + + // When performing matches, all marked sub-expressions (expr) are + // treated as non-marking sub-expressions (?:expr) + std::regex::nosubs | + + // Instructs the regular expression engine to make matching + // faster, with the potential cost of making construction slower + std::regex::optimize}; + } catch (const std::regex_error &) { + return std::nullopt; + } +} + +/// @ingroup regex +/// +/// Validate a string against a regular expression. For example: +/// +/// ```cpp +/// #include +/// #include +/// +/// const sourcemeta::noa::Regex regex{ +/// sourcemeta::noa::to_regex("^foo")}; +/// assert(regex.has_value()); +/// assert(sourcemeta::noa::matches(regex.value(), "foo bar")); +/// ``` +template +auto matches(const Regex ®ex, const T &value) -> bool { + switch (static_cast(regex.index())) { + case RegexIndex::Boost: + return boost::regex_search( + value, *std::get_if>(®ex)); + case RegexIndex::Prefix: + return value.starts_with(*std::get_if>(®ex)); + case RegexIndex::NonEmpty: + return !value.empty(); + case RegexIndex::Range: + return value.size() >= std::get_if(®ex)->first && + value.size() <= std::get_if(®ex)->second; + case RegexIndex::Std: + return std::regex_search( + value, *std::get_if>(®ex)); + case RegexIndex::Noop: + return true; + } + + // See https://en.cppreference.com/w/cpp/utility/unreachable +#if defined(_MSC_VER) && !defined(__clang__) + __assume(false); +#else + __builtin_unreachable(); +#endif +} + +} // namespace sourcemeta::noa + +#endif diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/cregex.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/cregex.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/cregex.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/cregex.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex.h b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex.h similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex.h rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex.h diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/concepts.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/concepts.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/concepts.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/concepts.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/config.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/config.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/config.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/config.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/config/borland.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/config/borland.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/config/borland.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/config/borland.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/config/cwchar.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/config/cwchar.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/config/cwchar.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/config/cwchar.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/icu.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/icu.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/icu.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/icu.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/mfc.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/mfc.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/mfc.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/mfc.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/pattern_except.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/pattern_except.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/pattern_except.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/pattern_except.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/pending/object_cache.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/pending/object_cache.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/pending/object_cache.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/pending/object_cache.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/pending/static_mutex.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/pending/static_mutex.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/pending/static_mutex.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/pending/static_mutex.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/pending/unicode_iterator.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/pending/unicode_iterator.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/pending/unicode_iterator.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/pending/unicode_iterator.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/regex_traits.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/regex_traits.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/regex_traits.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/regex_traits.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/user.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/user.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/user.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/user.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/basic_regex.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/basic_regex.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/basic_regex.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/basic_regex.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/basic_regex_creator.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/basic_regex_creator.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/basic_regex_creator.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/basic_regex_creator.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/basic_regex_parser.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/basic_regex_parser.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/basic_regex_parser.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/basic_regex_parser.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/c_regex_traits.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/c_regex_traits.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/c_regex_traits.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/c_regex_traits.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/char_regex_traits.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/char_regex_traits.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/char_regex_traits.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/char_regex_traits.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/cpp_regex_traits.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/cpp_regex_traits.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/cpp_regex_traits.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/cpp_regex_traits.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/cregex.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/cregex.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/cregex.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/cregex.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/error_type.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/error_type.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/error_type.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/error_type.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/icu.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/icu.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/icu.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/icu.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/indexed_bit_flag.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/indexed_bit_flag.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/indexed_bit_flag.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/indexed_bit_flag.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/iterator_category.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/iterator_category.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/iterator_category.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/iterator_category.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/iterator_traits.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/iterator_traits.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/iterator_traits.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/iterator_traits.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/match_flags.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/match_flags.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/match_flags.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/match_flags.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/match_results.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/match_results.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/match_results.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/match_results.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/mem_block_cache.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/mem_block_cache.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/mem_block_cache.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/mem_block_cache.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/object_cache.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/object_cache.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/object_cache.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/object_cache.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/pattern_except.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/pattern_except.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/pattern_except.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/pattern_except.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/perl_matcher.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/perl_matcher.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/perl_matcher.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/perl_matcher.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/perl_matcher_common.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/perl_matcher_common.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/perl_matcher_common.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/perl_matcher_common.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/perl_matcher_non_recursive.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/perl_matcher_non_recursive.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/perl_matcher_non_recursive.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/perl_matcher_non_recursive.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/perl_matcher_recursive.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/perl_matcher_recursive.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/perl_matcher_recursive.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/perl_matcher_recursive.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/primary_transform.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/primary_transform.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/primary_transform.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/primary_transform.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/protected_call.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/protected_call.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/protected_call.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/protected_call.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regbase.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regbase.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regbase.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regbase.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_format.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_format.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_format.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_format.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_fwd.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_fwd.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_fwd.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_fwd.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_grep.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_grep.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_grep.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_grep.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_iterator.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_iterator.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_iterator.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_iterator.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_match.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_match.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_match.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_match.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_merge.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_merge.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_merge.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_merge.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_raw_buffer.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_raw_buffer.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_raw_buffer.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_raw_buffer.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_replace.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_replace.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_replace.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_replace.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_search.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_search.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_search.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_search.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_split.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_split.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_split.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_split.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_token_iterator.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_token_iterator.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_token_iterator.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_token_iterator.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_traits.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_traits.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_traits.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_traits.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_traits_defaults.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_traits_defaults.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_traits_defaults.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_traits_defaults.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_workaround.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_workaround.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/regex_workaround.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/regex_workaround.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/states.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/states.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/states.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/states.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/sub_match.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/sub_match.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/sub_match.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/sub_match.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/syntax_type.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/syntax_type.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/syntax_type.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/syntax_type.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/u32regex_iterator.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/u32regex_iterator.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/u32regex_iterator.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/u32regex_iterator.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/u32regex_token_iterator.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/u32regex_token_iterator.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/u32regex_token_iterator.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/u32regex_token_iterator.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/unicode_iterator.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/unicode_iterator.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/unicode_iterator.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/unicode_iterator.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/w32_regex_traits.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/w32_regex_traits.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v4/w32_regex_traits.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v4/w32_regex_traits.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/basic_regex.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/basic_regex.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/basic_regex.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/basic_regex.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/basic_regex_creator.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/basic_regex_creator.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/basic_regex_creator.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/basic_regex_creator.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/basic_regex_parser.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/basic_regex_parser.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/basic_regex_parser.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/basic_regex_parser.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/c_regex_traits.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/c_regex_traits.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/c_regex_traits.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/c_regex_traits.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/char_regex_traits.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/char_regex_traits.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/char_regex_traits.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/char_regex_traits.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/cpp_regex_traits.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/cpp_regex_traits.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/cpp_regex_traits.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/cpp_regex_traits.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/cregex.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/cregex.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/cregex.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/cregex.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/error_type.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/error_type.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/error_type.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/error_type.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/icu.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/icu.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/icu.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/icu.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/iterator_category.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/iterator_category.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/iterator_category.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/iterator_category.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/iterator_traits.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/iterator_traits.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/iterator_traits.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/iterator_traits.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/match_flags.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/match_flags.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/match_flags.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/match_flags.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/match_results.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/match_results.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/match_results.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/match_results.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/mem_block_cache.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/mem_block_cache.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/mem_block_cache.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/mem_block_cache.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/object_cache.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/object_cache.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/object_cache.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/object_cache.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/pattern_except.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/pattern_except.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/pattern_except.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/pattern_except.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/perl_matcher.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/perl_matcher.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/perl_matcher.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/perl_matcher.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/perl_matcher_common.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/perl_matcher_common.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/perl_matcher_common.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/perl_matcher_common.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/perl_matcher_non_recursive.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/perl_matcher_non_recursive.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/perl_matcher_non_recursive.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/perl_matcher_non_recursive.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/primary_transform.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/primary_transform.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/primary_transform.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/primary_transform.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regbase.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regbase.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regbase.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regbase.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_format.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_format.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_format.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_format.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_fwd.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_fwd.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_fwd.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_fwd.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_grep.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_grep.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_grep.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_grep.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_iterator.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_iterator.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_iterator.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_iterator.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_match.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_match.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_match.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_match.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_merge.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_merge.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_merge.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_merge.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_raw_buffer.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_raw_buffer.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_raw_buffer.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_raw_buffer.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_replace.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_replace.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_replace.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_replace.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_search.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_search.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_search.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_search.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_split.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_split.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_split.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_split.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_token_iterator.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_token_iterator.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_token_iterator.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_token_iterator.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_traits.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_traits.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_traits.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_traits.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_traits_defaults.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_traits_defaults.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_traits_defaults.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_traits_defaults.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_workaround.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_workaround.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/regex_workaround.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/regex_workaround.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/states.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/states.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/states.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/states.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/sub_match.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/sub_match.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/sub_match.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/sub_match.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/syntax_type.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/syntax_type.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/syntax_type.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/syntax_type.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/u32regex_iterator.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/u32regex_iterator.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/u32regex_iterator.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/u32regex_iterator.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/u32regex_token_iterator.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/u32regex_token_iterator.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/u32regex_token_iterator.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/u32regex_token_iterator.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/unicode_iterator.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/unicode_iterator.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/unicode_iterator.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/unicode_iterator.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/w32_regex_traits.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/w32_regex_traits.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex/v5/w32_regex_traits.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex/v5/w32_regex_traits.hpp diff --git a/vendor/jsontoolkit/vendor/boost-regex/include/boost/regex_fwd.hpp b/vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex_fwd.hpp similarity index 100% rename from vendor/jsontoolkit/vendor/boost-regex/include/boost/regex_fwd.hpp rename to vendor/alterschema/vendor/noa/vendor/boost-regex/include/boost/regex_fwd.hpp diff --git a/vendor/alterschema/vendor/noa/vendor/vendorpull/LICENSE b/vendor/alterschema/vendor/noa/vendor/vendorpull/LICENSE new file mode 100644 index 00000000..260c6f54 --- /dev/null +++ b/vendor/alterschema/vendor/noa/vendor/vendorpull/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + Vendorpull - A simple vendoring package manager + Copyright (C) 2024 Juan Cruz Viotti + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/vendor/alterschema/vendor/noa/vendor/vendorpull/pull b/vendor/alterschema/vendor/noa/vendor/vendorpull/pull new file mode 100755 index 00000000..32150a95 --- /dev/null +++ b/vendor/alterschema/vendor/noa/vendor/vendorpull/pull @@ -0,0 +1,123 @@ +#!/bin/sh + +set -o errexit +set -o nounset + +ROOT="$(git rev-parse --show-toplevel)" +DEPENDENCIES="$ROOT/DEPENDENCIES" +VENDOR="$ROOT/vendor" +PATCHES="$ROOT/patches" + +fail() { + echo "$1" 1>&2 + exit 1 +} + +log() { + echo "-- $1" 1>&2 +} + +# $1 = name +# $2 = url +# $3 = version +# $4 = tmp +vendor() { + # Cloning + log "Fetching $2@$3 into $4/$1" + git clone --recurse-submodules --jobs 8 "$2" "$4/$1" + git -C "$4/$1" reset --hard "$3" + + # Patching + if [ -d "$PATCHES/$1" ] + then + for patch in "$PATCHES/$1"/*.patch + do + log "Patching $1: $patch" + git -C "$4/$1" apply --3way "$patch" + done + fi + + # Pruning + log "Pruning $4/$1" + git -C "$4/$1" submodule foreach "rm -rf .git" + git -C "$4/$1" submodule foreach "rm -rf .gitignore" + git -C "$4/$1" submodule foreach "rm -rf .github" + git -C "$4/$1" submodule foreach "rm -rf .gitmodules" + git -C "$4/$1" submodule foreach "rm -rf .gitattributes" + rm -rf "$4/$1/.git" + rm -rf "$4/$1/.gitignore" + rm -rf "$4/$1/.github" + rm -rf "$4/$1/.gitmodules" + rm -rf "$4/$1/.gitattributes" + + # Masking + if [ -f "$VENDOR/$1.mask" ] + then + while read -r path + do + log "Masking $1: $path" + rm -rf "$4/$1/${path:?}" + done < "$VENDOR/$1.mask" + elif [ -f "$4/$1/vendorpull.mask" ] + then + while read -r path + do + log "Masking $1: $path" + rm -rf "$4/$1/${path:?}" + done < "$4/$1/vendorpull.mask" + rm -f "$4/$1/vendorpull.mask" + fi + + # Swap + log "Moving $4/$1 to $VENDOR/$1" + rm -rf "$VENDOR/${1:?}" + mkdir -p "$VENDOR" + mv "$4/$1" "$VENDOR/$1" +} + +if [ ! -f "$DEPENDENCIES" ] +then + fail "File not found: $DEPENDENCIES" +fi + +DEPENDENCY="${1-}" +if [ -n "$DEPENDENCY" ] +then + LINE="$(grep "^$DEPENDENCY " < "$DEPENDENCIES" || true)" + if [ -z "$LINE" ] + then + fail "Unknown dependency: $DEPENDENCY" + fi + NAME="$(echo "$LINE" | cut -d ' ' -f 1)" + URL="$(echo "$LINE" | cut -d ' ' -f 2)" + VERSION="$(echo "$LINE" | cut -d ' ' -f 3)" + if [ -z "$NAME" ] || [ -z "$URL" ] || [ -z "$VERSION" ] + then + fail "Invalid dependency definition: $DEPENDENCY" + fi + + TMP="$(mktemp -d -t vendorpull-clone-XXXXX)" + log "Setting up temporary directory at $TMP..." + clean() { rm -rf "$TMP"; } + trap clean EXIT + + vendor "$NAME" "$URL" "$VERSION" "$TMP" +else + TMP="$(mktemp -d -t vendorpull-clone-XXXXX)" + log "Setting up temporary directory at $TMP..." + clean() { rm -rf "$TMP"; } + trap clean EXIT + + while read -r line + do + NAME="$(echo "$line" | cut -d ' ' -f 1)" + URL="$(echo "$line" | cut -d ' ' -f 2)" + VERSION="$(echo "$line" | cut -d ' ' -f 3)" + if [ -z "$NAME" ] || [ -z "$URL" ] || [ -z "$VERSION" ] + then + fail "Invalid dependency definition" + fi + + vendor "$NAME" "$URL" "$VERSION" "$TMP" + done < "$DEPENDENCIES" +fi diff --git a/vendor/googletest.mask b/vendor/googletest.mask deleted file mode 100644 index 97b080e5..00000000 --- a/vendor/googletest.mask +++ /dev/null @@ -1,14 +0,0 @@ -googletest/test -googletest/docs -googletest/samples -googletest/README.md -googlemock -docs -ci -.clang-format -BUILD.bazel -CONTRIBUTING.md -CONTRIBUTORS -googletest_deps.bzl -README.md -WORKSPACE diff --git a/vendor/jsontoolkit/CMakeLists.txt b/vendor/jsontoolkit/CMakeLists.txt index 9c94c943..7858527a 100644 --- a/vendor/jsontoolkit/CMakeLists.txt +++ b/vendor/jsontoolkit/CMakeLists.txt @@ -3,12 +3,10 @@ project(jsontoolkit VERSION 2.0.0 LANGUAGES C CXX DESCRIPTION "The swiss-army knife for JSON programming in C++" HOMEPAGE_URL "https://jsontoolkit.sourcemeta.com") list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") -include(vendor/noa/cmake/noa.cmake) # Options option(JSONTOOLKIT_URI "Build the JSON Toolkit URI library" ON) option(JSONTOOLKIT_JSON "Build the JSON Toolkit JSON library" ON) -option(JSONTOOLKIT_REGEX "Build the JSON Toolkit Regex library" ON) option(JSONTOOLKIT_JSONSCHEMA "Build the JSON Toolkit JSON Schema library" ON) option(JSONTOOLKIT_JSONPOINTER "Build the JSON Toolkit JSON Pointer library" ON) option(JSONTOOLKIT_JSONL "Build the JSON Toolkit JSONL library" ON) @@ -20,6 +18,8 @@ option(JSONTOOLKIT_INSTALL "Install the JSON Toolkit library" ON) option(JSONTOOLKIT_ADDRESS_SANITIZER "Build JSON Toolkit with an address sanitizer" OFF) option(JSONTOOLKIT_UNDEFINED_SANITIZER "Build JSON Toolkit with an undefined behavior sanitizer" OFF) +find_package(Noa REQUIRED) + if(JSONTOOLKIT_INSTALL) include(GNUInstallDirs) include(CMakePackageConfigHelpers) @@ -46,11 +46,6 @@ if(JSONTOOLKIT_JSON) add_subdirectory(src/json) endif() -if(JSONTOOLKIT_JSON AND JSONTOOLKIT_REGEX) - find_package(BoostRegex REQUIRED) - add_subdirectory(src/regex) -endif() - if(JSONTOOLKIT_JSON AND JSONTOOLKIT_JSONPOINTER) add_subdirectory(src/jsonpointer) endif() @@ -82,7 +77,6 @@ endif() if(PROJECT_IS_TOP_LEVEL) noa_target_clang_format(SOURCES - bindings/*.cc src/*.h src/*.cc benchmark/*.h benchmark/*.cc test/*.h test/*.cc) @@ -92,7 +86,6 @@ endif() # Testing if(JSONTOOLKIT_TESTS) - find_package(GoogleTest REQUIRED) enable_testing() if(JSONTOOLKIT_URI) @@ -103,10 +96,6 @@ if(JSONTOOLKIT_TESTS) add_subdirectory(test/json) endif() - if(JSONTOOLKIT_JSON AND JSONTOOLKIT_REGEX) - add_subdirectory(test/regex) - endif() - if(JSONTOOLKIT_JSON AND JSONTOOLKIT_JSONPOINTER) add_subdirectory(test/jsonpointer) endif() @@ -133,7 +122,6 @@ if(JSONTOOLKIT_TESTS) endif() if(JSONTOOLKIT_BENCHMARK) - find_package(GoogleBenchmark REQUIRED) add_subdirectory(benchmark) endif() endif() diff --git a/vendor/jsontoolkit/cmake/FindNoa.cmake b/vendor/jsontoolkit/cmake/FindNoa.cmake new file mode 100644 index 00000000..8e1fc3b8 --- /dev/null +++ b/vendor/jsontoolkit/cmake/FindNoa.cmake @@ -0,0 +1,12 @@ +if(NOT Noa_FOUND) + if(JSONTOOLKIT_INSTALL) + set(NOA_INSTALL ON CACHE BOOL "enable Noa installation") + else() + set(NOA_INSTALL OFF CACHE BOOL "disable Noa installation") + endif() + + set(NOA_GOOGLETEST ${JSONTOOLKIT_TESTS} CACHE BOOL "GoogleTest") + set(NOA_GOOGLEBENCHMARK ${JSONTOOLKIT_BENCHMARK} CACHE BOOL "GoogleBenchmark") + add_subdirectory("${PROJECT_SOURCE_DIR}/vendor/noa") + set(Noa_FOUND ON) +endif() diff --git a/vendor/jsontoolkit/config.cmake.in b/vendor/jsontoolkit/config.cmake.in index ade27e94..3bc5bc28 100644 --- a/vendor/jsontoolkit/config.cmake.in +++ b/vendor/jsontoolkit/config.cmake.in @@ -6,7 +6,6 @@ list(APPEND JSONTOOLKIT_COMPONENTS ${jsontoolkit_FIND_COMPONENTS}) if(NOT JSONTOOLKIT_COMPONENTS) list(APPEND JSONTOOLKIT_COMPONENTS uri) list(APPEND JSONTOOLKIT_COMPONENTS json) - list(APPEND JSONTOOLKIT_COMPONENTS regex) list(APPEND JSONTOOLKIT_COMPONENTS jsonl) list(APPEND JSONTOOLKIT_COMPONENTS jsonpointer) list(APPEND JSONTOOLKIT_COMPONENTS jsonschema) @@ -20,11 +19,8 @@ foreach(component ${JSONTOOLKIT_COMPONENTS}) find_dependency(uriparser) include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_jsontoolkit_uri.cmake") elseif(component STREQUAL "json") + find_dependency(noa) include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_jsontoolkit_json.cmake") - elseif(component STREQUAL "regex") - include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_jsontoolkit_json.cmake") - find_dependency(BoostRegex) - include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_jsontoolkit_regex.cmake") elseif(component STREQUAL "jsonl") include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_jsontoolkit_json.cmake") include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_jsontoolkit_jsonl.cmake") diff --git a/vendor/jsontoolkit/src/json/CMakeLists.txt b/vendor/jsontoolkit/src/json/CMakeLists.txt index 37fbb4d9..bffa672f 100644 --- a/vendor/jsontoolkit/src/json/CMakeLists.txt +++ b/vendor/jsontoolkit/src/json/CMakeLists.txt @@ -1,8 +1,11 @@ noa_library(NAMESPACE sourcemeta PROJECT jsontoolkit NAME json FOLDER "JSON Toolkit/JSON" - PRIVATE_HEADERS array.h error.h object.h value.h hash.h flat_map.h + PRIVATE_HEADERS array.h error.h object.h value.h hash.h SOURCES grammar.h parser.h stringify.h json.cc json_value.cc) if(JSONTOOLKIT_INSTALL) noa_library_install(NAMESPACE sourcemeta PROJECT jsontoolkit NAME json) endif() + +target_link_libraries(sourcemeta_jsontoolkit_json + PUBLIC sourcemeta::noa::flat_map) diff --git a/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_hash.h b/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_hash.h index abfa638f..a8d9afe6 100644 --- a/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_hash.h +++ b/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_hash.h @@ -13,30 +13,29 @@ template struct FastHash { return value.fast_hash(); } - struct property_hash_type { + inline auto is_perfect(const hash_type) const noexcept -> bool { + return false; + } +}; + +/// @ingroup json +template struct KeyHash { + struct hash_type { using type = std::uint64_t; type a{0}; type b{0}; type c{0}; type d{0}; - inline auto operator==(const property_hash_type &other) const noexcept - -> bool { + inline auto operator==(const hash_type &other) const noexcept -> bool { return this->a == other.a && this->b == other.b && this->c == other.c && this->d == other.d; } - - inline auto is_perfect() const noexcept -> bool { - // If there is anything written past the first byte, - // then it is a perfect hash - return this->a > 255; - } }; - inline auto operator()(const typename T::String &value) const noexcept - -> property_hash_type { + inline auto operator()(const T &value) const noexcept -> hash_type { const auto size{value.size()}; - property_hash_type result; + hash_type result; if (size == 0) { return result; } else if (size <= 31) { @@ -47,13 +46,18 @@ template struct FastHash { // This case is specifically designed to be constant with regards to // string length, and to exploit the fact that most JSON objects don't // have a lot of entries, so hash collision is not as common - return {(size + - static_cast(value.front()) + - static_cast(value.back())) % + return {(size + static_cast(value.front()) + + static_cast(value.back())) % // Make sure the property hash can never exceed 8 bits 256}; } } + + inline auto is_perfect(const hash_type &hash) const noexcept -> bool { + // If there is anything written past the first byte, + // then it is a perfect hash + return hash.a > 255; + } }; } // namespace sourcemeta::jsontoolkit diff --git a/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_object.h b/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_object.h index a5d7396b..d5082b93 100644 --- a/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_object.h +++ b/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_object.h @@ -4,7 +4,7 @@ #include // std::equal_to, std::less #include // std::initializer_list -#include +#include namespace sourcemeta::jsontoolkit { @@ -12,7 +12,7 @@ namespace sourcemeta::jsontoolkit { template class JSONObject { public: // Constructors - using Container = FlatMap; + using Container = sourcemeta::noa::FlatMap; JSONObject() : data{} {} JSONObject(std::initializer_list values) diff --git a/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_value.h b/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_value.h index b883f7b1..abe4b39e 100644 --- a/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_value.h +++ b/vendor/jsontoolkit/src/json/include/sourcemeta/jsontoolkit/json_value.h @@ -43,7 +43,7 @@ class SOURCEMETA_JSONTOOLKIT_JSON_EXPORT JSON { /// The array type used by the JSON document. using Array = JSONArray; /// The object type used by the JSON document. - using Object = JSONObject>; + using Object = JSONObject>; /* * Constructors diff --git a/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer.h b/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer.h index 8236eb04..67580384 100644 --- a/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer.h +++ b/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer.h @@ -31,10 +31,11 @@ namespace sourcemeta::jsontoolkit { /// @ingroup jsonpointer -using Pointer = GenericPointer; +using Pointer = GenericPointer>; /// @ingroup jsonpointer -using WeakPointer = GenericPointer>; +using WeakPointer = GenericPointer, + KeyHash>; /// @ingroup jsonpointer /// A global constant instance of the empty JSON Pointer. diff --git a/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer_pointer.h b/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer_pointer.h index 90759137..c82840e1 100644 --- a/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer_pointer.h +++ b/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer_pointer.h @@ -17,7 +17,7 @@ namespace sourcemeta::jsontoolkit { /// @ingroup jsonpointer -template class GenericPointer { +template class GenericPointer { public: using Token = GenericToken; using Value = typename Token::Value; @@ -206,7 +206,7 @@ template class GenericPointer { /// assert(pointer.at(1).to_property() == "bar"); /// assert(pointer.at(2).to_property() == "baz"); /// ``` - auto push_back(const GenericPointer &other) -> void { + auto push_back(const GenericPointer &other) -> void { if (other.empty()) { return; } else if (other.size() == 1) { @@ -239,7 +239,7 @@ template class GenericPointer { /// assert(pointer.at(1).to_property() == "bar"); /// assert(pointer.at(2).to_property() == "baz"); /// ``` - auto push_back(GenericPointer &&other) -> void { + auto push_back(GenericPointer &&other) -> void { if (other.empty()) { return; } else if (other.size() == 1) { @@ -277,7 +277,7 @@ template class GenericPointer { template >>> - auto push_back(const GenericPointer &other) -> void { + auto push_back(const GenericPointer &other) -> void { if (other.empty()) { return; } else if (other.size() == 1) { @@ -422,9 +422,9 @@ template class GenericPointer { /// assert(pointer.at(1).is_property()); /// assert(pointer.at(1).to_property() == "bar"); /// ``` - [[nodiscard]] auto initial() const -> GenericPointer { + [[nodiscard]] auto initial() const -> GenericPointer { assert(!this->empty()); - GenericPointer result{*this}; + GenericPointer result{*this}; result.pop_back(); return result; } @@ -441,9 +441,9 @@ template class GenericPointer { /// assert(left.concat(right) == /// sourcemeta::jsontoolkit::Pointer{"foo", "bar", "baz"}); /// ``` - auto concat(const GenericPointer &other) const - -> GenericPointer { - GenericPointer result{*this}; + auto concat(const GenericPointer &other) const + -> GenericPointer { + GenericPointer result{*this}; result.push_back(other); return result; } @@ -459,7 +459,7 @@ template class GenericPointer { /// const sourcemeta::jsontoolkit::Pointer prefix{"foo", "bar"}; /// assert(pointer.starts_with(prefix)); /// ``` - auto starts_with(const GenericPointer &other) const -> bool { + auto starts_with(const GenericPointer &other) const -> bool { return other.data.size() <= this->data.size() && std::equal(other.data.cbegin(), other.data.cend(), this->data.cbegin()); @@ -477,7 +477,7 @@ template class GenericPointer { /// const sourcemeta::jsontoolkit::Pointer prefix{"foo", "bar", "baz"}; /// assert(pointer.starts_with(prefix, tail)); /// ``` - auto starts_with(const GenericPointer &other, + auto starts_with(const GenericPointer &other, const Token &tail) const -> bool { if (other.size() == this->size() + 1) { assert(!other.empty()); @@ -498,7 +498,7 @@ template class GenericPointer { /// const sourcemeta::jsontoolkit::Pointer prefix{"foo", "bar", "qux"}; /// assert(pointer.starts_with_initial(prefix)); /// ``` - auto starts_with_initial(const GenericPointer &other) const + auto starts_with_initial(const GenericPointer &other) const -> bool { const auto prefix_size{other.size()}; if (prefix_size == 0) { @@ -529,9 +529,9 @@ template class GenericPointer { /// assert(pointer.rebase(prefix, replacement) == /// sourcemeta::jsontoolkit::Pointer{"qux", "baz"}); /// ``` - auto rebase(const GenericPointer &prefix, - const GenericPointer &replacement) const - -> GenericPointer { + auto rebase(const GenericPointer &prefix, + const GenericPointer &replacement) const + -> GenericPointer { typename Container::size_type index{0}; while (index < prefix.size()) { if (index >= this->size() || prefix.data[index] != this->data[index]) { @@ -545,7 +545,7 @@ template class GenericPointer { assert(this->starts_with(prefix)); auto new_begin{this->data.cbegin()}; std::advance(new_begin, index); - GenericPointer result{replacement}; + GenericPointer result{replacement}; std::copy(new_begin, this->data.cend(), std::back_inserter(result.data)); return result; } @@ -564,8 +564,8 @@ template class GenericPointer { /// /// If the JSON Pointer is not relative to the base, a copy of the original /// input pointer is returned. - auto resolve_from(const GenericPointer &base) const - -> GenericPointer { + auto resolve_from(const GenericPointer &base) const + -> GenericPointer { typename Container::size_type index{0}; while (index < base.size()) { if (index >= this->size() || base.data[index] != this->data[index]) { @@ -578,20 +578,20 @@ template class GenericPointer { // Make a pointer from the remaining tokens auto new_begin{this->data.cbegin()}; std::advance(new_begin, index); - GenericPointer result; + GenericPointer result; std::copy(new_begin, this->data.cend(), std::back_inserter(result.data)); return result; } /// Compare JSON Pointer instances - auto operator==(const GenericPointer &other) const noexcept + auto operator==(const GenericPointer &other) const noexcept -> bool { return this->data == other.data; } /// Overload to support ordering of JSON Pointers. Typically for sorting /// reasons. - auto operator<(const GenericPointer &other) const noexcept + auto operator<(const GenericPointer &other) const noexcept -> bool { return this->data < other.data; } diff --git a/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer_position.h b/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer_position.h index 1d9893ee..82298597 100644 --- a/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer_position.h +++ b/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer_position.h @@ -43,7 +43,7 @@ namespace sourcemeta::jsontoolkit { /// ``` class SOURCEMETA_JSONTOOLKIT_JSONPOINTER_EXPORT PositionTracker { public: - using Pointer = GenericPointer; + using Pointer = GenericPointer>; using Position = std::tuple; auto operator()(const CallbackPhase phase, const JSON::Type, diff --git a/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer_token.h b/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer_token.h index 4b9eb206..de27fa95 100644 --- a/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer_token.h +++ b/vendor/jsontoolkit/src/jsonpointer/include/sourcemeta/jsontoolkit/jsonpointer_token.h @@ -18,7 +18,7 @@ template class GenericToken { /// precomputed hash. This is advanced functionality that should be used with /// care. GenericToken(const Property &value, - const typename Hash::property_hash_type property_hash) + const typename Hash::hash_type property_hash) : as_property{true}, property{value}, hash{property_hash}, index{0} {} /// This constructor creates an JSON Pointer token from a string. For @@ -172,7 +172,7 @@ template class GenericToken { /// assert(token.property_hash() >= 0); /// ``` [[nodiscard]] auto property_hash() const noexcept -> - typename Hash::property_hash_type { + typename Hash::hash_type { assert(this->is_property()); return this->hash; } @@ -271,7 +271,7 @@ template class GenericToken { bool as_property; Property property; - typename Hash::property_hash_type hash; + typename Hash::hash_type hash; Index index; }; diff --git a/vendor/jsontoolkit/src/jsonpointer/jsonpointer.cc b/vendor/jsontoolkit/src/jsonpointer/jsonpointer.cc index 62312393..f09b8605 100644 --- a/vendor/jsontoolkit/src/jsonpointer/jsonpointer.cc +++ b/vendor/jsontoolkit/src/jsonpointer/jsonpointer.cc @@ -15,8 +15,9 @@ namespace { template