Compiling on linux breaks due to "-Werror"
stkrake opened this issue ยท 10 comments
CMakeLists.txt release v2.12.1 introduced -Werror
for non-MSVC compilers. This breaks compilation on linux.
See attached file: Werror_errs.txt. Most of it seems to be in MathLib.h (-Werror=strict-aliasing
).
Compiler is gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4)
Thanks! Some of these warnings can be fixed, some are really hard to fix. Let's keep this one open, but I would suggest removing -Werror
for now as a suitable WAR.
I am totally happy without -Werror
is this case ๐ Some warnings in MathLib may not even be avoidable...
At least I will try to minimize the amount of warnings...
Some warnings (when unreasonable) could instead be disabled (e.g. -Wno-unknown-pragmas)
Some warnings (when unreasonable) could instead be disabled (e.g. -Wno-unknown-pragmas)
Thanks. That's the plan :)
On VC++ I usually put things with breaking warnings inside #pragma warning(push) #pragma warning( disable,...) #pragma warning(pop)
. This limits the "warning-lessness" to known areas. But this may become a compiler compatibility nightmare if extended to gcc and clang.
Unfortunately, I can't provide ETA. I wanna spend some time on this task, but need to find a remote Linux machine or setup a virtual machine first.
I can now confirm that it compiles (and works) after simply removing -Werror
from CMakeLists.txt.
Yes, compiles and works out of the box now. On win32 and linux. Without a single warning ๐
Closing this. Many thanks.