dbus/cmake
Alex Richardson d35554c111 cmake: Only add warning flags if the compiler supports them
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.
2022-03-29 12:21:46 +00:00
..
bus Move cmake related build system to top level 2019-01-22 09:57:40 +01:00
modules cmake: Only add warning flags if the compiler supports them 2022-03-29 12:21:46 +00:00
bus-test.bat.cmake * cmake: new directory, contains cmake build support. 2007-03-03 14:32:17 +00:00
config.h.cmake cmake: setup variable WORDS_BIGENDIAN correctly 2022-03-02 14:35:54 +01:00
ConfigureChecks.cmake cmake: Detect backtrace() support on platforms such as FreeBSD 2022-03-24 13:41:19 +00:00
dbus-env.bat.cmake Split DBUS_SESSION_BUS_DEFAULT_ADDRESS into listen, connect addresses and set better defaults 2012-08-13 19:57:13 +01:00
DBus1Config.cmake.in cmake: In generated cmake support files get value for DBus1_INCLUDE_DIRS variable from related cmake target 2021-11-18 13:51:11 +00:00
DBus1Config.pkgconfig.in CMake: Set IMPORTED_IMPLIB property 2021-11-18 13:20:08 +00:00
DBus1ConfigVersion.cmake.in cmake, autotools: Add find package config support for cmake clients 2017-03-20 14:18:45 +00:00
i686-w64-mingw32.cmake cmake: Fix warning on travis-ci 'CMAKE_FORCE_C.._COMPILER macro is deprecated' 2018-03-21 15:02:38 +01:00
x86_64-w64-mingw32.cmake travis-ci: Add cross building support for mingw 64 bit compiler 2018-03-22 21:13:47 +01:00