lcm-proj / lcm

Lightweight Communications and Marshalling
GNU Lesser General Public License v2.1
944 stars 385 forks source link

Optional Werror #459

Closed nosracd closed 1 year ago

nosracd commented 1 year ago

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:

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.

tprk77 commented 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.