Skip to content

ExternalProject: Silence step succeeded message when using Ninja

When doing an ExternalProject superbuild with all output logged to files, the output currently looks as follows:

[658/904] Performing build step for 'khtml'
-- khtml build command succeeded.  See also /root/build/kde/frameworks/khtml/log/khtml-build-*.log
[659/904] Performing install step for 'khtml'
-- khtml install command succeeded.  See also /root/build/kde/frameworks/khtml/log/khtml-install-*.log
[661/904] Performing configure step for 'krunner'
-- krunner configure command succeeded.  See also /root/build/kde/frameworks/krunner/log/krunner-configure-*.log
[661/904] Performing build step for 'krunner'

More specifically, because a success line is printed for every succeeded step, we lose the advantage of Ninja's progress bar which will now also print a new line instead of updating the same link as happens when using Ninja in a normal CMake project.

By silencing the success message when using the Ninja generator, Ninja's progress bar works as expected and updates inline instead of printing a new line for each progress update.

With this change, the above output is reduced to a single progress bar:

[661/904] Performing build step for 'krunner'
Edited by Daan De Meyer

Merge request reports