fish-shell/cmake
Mahmoud Al-Qudsi 372f03ba20 Fix sys/sysctl.h depreciation error under glibc 2.30+
glibc 2.30 and up emit an ugly depreciation warning on
`#include <sys/sysctl.h>` - this patch makes the build system fail the
include test for `sys/sysctl.h` by forcibly setting `-Werror` before the
call to `check_include_files` (which internally uses `try_compile`) to
get `HAVE_SYS_SYSCTL` to not be defined (even if it's there) if it would
cause such a depreciation message to be emitted.

Ideally, we would not have to manually massage `CMAKE_C_FLAGS` before
calling `check_include_files` and could just tweak that to either always
or conditionally try compilation with `-Werror`, but try_compile doesn't
actually use any overridden `CMAKE_C_FLAGS` values [0] (dating back to
2006).

[0]: https://cmake.org/pipermail/cmake/2006-October/011649.html
2022-01-20 11:04:40 -06:00
..
checks Optimize away a str2wcs_internal check 2020-09-07 18:05:18 -05:00
Benchmark.cmake Use lowercase CMake function names 2020-03-14 16:11:35 -07:00
CheckIncludeFiles.cmake :Revert "Remove CheckIncludeFiles.cmake" 2022-01-19 11:41:16 -08:00
ConfigureChecks.cmake Fix sys/sysctl.h depreciation error under glibc 2.30+ 2022-01-20 11:04:40 -06:00
Docs.cmake docs synopsis: add HTML highlighing and automate manpage markup 2022-01-19 22:56:41 +08:00
gettext.cmake Also remove the languages from cmake 2021-10-18 18:39:07 +02:00
Install.cmake Rename the top-level test target to fish_run_tests 2021-11-26 13:13:42 -08:00
Mac.cmake Revert "Update Mac.cmake" 2022-01-03 08:08:41 -08:00
MacApp.cmake Group certain cmake targets into folders 2021-03-21 13:29:41 -07:00
PCRE2.cmake cmake: Disable -Wunused-macros for bundled PCRE2 2021-10-16 13:50:33 -07:00
Tests.cmake Rename the top-level test target to fish_run_tests 2021-11-26 13:13:42 -08:00
Version.cmake Use lowercase CMake function names 2020-03-14 16:11:35 -07:00