11

When I'm compiling with Makefile build log is colorful and detailed. But when I use Ninja I'm getting only one line with progress, without percentage and color. How can I make Ninja build log look like Makefile's one? Is this even possible or that must require Ninja developers actions?

Example:

Makefile log:

Ninja log:

PS any method welcome, will be used locally.

PPS if there is no one, just say that this is impossible for now.

Maxim Zhuchkov
  • 141
  • 1
  • 10

1 Answers1

1

Following the Ninja documentation, you can customize the progress status by setting the NINJA_STATUS environment variable with several placeholders.

In your case, to print the percentage you have to set this variable before running ninja (assuming you are running ninja on a unix environment):

export NINJA_STATUS="[%p ] "

cmake -GNinja ..
ninja
  • Percentage is what I like, however that's only part of the problem. Mist importantly I want it to not override previous line. Adding \n inside status variable does not really help, \\n does not work too... – Maxim Zhuchkov Dec 01 '22 at 16:51