NVIDIAGameWorks/PhysX

Disable Werror by default and only enable it in the CI

Opened this issue · 1 comments

FlexW commented

Thanks for making this cool project Open-Source!

I have a minor annoyance:
-Werror is enabled by default which can cause breakage on Linux distributions if newer compilers are used (which is often the case for Linux distributions like ArchLinux).

I would propose to only enable -Werror in the CI. This way errors can still be caught, but Linux users don't need to edit CMakeLists.txt on up to date distros. I don't think there is a benefit in building release builds with Werror enabled.

Any thoughts on this?

As a workaround, CMake respects the CXXFLAGS environment variable, so the user can populate it with warning disabling flags prior to building:

export CXXFLAGS="                    \
    $CXXFLAGS                        \
    -Wno-dtor-name                   \
    -Wno-suggest-destructor-override \
    -Wno-suggest-override            \
"

# Proceed with PhysX build from here.