summaryrefslogtreecommitdiffstats
path: root/Source/cmJSONHelpers.h
Commit message (Collapse)AuthorAgeFilesLines
* IWYU: Update for Debian 13 CI jobBrad King2025-11-121-1/+1
| | | | | | | | | | | | | | | `include-what-you-use` diagnostics, in practice, are specific to the environment's compiler and standard library. Update includes to satisfy IWYU for our CI job under Debian 13. Some patterns: * Types named in virtual `override` signatures no longer require includes since the overridden signature already names them. * A function argument's type needs to be included even if its constructor is called only by implicit conversion. For example, constructing a `std::function` from a lambda now requires `<functional>`. * Some prior mysterious `<type_traits>` inclusions are no longer required.
* source: Pass cm::string_view by valueDaniel Pfeifer2025-07-301-4/+4
|
* LICENSE: Replace references to Copyright.txt with LICENSE.rstKitware Robot2025-03-031-1/+1
| | | | | | | | | | ``` git grep -lz 'Copyright.txt or https://cmake.org/licensing ' | while IFS= read -r -d $'\0' f ; do sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / { s/Copyright.txt/LICENSE.rst/ }' "$f" ; done ```
* Revise C++ coding style using clang-format with "east const"Kitware Robot2025-01-231-43/+43
| | | | | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`, now with "east const" enforcement. Use `clang-format` version 18. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit. Issue: #26123
* cmJSONHelpers.h: Add `FilteredObject` helperAlex Turbov2024-08-261-15/+115
| | | | | | | | | | | | | | | | | Iterate over the object's members and call a filter callable to decide what to do with the current key/value. A filter returns one of the `FilterResult` values. A container type is an associative or a sequence container of pairs (key, value). Refactor `MapFilter()` and `Map()` to use `FilteredObject()`. Moreover, for C++ >= 17 implementation is more optimized depending on the given filter object type and capable of detecting and properly calling the filter callable using 1 or 3 arguments, up to totally eliminate any checking (even dummy) in the generated code. Supported container types, used to append key/value items, aren't limited to `std::map` only and can be any associative container or a sequenced one with pairs of key/value as elements.
* cmJSONHelpers.h: Add some empty lines to split code blocksAlex Turbov2024-08-151-0/+2
|
* cmJSONHelpers.h: Add generic predicate checking helperAlex Turbov2024-08-151-0/+15
| | | | | | | And use it in the `cmCMakePresetsGraphReadJSON.cxx` to check presets schema version in the declarative way. Co-authored-by: Martin Duffy <martin.duffy@kitware.com>
* cmJSONHelpers.h: Use `map::emplace()` instead of `operator[]`Alex Turbov2024-08-131-1/+1
|
* cmJSONHelpers.h: Remove useless `cmStrCat()` callAlex Turbov2024-08-131-1/+1
|
* cmJSONHelpers.h: Optimize of adding `Member`s to a vectorAlex Turbov2024-08-131-8/+8
|
* cmJSONHelpers.h: Remove redundant `;`Alex Turbov2024-08-131-6/+0
|
* cmJSONHelpers.h: Move variable declaation close to first usageAlex Turbov2024-08-131-2/+2
|
* presets: Allow comments in presets filesAliaksandr Averchanka2024-06-241-0/+6
| | | | | Co-authored-by: Kanaiym <abdigak@clarkson.edu> Fixes: #22791
* cmJSONHelpers: Make error generators proper functionsKyle Edwards2023-08-161-89/+21
|
* bootstrap: Unconditionally build libjsoncppKyle Edwards2023-07-261-4/+0
|
* presets: Improve JSON parser and error messagesMartin Duffy2023-03-291-94/+258
|
* Revise C++ coding style using clang-format-15Kitware Robot2023-01-181-15/+13
| | | | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 15. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit. Fixes: #24315
* cmJSONHelpers: Allow passing state contextMartin Duffy2022-05-051-57/+70
| | | | Allow for passing of context to JSON Helper methods in cmJSONHelpers.
* cmJSONHelpers: Restructure cmJSONHelpersMartin Duffy2022-05-051-251/+226
| | | | Restructure cmJSONHelpers to prevent SunPro errors when passing context.
* CMakePresets.json: Add the ability to conditionally disable presetsKyle Edwards2021-03-221-1/+1
|
* cmJSONHelpers: Add new Bind() functionKyle Edwards2020-10-051-0/+11
|
* JSON: Add helpersKyle Edwards2020-09-091-0/+304