diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-01-08 08:24:45 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-01-11 12:52:31 +0100 |
commit | bae1da35824dfd7ff766fc90180104cb1a11f59a (patch) | |
tree | de5881601aa665fc8dcd838b874c2c12f75a5467 /build_scripts | |
parent | e664f7e525129c2ac356edecb2dd1255d93ad00a (diff) |
qp5_tool: Add verbose option
Add an option that cause the --quiet option to be removed
from the build arguments specified in the configuration file.
This removes the need to change the configuration file
to temporarily enable cmake messages for debugging cmake issues.
Change-Id: Ib57fa95d730e2c984aea36234a5cdc8e8fb88703
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'build_scripts')
-rw-r--r-- | build_scripts/qp5_tool.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/build_scripts/qp5_tool.py b/build_scripts/qp5_tool.py index d1ab2525d..c45bae350 100644 --- a/build_scripts/qp5_tool.py +++ b/build_scripts/qp5_tool.py @@ -109,6 +109,7 @@ DEFAULT_CONFIG_FILE = f"Modules={DEFAULT_MODULES}\n" build_mode = BuildMode.NONE opt_dry_run = False +opt_verbose = False def which(needle): @@ -302,9 +303,12 @@ def build(target): acceleration = read_acceleration_config() if not IS_WINDOWS and acceleration == Acceleration.INCREDIBUILD: arguments.append(INCREDIBUILD_CONSOLE) - arguments.append('--avoid') # caching, v0.96.74 + arguments.appendh('--avoid') # caching, v0.96.74 arguments.extend([read_config_python_binary(), 'setup.py', target]) - arguments.extend(read_config_build_arguments()) + build_arguments = read_config_build_arguments() + if opt_verbose and '--quiet' in build_arguments: + build_arguments.remove('--quiet') + arguments.extend(build_arguments) generator = read_config(GENERATOR_KEY) if generator == 'Ninja': arguments.extend(['--make-spec', 'ninja']) @@ -363,6 +367,8 @@ def create_argument_parser(desc): parser.add_argument('--test', '-t', action='store_true', help='Run tests') parser.add_argument('--version', '-v', action='version', version='%(prog)s 1.0') + parser.add_argument('--verbose', '-V', action='store_true', + help='Turn off --quiet specified in build arguments') return parser @@ -376,6 +382,7 @@ if __name__ == '__main__': argument_parser = create_argument_parser(DESC.replace('%CONFIGFILE%', config_file)) options = argument_parser.parse_args() opt_dry_run = options.dry_run + opt_verbose = options.verbose if options.edit: sys.exit(edit_config_file()) |