Skip to content

CastXML is default even when only GCC-XML is present #65

@cls

Description

@cls

On a system with GCC-XML but not CastXML, this fails:

pygccxml.parser.parse(files)
gccxml_cc1plus: error: unrecognized command line option "-x"
gccxml_cc1plus: error: unrecognized command line option "--castxml-cc-gnu"
gccxml_cc1plus: error: unrecognized command line option "--castxml-gccxml"
gccxml_cc1plus: error: c++: No such file or directory

But by doing a little dance with pygccxml.utils (which is labelled 'internal' in the docs), this succeeds:

xml_generator_path, xml_generator = pygccxml.utils.find_xml_generator()
config = pygccxml.parser.xml_generator_configuration_t(xml_generator=xml_generator)
pygccxml.parser.parse(files, config=config)

So pygccxml finds the right configuration, it just doesn't sensibly default to it.

This is a regression in 1.8; it does not occur in 1.7.6.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions