dwavesystems / dwavesystems/dwave-optimization

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

Open
#576 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
31
Forks
36
Avg merge
16h 55m
Merged PRs (30d)
8

Description

Something like
```meson
# Set up the configuration file
conf = configuration_data()
if cpp.has_type('ssize_t', prefix: '#include ')
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
```c++
// 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.

Contributor guide

Open the contributing guide

Research direction

Start by inspecting common.hpp and the existing Meson setup, then compare it with the proposed dwave/optimization/include/dwave-optimization/config.hpp.in configuration flow. Determine whether Meson configuration can replace or should supplement common.hpp, and verify that the resulting configuration works across the supported build paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.