Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Feb 2013 10:37:31 +0000
From:      Chris Rees <utisoft@gmail.com>
To:        Anton Shterenlikht <mexas@bristol.ac.uk>
Cc:        FreeBSD Mailing List <freebsd-ports@freebsd.org>
Subject:   Re: how to use -f[no-]color-diagnostics clang option with ports
Message-ID:  <CADLo839ao6--MmKu7LV51yUHDk2237zL=ndsHwz0fG7X24dvrQ@mail.gmail.com>
In-Reply-To: <201302221024.r1MAOoBt025487@mech-cluster241.men.bris.ac.uk>
References:  <12378284.0P1MznmmVU@mercury.ph.man.ac.uk> <201302221024.r1MAOoBt025487@mech-cluster241.men.bris.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On 22 Feb 2013 10:25, "Anton Shterenlikht" <mexas@bristol.ac.uk> wrote:
>
>         From makc@freebsd.org Thu Feb 21 13:47:30 2013
>         > clang colours corrupt script() output, e.g.:
>         >
>         > #warning This file includes at least one deprecated or
antiquated header. \
>         > ^[[0;1;32m ^
>         > ^[[0m1 warning generated.
>         > ^[[31m^[[1mLinking CXX executable ../../../bin/pvbatch
>         > ^[[0m[ 91%] Built target pvbatch-real
>         >
>         > Can I use something like this
>         >
>         >  CFLAGS+= -fno-color-diagnostics
>         >  CXXFLAGS+= -fno-color-diagnostics
>         >
>         > to suppress colour?
>
>         CMAKE_ARGS+=    -DCMAKE_COLOR_MAKEFILE=off
>
> I put this in /etc/make.conf:
>
> # grep COLOR /etc/make.conf
> CMAKE_ARGS+=    -DCMAKE_COLOR_MAKEFILE=off
>
> but building e.g. science/paravew in script(1),
> I still get corrupted output, e.g.
>
> In file included from /usr/include/c++/4.2/backward/strstream:51:
> ^[[1m/usr/include/c++/4.2/backward/backward_warning.h:32:2:
^[[0m^[[0;1;35mwarni
> ng: ^[[0m^[[1mThis file
>       includes at least one deprecated or antiquated header. Please
consider
>
> Or is this nothing to do with colour?
> Then how can I get rid of these special
> characters?
>

These look like clang output rather than CMake output.

Did you try putting -fno-color-diagnostics in CFLAGS, and CXXFLAGS?  The
clang manual indicates that this would help.

Chris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo839ao6--MmKu7LV51yUHDk2237zL=ndsHwz0fG7X24dvrQ>