PhysX icon indicating copy to clipboard operation
PhysX copied to clipboard

Disable Werror by default and only enable it in the CI

Open FlexW opened this issue 4 years ago • 1 comments

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?

FlexW avatar Nov 22 '21 12:11 FlexW

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.

zopsicle avatar Oct 03 '22 18:10 zopsicle