You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add initial CBOR format support with libcbor integration (squahsed commit)
- Add ENABLE_CBOR_SUPPORT CMake flag to conditionally enable CBOR functionality
- Integrate libcbor dependency with CMake find_package and conditional compilation
- Add basic parser_cbor.c and parser_cbor.h files with foundational structures
- Implement initial CBOR parsing functions with libcbor as low-level parser
- Add necessary format switch statements throughout codebase for CBOR support
- Introduce lyd_parse_data_mem_len() high-level function for parsing CBOR from memory
(required because CBOR binary data may contain null bytes, making strlen() unreliable)
- Build complete CBOR parser that constructs libyang data trees
- Link parsed CBOR data with schema trees for validation
- Fix initial memory allocation errors and remove dead code
This commit establishes the foundation for CBOR support in libyang, allowing the
library to be built with or without CBOR capabilities based on build configuration.
```
option(ENABLE_TOOLS "Build binary tools 'yanglint' and 'yangre'"ON)
250
251
option(ENABLE_COMMON_TARGETS "Define common custom target names such as 'doc' or 'uninstall', may cause conflicts when using add_subdirectory() to build this project"ON)
251
252
option(BUILD_SHARED_LIBS"By default, shared libs are enabled. Turn off for a static build."ON)
253
+
option(ENABLE_CBOR_SUPPORT "Enable CBOR support with libcbor"ON)
252
254
set(YANG_MODULE_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/yang/modules/libyang"CACHESTRING"Directory where to copy the YANG modules to")
0 commit comments