Skip to content

JSONCPP_HAS_STRING_VIEW is not defined during Meson build #1669

@mgorny

Description

@mgorny

Describe the bug
1.9.7 release added some code guarded by JSONCPP_HAS_STRING_VIEW. However, the relevant check is only present in CMake files and so the define is never set when building via meson.

To Reproduce
https://github.com/search?q=repo%3Aopen-source-parsers%2Fjsoncpp%20jsoncpp_has_string_view&type=code

Expected behavior
JSONCPP_HAS_STRING_VIEW in meson.build.

Desktop (please complete the following information):
n/a

Additional context
I was debugging build failures from CMake against new jsoncpp, with errors such as:

/usr/x86_64-pc-linux-gnu/binutils-bin/2.46.0/ld: cmScanDepFormat.cxx:(.text+0xc9a): undefined reference to `Json::Value::operator[](std::basic_string_view<char, std::char_traits<char> >) const'

Not sure if it's strictly related but looked like a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions