Skip to content

make -Wall, -Wextra and /W4 private to the project#457

Merged
jbaldwin merged 3 commits intojbaldwin:mainfrom
daantimmer:make--Wall--Wextra-and-W4-private-to-the-project
Mar 31, 2026
Merged

make -Wall, -Wextra and /W4 private to the project#457
jbaldwin merged 3 commits intojbaldwin:mainfrom
daantimmer:make--Wall--Wextra-and-W4-private-to-the-project

Conversation

@daantimmer
Copy link
Copy Markdown
Contributor

@daantimmer daantimmer commented Mar 29, 2026

This PR sets the -Wall, -Wextra and /W4 flags scoped to just the libcoro project.
It also removes the duplicate flags in libcoro_test and removed flags -fcoroutines and -fconcepts (these are set by default when the language version is set to C++20)

-std=c++20 could be removed from libcoro_test because its always set through CMAKE_CXX_STANDARD
-fexceptions is removed because its set publicly in libcoro

Fixes #453

@daantimmer
Copy link
Copy Markdown
Contributor Author

daantimmer commented Mar 29, 2026

So, I can also confirm from a 'consuming project' point of view that this is now properly set 'privately':

currently using my forked version here: philips-software/amp-cucumber-cpp-runner#312

And the actual commit with that change (and what I could remove because of it): philips-software/amp-cucumber-cpp-runner@963455f

@jbaldwin
Copy link
Copy Markdown
Owner

I think the windows build is busted because GitHub added windows-2025 which windows-latest now points at. I think if you adjust the tank to be windows-2022 it should work again and we can get a new issue to get 2025 working.

@daantimmer
Copy link
Copy Markdown
Contributor Author

daantimmer commented Mar 29, 2026

Give me a sec to fix that windows issue. Apparently the CMAKE_CXX_COMPILER_ID isn't set properly for MSVC, although it should. It was the misuse of CMAKE_CXX_COMPIELR_ID, we shouldn't use ${CMAKE_CXX_COMPILER_ID} MATCHES "..." but use CMAKE_CXX_COMPILER_ID MATCHES "..." instead. Without the ${} as demonstrated here: https://godbolt.org/z/ThcbG9zdo Don't pay attention to the missing output of MSVC, it tries to read .exe.exe

@daantimmer
Copy link
Copy Markdown
Contributor Author

@jbaldwin its ready for review btw, no more changes required from my side :)

@jbaldwin jbaldwin merged commit 277467f into jbaldwin:main Mar 31, 2026
61 checks passed
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.

Setting project related warnings should probably be set to PRIVATE and not PUBLIC

2 participants