# Completely hiding output from ExternalProject\_Add

**URL:** https://discourse.cmake.org/t/completely-hiding-output-from-externalproject-add/3468
**Category:** Usage
**Tags:** os:linux
**Created:** [June 2, 2021, 3:46pm UTC](https://discourse.cmake.org/t/completely-hiding-output-from-externalproject-add/3468 "2021-06-02T15:46:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Barry\_Revzin](https://discourse.cmake.org/user_avatar/discourse.cmake.org/barry_revzin/32/1283_2.png) [@Barry\_Revzin](https://discourse.cmake.org/u/Barry_Revzin)
#### Post date: [June 2, 2021, 3:46pm UTC](https://discourse.cmake.org/t/completely-hiding-output-from-externalproject-add/3468/1 "2021-06-02T15:46:38Z")

</div>

As part of my build, I’m building `libbacktrace` from source, using `ExternalProject_Add`:

```auto
ExternalProject_Add(libbacktrace-git-repo
    GIT_REPOSITORY https://github.com/ianlancetaylor/libbacktrace.git
    GIT_TAG 4f57c999716847e45505b3df170150876b545088
    SOURCE_DIR git/libbacktrace
    BINARY_DIR git/libbacktrace-build
    INSTALL_DIR git/libbacktrace-install
    GIT_CONFIG advice.detachedHead=false
    CONFIGURE_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/git/libbacktrace/configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/git/libbacktrace-install
    BUILD_COMMAND make
    INSTALL_COMMAND make install
    BUILD_BYPRODUCTS git/libbacktrace-install/lib/libbacktrace.a
    )

```

This works fine, except that it dumps A LOT of output during the configuration and build phases, all of which is irrelevant to me and I’d like to get rid of.

If I add these parameters to `ExternalProject_Add`:

```auto
    LOG_CONFIGURE ON
    LOG_INSTALL ON
    LOG_BUILD ON
    LOG_OUTPUT_ON_FAILURE ON

```

The result is greatly improved, in that now I just get:

```auto
[40/44] Performing configure step for 'libbacktrace-git-repo'
-- libbacktrace-git-repo configure command succeeded. See also /home/brevzin/repo/build/libs/backtrace/libbacktrace-git-repo-prefix/src/libbacktrace-git-repo-stamp/libbacktrace-git-repo-configure-*.log
[41/44] Performing build step for 'libbacktrace-git-repo'
-- libbacktrace-git-repo build command succeeded. See also /home/brevzin/repo/build/libs/backtrace/libbacktrace-git-repo-prefix/src/libbacktrace-git-repo-stamp/libbacktrace-git-repo-build-*.log
[42/44] Performing install step for 'libbacktrace-git-repo'
-- libbacktrace-git-repo install command succeeded. See also /home/brevzin/repo/build/libs/backtrace/libbacktrace-git-repo-prefix/src/libbacktrace-git-repo-stamp/libbacktrace-git-repo-install-*.log

```

That’s… substantively better. But really I would like zero output.

I tried changing `BUILD_COMMAND make` to `BUILD_COMMAND make 2>&1 >/dev/null` but that appears to escape the `>/dev/null` part, so that it tries to execute `make 2>&1 ">/dev/null"` instead.

Is there a way to completely squash this output?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [June 2, 2021, 5:15pm UTC](https://discourse.cmake.org/t/completely-hiding-output-from-externalproject-add/3468/2 "2021-06-02T17:15:42Z")

</div>

3.20 suppresses this message for the `Ninja` generator. @craig.scott had a refactoring that passed around a `QUIET` argument to also suppress it, but it had to be reverted.

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [June 2, 2021, 9:45pm UTC](https://discourse.cmake.org/t/completely-hiding-output-from-externalproject-add/3468/3 "2021-06-02T21:45:09Z")

</div>

I had hoped to get most of that reverted work back in for 3.21, but I’m not going to have time. I’ll hopefully get a chance to put it in for 3.22 later in the year.
