cmake: Improve compiler checks
cmake: Improve compiler checks

Always use -Werror to detect compiler flags if possible.

Signed-off-by: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@cryptomilk.org>

clibs/cmocka,clibs/cmocka