sJson (also known as Secure JSON) is a thread-safe, dynamic-allocation-free, cross-compilable JSON parser based on a PAL (Platform Abstraction Layer) architecture writed in c99
| 1 | cmake_minimum_required(VERSION 3.10) |
| 2 | project(json_pal C) |
| 3 | |
| 4 | set(CMAKE_C_STANDARD 99) |
| 5 | set(CMAKE_C_EXTENSIONS OFF) |
| 6 | |
| 7 | if(MSVC) |
| 8 | add_compile_options(/W4 /WX) |
| 9 | else() |
| 10 | add_compile_options(-Wall -Wextra -Wpedantic -Wshadow) |
| 11 | endif() |
| 12 | |
| 13 | # Header-only — test executable is the only build artifact |
| 14 | add_executable(test_json src/test_json.c) |
| 15 | target_link_libraries(test_json m) |
| 16 | |
| 17 | enable_testing() |
| 18 | add_test(NAME json_pal_suite COMMAND test_json) |
| 19 |