[OE-core] [PATCH] cmake: Displace VERBOSE setting

André Draszik git at andred.net
Thu Dec 19 08:52:50 UTC 2019


Hi Khem,

On Wed, 2019-12-18 at 15:39 -0800, Khem Raj wrote:
> Setting VERBOSE always, while is fine on one hand for debugging, its
> coming at an expense of creating lots and lots of logs, e.g. qtwebkit
> compile logs alone with VERBOSE is 163MB, there are many other large
> packages which use cmake e.g. WPE, webkitgtk etc which are in same range
> with out this option on, the logs reduce to 861K and also speeds up
> build a notch
> 
> If user needs to enable this logs for targetted debugging debugging that
> could be added via
> 
> EXTRA_OECMAKE_BUILD += "--verbose"
> 
> in recipe
> 
> Signed-off-by: Khem Raj <raj.khem at gmail.com>
> Cc: Ross Burton <ross.burton at intel.com>

I don't agree with the reasoning to always disable this by default. - it's
way too useful in general. I can't count the number of times it was enough
to look at the log.do_compile to figure out something is wrong.

Now you have to recompile everything with this merged, and something that
took 5 minutes to debug becomes an arduous task.

If the Webkit build is too verbose, you should make that specific recipe
less verbose. E.g. you could always set
EXTRA_OECMAKE_BUILD, and just clear
it out in the webkit recipe.

Otherwise, based on the same reasoning, you should disable all logs, not just
cmake logs: kernel, make output in general, bitbake logs. They all take up space.

Seriously, those logs are useful, keeping in mind that often logs are
collected on build-machines, and having easy access is a huge time-saver.


Cheers,
Andre'



> ---
>  meta/classes/cmake.bbclass | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
> index 8ccb1eefc7..8a44a0c216 100644
> --- a/meta/classes/cmake.bbclass
> +++ b/meta/classes/cmake.bbclass
> @@ -181,9 +181,14 @@ cmake_do_configure() {
>  	  -Wno-dev
>  }
>  
> +# To enable VERBOSE option to emit all kind of logs for a given recipe add following in it
> +#
> +# EXTRA_OECMAKE_BUILD += "--verbose"
> +#
> +# Then run do_compile again
>  cmake_runcmake_build() {
> -	bbnote ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '${B}' "$@" -- ${EXTRA_OECMAKE_BUILD}
> -	eval ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '${B}' "$@" -- ${EXTRA_OECMAKE_BUILD}
> +	bbnote ${DESTDIR:+DESTDIR=${DESTDIR} } cmake --build '${B}' "$@" -- ${EXTRA_OECMAKE_BUILD}
> +	eval ${DESTDIR:+DESTDIR=${DESTDIR} } cmake --build '${B}' "$@" -- ${EXTRA_OECMAKE_BUILD}
>  }
>  
>  cmake_do_compile()  {
> -- 
> 2.24.1
> 



More information about the Openembedded-core mailing list