Skip to content

Cross-platform check for compiler warning flags with Windows support#52

Merged
msteinert merged 2 commits into
mainfrom
windows-build
Sep 9, 2025
Merged

Cross-platform check for compiler warning flags with Windows support#52
msteinert merged 2 commits into
mainfrom
windows-build

Conversation

@rdmark

@rdmark rdmark commented Sep 8, 2025

Copy link
Copy Markdown
Collaborator

When using Microsoft Visual C on Windows, use a different set of warning flags than with the usual Unix compilers

Also, use warning_level=3 to get the -Wpedantic flag rather than hard coding it

Create Windows build jobs in the GitHub workflow: First build uses gcc in an MSYS2 environment, the second native Microsoft Visual C

@github-actions

github-actions Bot commented Sep 8, 2025

Copy link
Copy Markdown

File Coverage Lines Branches
All files 68% 73% 63%
bstring/bstraux.c 55% 64% 46%
bstring/bstrlib.c 73% 76% 69%

Minimum allowed coverage is 50%

Generated by 🐒 cobertura-action against 8616e2b

@rdmark
rdmark requested a review from msteinert September 8, 2025 05:45
@rdmark
rdmark marked this pull request as ready for review September 8, 2025 05:45
@rdmark

rdmark commented Sep 8, 2025

Copy link
Copy Markdown
Collaborator Author

Next up I'm thinking it would be worth setting up a job that uses the MSVC compiler which is what most people would use on Windows, but it seems a bit more complicated.

One approach described here https://dvdhrm.github.io/2021/04/21/meson-msvc-github-actions/

Edit: Added! But I couldn't figure out how to easily run the unit tests with check on MSVC.

@rdmark
rdmark force-pushed the windows-build branch 2 times, most recently from 01411c9 to 343144b Compare September 8, 2025 17:57
@rdmark rdmark changed the title Create a Windows build job in the GitHub workflow Create Windows build jobs in the GitHub workflow Sep 8, 2025
First build uses gcc in an MSYS2 environment, the second native Microsoft Visual C
@rdmark rdmark changed the title Create Windows build jobs in the GitHub workflow Check for compiler flags not supported by MSVC Sep 8, 2025
@rdmark
rdmark force-pushed the windows-build branch 3 times, most recently from 6f099f5 to 3333308 Compare September 8, 2025 19:44
@rdmark rdmark changed the title Check for compiler flags not supported by MSVC Cross-platform check for compiler warning flags with Windows support Sep 8, 2025
@rdmark
rdmark force-pushed the windows-build branch 2 times, most recently from 14f4eb5 to 6248d72 Compare September 9, 2025 05:27
When using Microsoft Visual C on Windows, use a different set of warning flags than the usual Unix compilers

Also, use warning_level=3 to get the -Wpedantic flag rather than hard coding it
@sonarqubecloud

sonarqubecloud Bot commented Sep 9, 2025

Copy link
Copy Markdown

@msteinert
msteinert merged commit 73ea7f0 into main Sep 9, 2025
18 checks passed
@rdmark
rdmark deleted the windows-build branch September 11, 2025 21:28
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