Check of -Werror flag fails
- CMake version: 3.10.3
- gcc version: 8.0.1
- OS: Ubuntu 16.04
I have seen the issue #11753 but its meaning is not clear and does not seems to me the same (but maybe is is related).
Checking the compiler support of "-Werror" flag by using check_c_compiler_flag() or check_cxx_compiler_flag() states that the flag is not supported (which is not the case of course). This suggests me that check_c_compiler_flag()/check_cxx_compiler_flag() automatically passes some additional flags that causes the raising of some warnings, which should not be done, at least when checking for "-Werror" flag.
Btw, I have not tested under Windwos VC++ flag "/WX", but it oculd have the same issue.