Closed nosracd closed 1 year ago
I've caught up on #457. I must admit, I didn't realize that GCC needs optimization flags turned on for some warnings. Anyway, it seems after #458 that CI is now building a release build with -O3 -DNDEBUG
so that should fix the issue with the warnings not being detected correctly. Also, thank you for adding the variable initiations that were missing.
It still seems to me that we should keep the warning flags for the lcm-lua
target. Without them, #457 would not have been uncovered.
Unfortunately, it appears that if Werror is turned on in this fashion cmake won't let it be overridden via the usual command-line arguments:
-DCMAKE_C_FLAGS="-Wno-error" -DCMAKE_CXX_FLAGS="-Wno-error"
--compile-no-warning-as-error
This PR removes all arguments from
lcm-lua/CMakeLists.txt
which modify the number of warnings and how they're treated, instead preferring opt-in command-line arguments to increase the number of warnings and treat them as errors.Resolves #457.