Skip to content

Consider replacing/supplementing common.hpp with a meson configuration file #576

Description

@arcondello

Something like

# Set up the configuration file
conf = configuration_data()
if cpp.has_type('ssize_t', prefix: '#include <sys/types.h>')
    conf.set('HAS_SSIZE_T', 1)
endif
configure_file(
    input: 'dwave/optimization/include/dwave-optimization/config.hpp.in',
    output: 'config.hpp',
    configuration: conf,
)

with a

// config.hpp.in
#mesondefine HAS_SSIZE_T

which we can then include.

I think it may be possible to replace common.hpp entirely with this, but needs more thought/experimentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions