# making Ninja build output silent

**URL:** https://discourse.cmake.org/t/making-ninja-build-output-silent/4439
**Category:** Code
**Created:** [November 6, 2021, 6:56pm UTC](https://discourse.cmake.org/t/making-ninja-build-output-silent/4439 "2021-11-06T18:56:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hex](https://discourse.cmake.org/user_avatar/discourse.cmake.org/hex/32/363_2.png) [@hex](https://discourse.cmake.org/u/hex)
#### Post date: [November 6, 2021, 6:56pm UTC](https://discourse.cmake.org/t/making-ninja-build-output-silent/4439/1 "2021-11-06T18:56:56Z")

</div>

i noticed that Ninja prints build commands to the console. With Unix Makefile this doesn’t happen. I don’t have verbose build enabled. Is there a way to make Ninja builds silent?

Reproducer:

```cmake
cmake_minimum_required(VERSION 3.20)
project(MyProj)

add_custom_target(tgt ALL COMMAND echo hi)

```

results in the following build output:

```auto
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/test/build
[1/1] cd /tmp/test/build && echo hi
hi

```

Notice the `cd /tmp/test/build && echo hi` output.  
In Makefiles it doesn’t happen:

```auto
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/test/build
hi
Built target tgt

```

---

<div class="post-metadata">

### Author: ![hsattler](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/h/59ef9b/32.png) [@hsattler](https://discourse.cmake.org/u/hsattler)
#### Post date: [November 6, 2021, 7:36pm UTC](https://discourse.cmake.org/t/making-ninja-build-output-silent/4439/2 "2021-11-06T19:36:15Z")

</div>

When you add a description to the custom target or command, this will be printed instead.

---

<div class="post-metadata">

### Author: ![buildSystemPerson](https://discourse.cmake.org/user_avatar/discourse.cmake.org/buildsystemperson/32/2851_2.png) [@buildSystemPerson](https://discourse.cmake.org/u/buildSystemPerson)
#### Post date: [November 6, 2021, 8:17pm UTC](https://discourse.cmake.org/t/making-ninja-build-output-silent/4439/3 "2021-11-06T20:17:50Z")

</div>

AFAIK there is no way to silence Ninja output currently.

This PR may be of interest to you though since it adds `--quiet` to Ninja.

> <https://github.com/ninja-build/ninja/pull/1968/files>
>
> Refined pull request #1818 after discussion in issue #1954 
> 
> Original PR conte…nt: Refined pull request after discussion in #1816

There is currently no release of Ninja that has the new `--quiet` flag as of 11/6/2021
