Commit 09db7b2
committed
[cmake] Unconditionally use -Wno-pass-failed with Clang
Since 4feae05, most of the handling
of warning options was rewritten to add such options based on
hardcoded knowledge about what compilers support which options,
and since which versions. This avoids a number of configure time
checks, speeding up the cmake configuration.
This avoids erroneously adding this option with GCC, which doesn't
really support it.
If testing for a warning option like -Wno-<foo> with GCC, GCC won't
print any diagnostic at all, leading to the options being accepted
incorrectly. However later, if compiling a file that actually prints
another warning, GCC will also print warnings about these -Wno-<foo>
options being unrecognized.
This avoids extra warning spam like this, for every source file that
does produce warnings with GCC:
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-pass-failed’ may have been intended to silence earlier diagnostics1 parent 0dff52b commit 09db7b2
1 file changed
+9
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
948 | 948 | | |
949 | 949 | | |
950 | 950 | | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
951 | 960 | | |
952 | 961 | | |
953 | 962 | | |
| |||
962 | 971 | | |
963 | 972 | | |
964 | 973 | | |
965 | | - | |
966 | | - | |
967 | | - | |
968 | | - | |
969 | | - | |
970 | | - | |
971 | | - | |
972 | 974 | | |
973 | 975 | | |
974 | 976 | | |
| |||
0 commit comments