mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-10 16:20:24 +01:00
I am compiling for FreeBSD where the compiler is Clang and doesn't accept
all the GCC warning flags. This breaks the -Werror build:
```
error: unknown warning option '-Wduplicated-branches' [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Wduplicated-cond' [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Wjump-misses-init' [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Wlogical-op'; did you mean '-Wlong-long'? [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Wrestrict' [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Wunused-but-set-variable'; did you mean '-Wunused-const-variable'? [-Werror,-Wunknown-warning-option]
```
With this change we use check_{c,cxx}_compiler_flag to check if the flag
is supported before adding it. In the future this will allow adding
clang-specific warning flags to the list of warnings as well since they
will be ignored for GCC.
|
||
|---|---|---|
| .. | ||
| CheckPrototypeExists.cmake | ||
| CheckStructMember.cmake | ||
| COPYING-CMAKE-SCRIPTS | ||
| CPackInstallConfig.cmake | ||
| FindDocBookXSL.cmake | ||
| FindDoxygen.cmake | ||
| FindGLIB2.cmake | ||
| FindLibIconv.cmake | ||
| MacroGetenvWinPath.cmake | ||
| MacroLibrary.cmake | ||
| MacroOptionalFindPackage.cmake | ||
| Macros.cmake | ||
| MacrosAutotools.cmake | ||
| ProjectSourceGroup.cmake | ||
| Win32Macros.cmake | ||