Skip to content
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

MSVC / Treats all compiler warnings as errors #1327

Open
francoiscoulon opened this issue Mar 6, 2024 · 2 comments
Open

MSVC / Treats all compiler warnings as errors #1327

francoiscoulon opened this issue Mar 6, 2024 · 2 comments

Comments

@francoiscoulon
Copy link

francoiscoulon commented Mar 6, 2024

When compiling with Visual Studio (msvc) warnings are treated as errors which is making compilation fail pretty quickly since with /W3 level there is quite a bunch of warnings (setting CMAKE_COMPILE_WARNING_AS_ERROR doesn't fix the problem ¯\_ (ツ)_/¯ ).
It's also not mimicking gcc, clang and icc side, there the flag -Werror is not set.

For "homogeneity" could the /WX be removed or commented out in the MSVC block currently here in the code ?

And if someone has a suggestion to avoid having to fix the CMakelist.txt manually please comment.

Thank you !

@davidgyu
Copy link
Member

Filed as internal issue #OSD-434

@davidgyu
Copy link
Member

Good point about the inconsistency across mcvc, gcc, icc, etc., though I think we'll want to address this inconsistency by enabling warnings as errors for all of these compilers.

Enabling warnings as errors within the OpenSubdiv build itself helps us catch issues that might affect client code using OpenSubdiv headers within client build systems.

We build with Visual Studio (2015, 2017, 2019, 2022) from the Command Prompt and from the IDE and Ninja as part of our regular development and testing.

Can you share more about when this is causing your builds of OpenSubdiv to fail?

Thanks!

davidgyu added a commit to davidgyu/OpenSubdiv that referenced this issue Jul 22, 2024
This option is disabled by default, but when enabled flags warnings as
errors and may enable additional warnings.

WIP PixarAnimationStudios#1327 and internal issue #OSD-434
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

No branches or pull requests

2 participants