llvm-mirror/cmake
Chandler Carruth 0ac9f05175 Add support for linking against a curses library when available and
using it to detect whether or not a terminal supports colors. This
replaces a particularly egregious hack that merely compared the TERM
environment variable to "dumb". That doesn't really translate to
a reasonable experience for users that have actually ensured their
terminal's capabilities are accurately reflected.

This makes testing a terminal for color support somewhat more expensive,
but it is called very rarely anyways. The important fast path when the
output is being piped somewhere is already in place.

The global lock may seem excessive, but the spec for calling into curses
is *terrible*. The whole library is terrible, and I spent quite a bit of
time looking for a better way of doing this before convincing myself
that this was the fundamentally correct way to behave. The damage of the
curses library is very narrowly confined, and we continue to use raw
escape codes for actually manipulating the colors which is a much sane
system than directly using curses here (IMO).

If this causes trouble for folks, please let me know. I've tested it on
Linux and will watch the bots carefully. I've also worked to account for
the variances of curses interfaces that I could finde documentation for,
but that may not have been sufficient.

llvm-svn: 187874
2013-08-07 08:47:36 +00:00
..
modules Add support for linking against a curses library when available and 2013-08-07 08:47:36 +00:00
platforms Allow overriding the location of C/C++ compilers in Android CMake build. 2013-05-29 07:23:20 +00:00
config-ix.cmake Add support for linking against a curses library when available and 2013-08-07 08:47:36 +00:00
README

See docs/CMake.html for instructions on how to build LLVM with CMake.