Any chance to see colour output from CMake-based installations?
Mojca Miklavec
mojca at macports.org
Fri Jul 5 17:53:09 PDT 2013
On Fri, Jul 5, 2013 at 9:38 PM, Ryan Schmidt <ryandesign at macports.org> wrote:
>
> On Jul 5, 2013, at 09:27, Mojca Miklavec wrote:
>
>> I don't know how to achieve this, but it would be very nice if "port
>> -v build someport" would display output in colours for CMake-based
>> installations.
>>
>> How difficult would it be to implement such a feature?
>
> Usually, programs that can output in color will check before doing so whether they are running in a terminal. Under MacPorts, they're not; MacPorts is running in a terminal, and the other programs are running in MacPorts. MacPorts could fool its subservient programs into thinking they're running in a terminal, which would get you color output in the terminal for "port -v " and "port -d", but at the same time those color codes would end up in the main.log files, which would make them hard to read in text editors that don't understand terminal color codes, so I don't think we want that. Also, some build systems might decide, when running in a terminal, that they should run in interactive mode, and prompt the user for answers to configuration questions; we want MacPorts to run automatically, unattended, without any prompting.
Thank you for the precise explanation.
Just a follow-up question then. Is the "MacPorts could fool its
subservient programs into thinking they're running in a terminal" part
something trivial or something complex to implement?
If it is trivial to do, I would like to run it locally from time to
time. If it is complex, I will simply forget the matter.
Thank you,
Mojca
More information about the macports-dev
mailing list