mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Iterating a JSON array with GET re-parses the entire string on every call, so walking N elements is O(N^2). ARRAY_SPLIT parses the array once and returns its elements as a CMake list, letting each element be queried individually in linear total time. Each element is re-serialized as compact JSON and encoded to survive CMake list parsing: '[' and ']' inside strings are emitted as \u005B and \u005D, and ';' is escaped as '\;'. Every element therefore stays valid, re-queryable JSON. Fixes: #27985
6 lines
237 B
Plaintext
6 lines
237 B
Plaintext
CMake Error at JSONArraySplitNoArray\.cmake:1 \(string\):
|
|
string sub-command JSON ARRAY_SPLIT needs to be called with an element of
|
|
type ARRAY, got NUMBER\.
|
|
Call Stack \(most recent call first\):
|
|
CMakeLists\.txt:[0-9]+ \(include\)
|