forked from osmocom/wireshark
CMake, .gitlab-ci.yml: try to cut down the output for Fedora RPM builds.
If the FORCE_CMAKE_NINJA_QUIET environment variable is set, have the top-level CMakeLists.txt add the -q flag to the arguments to rpmbuild. That appears to reduce the amount of output. Set that environment varible in the rpm-fedora build.
This commit is contained in:
parent
812c9f5b81
commit
4b22f71f76
|
@ -164,7 +164,7 @@ build:rpm-fedora:
|
|||
script:
|
||||
# Shared GitLab runners limit the log size to 4M, so reduce verbosity. See
|
||||
# https://gitlab.com/gitlab-com/support-forum/issues/2790
|
||||
- unset VERBOSE
|
||||
- export FORCE_CMAKE_NINJA_QUIET=1
|
||||
- cmake3 -GNinja ..
|
||||
- ninja rpm-package
|
||||
needs:
|
||||
|
|
|
@ -3038,6 +3038,38 @@ if(RPMBUILD_EXECUTABLE)
|
|||
if(CMAKE_VERBOSE_MAKEFILE)
|
||||
list(APPEND _rpmbuild_with_args -v)
|
||||
endif()
|
||||
#
|
||||
# This is ugly.
|
||||
#
|
||||
# At least some versions of rpmbuild define the cmake_build
|
||||
# macro to run "cmake --build" with the "--verbose" option,
|
||||
# with no obvious way to easily override that, so, if you
|
||||
# are doing a build with lots of source files, and with
|
||||
# lots of compiler options (for example, a log of -W flags),
|
||||
# you can get a lot of output from rpmbuild.
|
||||
#
|
||||
# Wireshark is a program with lots of source files and
|
||||
# lots of compiler options.
|
||||
#
|
||||
# GitLab's shared builders have a limit of 4MB on logs
|
||||
# from build jobs.
|
||||
#
|
||||
# Wireshark uses the shared builders, and can produce
|
||||
# more than 4MB with the Fedora RPM build; this causes
|
||||
# the builds to fail.
|
||||
#
|
||||
# Adding the -q flag to rpmbuild appears to squelch
|
||||
# most of the rpmbuild output. This is not ideal,
|
||||
# but it might at least let the builds succeed
|
||||
# without failing due to hitting the log file limit.
|
||||
#
|
||||
# We don't add -q by default; if the build has
|
||||
# the FORCE_CMAKE_NINJA_QUIET environment
|
||||
# variable set, it will add it.
|
||||
#
|
||||
if(DEFINED ENV{FORCE_CMAKE_NINJA_QUIET})
|
||||
list(APPEND _rpmbuild_with_args -q)
|
||||
endif()
|
||||
if(CMAKE_GENERATOR STREQUAL "Ninja")
|
||||
list(APPEND _rpmbuild_with_args --with ninja)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue