Skip to content

Conversation

s0600204
Copy link
Contributor

Currently when building on Windows, the only time an MSVC-style flag isn't defined is if the build system is using gcc. This causes problems when building with almost anything that isn't gcc or msvc, i.e. clang.

With this PR, the MSVC-style flag is only defined when msvc (or something that accepts MSVC-style syntax) is being used.

For expected return values of the get_argument_syntax() method, see https://mesonbuild.com/Reference-tables.html#compiler-ids

The method requires meson >= 0.49, but as python-rtmidi itself (currently) requires meson >= 0.64, this should be acceptable.

This fixes builds on Windows when, for instance, one is using `clang` on top of
`MSys2`; and in a more generic way than the pre-existing solution.

For expected return values of the `get_argument_syntax()` method, see
https://mesonbuild.com/Reference-tables.html#compiler-ids
@SpotlightKid SpotlightKid merged commit 750f78b into SpotlightKid:master Feb 10, 2025
5 checks passed
@s0600204 s0600204 deleted the win-not-msvc branch February 10, 2025 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants