Skip to contentSkip to conversation

pkg-cmake: reduce output when being silent

PATCH New Fabio Porcedda 2 participants 4 messages Feb 11, 2015 – Feb 14, 2015 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pkg-cmake: reduce output when being silent

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

---
 package/pkg-cmake.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/pkg-cmake.mk +7 -0
index 6c9955d..de11134 100644
@@ -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
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/1 pkg-cmake: reduce output when being silent

Dear Fabio Porcedda,

package/pkg-cmake.mk CMAKE_HOST_C_COMPILER = $(HOSTCC) · line 38

Quoted 5 lines · Fabio Porcedda
package/pkg-cmake.mk +5 -0
+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

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

A message that is not in the archive (sent off-list or not yet received): CAHkwnC9TyTDnd0jfcVtoX0fO3N5xDD7eeWqbqATtF+-pMcatOA@mail.gmail.com

#3 lore raw

PATCH 1/1 pkg-cmake: reduce output when being silent

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

Quoted 32 lines · Fabio Porcedda
Quoted 12 lines · Thomas Petazzoni

Dear Fabio Porcedda,

package/pkg-cmake.mk CMAKE_HOST_C_COMPILER = $(HOSTCC) · line 38

Quoted 5 lines · Fabio Porcedda
package/pkg-cmake.mk +5 -0
+ifdef QUIET
+CMAKE_QUIET = -DCMAKE_RULE_MESSAGES=OFF -DCMAKE_INSTALL_MESSAGE=NEVER
+else
+CMAKE_QUIET =
+endif

Use:

Quoted 6 lines

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.

Quoted 1 line

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

Signature · 1 line
Fabio Porcedda
#4 lore raw

PATCH 1/1 pkg-cmake: reduce output when being silent

In reply to Fabio Porcedda

Dear Fabio Porcedda,

Quoted 7 lines · Fabio Porcedda

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

---
 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

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