cmake/Modules/EnableWarnings.cmake


Log

Author Commit Date CI Message
Edward Thomson cc9e47c9 2019-06-15T18:51:40 win32: support upgrading warnings to errors (/WX) For MSVC, support warnings as errors by providing the /WX compiler flags. (/WX is the moral equivalent of -Werror.) Disable warnings as errors ass part of xdiff, since it contains warnings. But as a component of git itself, we want to avoid skew and keep our implementation as similar as possible to theirs. We'll work with upstream to fix these issues, but in the meantime, simply let those continue to warn.
lhchavez 6af6170b 2019-01-05T20:50:42 Make ENABLE_WERROR actually work This change explicitly adds -Werror to the CFLAGS. Due to the way that the ADD_C_FLAG_IF_SUPPORTED() macro was mangling the flag name to convert it into a define name, any warning that had a dash in its name was not being correctly enabled. Additionally, any flag that is enabled implicitly by the compiler (like -Wunused-result and -Wdeprecated-declarations) would not cause an error unless they were explicitly enabled with the ENABLE_WARNINGS() macro.
Edward Thomson f8a2dda8 2018-02-05T15:21:37 cmake: move ENABLE_WARNINGS to a module