Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] pkg-cmake: reduce output when being silent
@ 2015-02-11 17:52 Fabio Porcedda
  2015-02-11 20:14 ` Thomas Petazzoni
  2015-02-14  8:01 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Fabio Porcedda @ 2015-02-11 17:52 UTC (permalink / raw)
  To: buildroot

Use CMAKE_RULE_MESSAGES and CMAKE_INSTALL_MESSAGE variables to reduce
cmake output when it is a silent build.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
---
 package/pkg-cmake.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
index 6c9955d..de11134 100644
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -31,6 +31,12 @@ CMAKE_HOST_C_COMPILER = $(HOSTCC)
 CMAKE_HOST_CXX_COMPILER = $(HOSTCXX)
 endif
 
+ifdef QUIET
+CMAKE_QUIET = -DCMAKE_RULE_MESSAGES=OFF -DCMAKE_INSTALL_MESSAGE=NEVER
+else
+CMAKE_QUIET =
+endif
+
 ################################################################################
 # inner-cmake-package -- defines how the configuration, compilation and
 # installation of a CMake package should be done, implements a few hooks to
@@ -86,6 +92,7 @@ define $(2)_CONFIGURE_CMDS
 		-DBUILD_TESTING=OFF \
 		-DBUILD_SHARED_LIBS=$$(if $$(BR2_STATIC_LIBS),OFF,ON) \
 		-DUSE_CCACHE=$$(if $$(BR2_CCACHE),ON,OFF) \
+		$$(CMAKE_QUIET) \
 		$$($$(PKG)_CONF_OPTS) \
 	)
 endef
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] pkg-cmake: reduce output when being silent
  2015-02-11 17:52 [Buildroot] [PATCH] pkg-cmake: reduce output when being silent Fabio Porcedda
@ 2015-02-11 20:14 ` Thomas Petazzoni
       [not found]   ` <CAHkwnC9TyTDnd0jfcVtoX0fO3N5xDD7eeWqbqATtF+-pMcatOA@mail.gmail.com>
  2015-02-14  8:01 ` Thomas Petazzoni
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2015-02-11 20:14 UTC (permalink / raw)
  To: buildroot

Dear Fabio Porcedda,

On Wed, 11 Feb 2015 18:52:21 +0100, Fabio Porcedda wrote:

> +ifdef QUIET
> +CMAKE_QUIET = -DCMAKE_RULE_MESSAGES=OFF -DCMAKE_INSTALL_MESSAGE=NEVER
> +else
> +CMAKE_QUIET =
> +endif

Use:

ifneq ($(QUIET),)
CMAKE_QUIET = -DCMAKE_RULE_MESSAGES=OFF -DCMAKE_INSTALL_MESSAGE=NEVER
endif

We generally don't use ifdef to test the value of a variable in
Buildroot.

The else part is unnecessary.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] pkg-cmake: reduce output when being silent
       [not found]   ` <CAHkwnC9TyTDnd0jfcVtoX0fO3N5xDD7eeWqbqATtF+-pMcatOA@mail.gmail.com>
@ 2015-02-12 21:20     ` Fabio Porcedda
  0 siblings, 0 replies; 4+ messages in thread
From: Fabio Porcedda @ 2015-02-12 21:20 UTC (permalink / raw)
  To: buildroot

I've forgotten to do a replay all...

On Thu, Feb 12, 2015 at 6:24 AM, Fabio Porcedda
<fabio.porcedda@gmail.com> wrote:
> On Wed, Feb 11, 2015 at 9:14 PM, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
>> Dear Fabio Porcedda,
>>
>> On Wed, 11 Feb 2015 18:52:21 +0100, Fabio Porcedda wrote:
>>
>>> +ifdef QUIET
>>> +CMAKE_QUIET = -DCMAKE_RULE_MESSAGES=OFF -DCMAKE_INSTALL_MESSAGE=NEVER
>>> +else
>>> +CMAKE_QUIET =
>>> +endif
>>
>> Use:
>>
>> ifneq ($(QUIET),)
>> CMAKE_QUIET = -DCMAKE_RULE_MESSAGES=OFF -DCMAKE_INSTALL_MESSAGE=NEVER
>> endif
>>
>> We generally don't use ifdef to test the value of a variable in
>> Buildroot.
>
> Ok will change it, nevertheless I like more the "ifdef" but maybe it's
> just may personal preference.
>
>> The else part is unnecessary.
>
> I added that to be able to use "make --warn-undefined-variables", i
> was thinking that is a useful tool for debugging makefile code.
>
> BR
> --
> Fabio Porcedda



-- 
Fabio Porcedda

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] pkg-cmake: reduce output when being silent
  2015-02-11 17:52 [Buildroot] [PATCH] pkg-cmake: reduce output when being silent Fabio Porcedda
  2015-02-11 20:14 ` Thomas Petazzoni
@ 2015-02-14  8:01 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2015-02-14  8:01 UTC (permalink / raw)
  To: buildroot

Dear Fabio Porcedda,

On Wed, 11 Feb 2015 18:52:21 +0100, Fabio Porcedda wrote:
> Use CMAKE_RULE_MESSAGES and CMAKE_INSTALL_MESSAGE variables to reduce
> cmake output when it is a silent build.
> 
> Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
> ---
>  package/pkg-cmake.mk | 7 +++++++
>  1 file changed, 7 insertions(+)

Applied to next, after making the following changes:

    [Thomas:
     - use ifneq instead of ifdef
     - remove unneeded else clause
     - also add to the host variant of the configure commands]

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-02-14  8:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-11 17:52 [Buildroot] [PATCH] pkg-cmake: reduce output when being silent Fabio Porcedda
2015-02-11 20:14 ` Thomas Petazzoni
     [not found]   ` <CAHkwnC9TyTDnd0jfcVtoX0fO3N5xDD7eeWqbqATtF+-pMcatOA@mail.gmail.com>
2015-02-12 21:20     ` Fabio Porcedda
2015-02-14  8:01 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox