LY_SRC_DIR is defined in src/ly_config.h.in as:
#define LY_SRC_DIR "@CMAKE_CURRENT_SOURCE_DIR@"
This embeds the build-time source directory path into the installed public header (ly_config.h), which causes build path QA errors in cross-compilation environments like Yocto/OpenEmbedded.
LY_SRC_DIR is only referenced by tests and fuzzers:
tests/perf/perf.c
tests/fuzz/yang_parse_module.c
tests/fuzz/lys_parse_mem.c
tests/fuzz/lyd_parse_mem_xml.c
tests/fuzz/lyd_parse_mem_json.c
No library source code uses LY_SRC_DIR.
Suggestion: Move LY_SRC_DIR to a separate test-only config header so it is not included in the installed public header.
LY_SRC_DIR is defined in src/ly_config.h.in as:
#define LY_SRC_DIR "@CMAKE_CURRENT_SOURCE_DIR@"
This embeds the build-time source directory path into the installed public header (ly_config.h), which causes build path QA errors in cross-compilation environments like Yocto/OpenEmbedded.
LY_SRC_DIR is only referenced by tests and fuzzers:
tests/perf/perf.c
tests/fuzz/yang_parse_module.c
tests/fuzz/lys_parse_mem.c
tests/fuzz/lyd_parse_mem_xml.c
tests/fuzz/lyd_parse_mem_json.c
No library source code uses LY_SRC_DIR.
Suggestion: Move LY_SRC_DIR to a separate test-only config header so it is not included in the installed public header.