]> code.ossystems Code Review - openembedded-core.git/commitdiff
cmake: Add a knob for cmake VERBOSE settings
authorKhem Raj <raj.khem@gmail.com>
Sat, 28 Dec 2019 07:56:08 +0000 (23:56 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 30 Dec 2019 08:45:03 +0000 (08:45 +0000)
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 disable these logs for a recipe or globally

CMAKE_VERBOSE = ""

in recipe or in global metadata e.g. local.conf

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Ross Burton <ross.burton@intel.com>
Cc: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/cmake.bbclass

index 8ccb1eefc7d1b0f262efa2145bf27003507b3849..11ffb0d33f2eee280d2f2150e7e923adb7792538 100644 (file)
@@ -181,9 +181,18 @@ cmake_do_configure() {
          -Wno-dev
 }
 
+# To disable verbose cmake logs for a given recipe or globally config metadata e.g. local.conf
+# add following
+#
+# CMAKE_VERBOSE = ""
+#
+
+CMAKE_VERBOSE ??= "VERBOSE=1"
+
+# 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_VERBOSE} cmake --build '${B}' "$@" -- ${EXTRA_OECMAKE_BUILD}
+       eval ${DESTDIR:+DESTDIR=${DESTDIR} }${CMAKE_VERBOSE} cmake --build '${B}' "$@" -- ${EXTRA_OECMAKE_BUILD}
 }
 
 cmake_do_compile()  {