This adds an option --print-rusage-self to the fish executable. When set,
this option prints some getrusage stats to the console in a human-readable
way. This will be used by upcoming benchmarking support.
The compiler flag `-Werror=unguarded_availability` was hard-coded for
macOS, but is not supported by GCC on macOS 10.10 (Yosemite). Test for
support with CHECK_CXX_COMPILER_FLAG before forcing it.
This was broken in a8eb02f9f5 when the
detection was corrected for FreeBSD. This patch makes the detection work
for both Linux and FreeBSD instead of one or the other (tested).
CMake seems to have trouble finding libraries from multiarch packages
that do not have the compatibility symlink installed to the
arch-independent library directory. Users must either manually supply
the path to the library in question via command-line parameters or we
can fall back to CMake's alternate method of finding packages based off
of pkg-config rather than using the hard-coded `FindCurses` CMake module
specific to the CMake version/distribution installed.
Just sets locale to "C" (because that's the only one we need), does
wcstod and resets the locale.
No idea why uselocale(loc) failed for me, but it did.
Fixes#5407.
The non-ncurses version of term.h requires that curses.h be first
included. Only very recent versions of CMake include a LANGUAGE
option to CHECK_INCLUDE_FILES, so we aren't using it and specifying
CXX here..
CheckFunctionExists checks for C linkage only, and recommends the use of
CheckSymbolExists in the documentation. This improves the detection of
C++ features, as opposed to C features.