]> granicus.if.org Git - json-c/commit
json_pointer: allow the feature to be disabled
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Fri, 16 Apr 2021 06:42:07 +0000 (09:42 +0300)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Fri, 16 Apr 2021 08:49:38 +0000 (11:49 +0300)
commit8abeebc9b20ee830867df1c21cfa87bd6fdbaa38
tree1af19dbee37a48d2770d6e3d7f1a6f5e453ae786
parent1f8b64f62c76cb23a8eb041fdde341db604aae75
json_pointer: allow the feature to be disabled

Some users may not want to included it in their build/system. So allow a
cmake symbol to disable it.

A user can do 'cmake -DDISABLE_JSON_POINTER=ON <json_c_root_dir>' and
disable the json_pointer functionality. That saves about 17 KB (on an
x86_64) machine. This may be useful on smaller embedded systems; even
though the saving would be fewer kilobytes.

One thing that also needs to change a bit, is that the 'json.h' be
autogenerated via cmake, in order to conditionally include that
"json_pointer.h" file.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
.gitignore
CMakeLists.txt
json.h.cmakein [moved from json.h with 96% similarity]
tests/CMakeLists.txt