-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added flags to cmakelists in test project to treat all warnings as errors #1900
Added flags to cmakelists in test project to treat all warnings as errors #1900
Conversation
test/CMakeLists.txt
Outdated
if(MSVC) | ||
target_compile_options(${testcase} PRIVATE /W4 /WX) | ||
else() | ||
target_compile_options(${testcase} PRIVATE -Wall -Wextra -pedantic -Werror) | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the previous target_compile_options
is using cmake generator expression syntax, might be good to add generator expression here too.
How about?
target_compile_options(${testcase} PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/W4 /WX>>
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall -Wextra -pedantic -Werror>>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, yeah probably a good idea. I will change that!
Any idea why the AppVeyor build is failing? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any idea why the AppVeyor build is failing?
Yeah looks like I missed a single warning
unit-allocator.cpp(108): warning C4100: 'p': unreferenced formal parameter
Should hopefully be easy enough to fix. Not sure why its only a single VS 2015 build failing on this one however...
Do you have links I can look at to see success for VS 2017 or 2019? It's possible that it's being compiled away in newer compilers. Will love to look. Thanks! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Keep Alive. |
I restarted the failing CIs. Let's see if they succeed now. Unless the build is green, we cannot merge. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Can you please update to the latest |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Refer to #1798
Changes on test/CMakeLists.txt to always use -Wall, -Werror on GCC/Clang and the /WX, /W4 flags on MSVC.
Fixed build issue for GCC
Fixed build issues for Clang