Lines Matching +full:class +full:- +full:rev

3 # SPDX-License-Identifier: Apache-2.0
22 _ARG_SEPARATOR = '--'
30 west build [-h] [-b BOARD[@REV]]] [-d BUILD_DIR]
31 [-S SNIPPET] [--shield SHIELD]
32 [-t TARGET] [-p {auto, always, never}] [-c] [--cmake-only]
33 [-n] [-o BUILD_OPT] [-f]
34 [--sysbuild | --no-sysbuild] [--domain DOMAIN]
35 [--extra-conf FILE.conf]
36 [--extra-dtc-overlay FILE.overlay]
37 [source_dir] -- [cmake_opt [cmake_opt ...]]
47 cmake_opt extra options to pass to cmake; implies -c
48 (these must come after "--" as shown above)
52 A "pristine" build directory is empty. The -p option controls
54 is done. A bare '--pristine' with no value is the same as
55 --pristine=always. Setting --pristine=auto uses heuristics to
64 class AlwaysIfMissing(argparse.Action):
69 class Build(Forceable):
74 # Keep this in sync with the string in west-commands.yml.
99 self.inf('-- west build: ' + msg, colorize=True)
109 # Remember to update west-completion.bash if you add or remove
112 parser.add_argument('-b', '--board',
115 parser.add_argument('-s', '--source-dir', help=argparse.SUPPRESS)
116 parser.add_argument('-d', '--build-dir',
121 group.add_argument('-c', '--cmake', action='store_true',
123 group.add_argument('--cmake-only', action='store_true',
124 help="just run cmake; don't build (implies -c)")
125 group.add_argument('--domain', action='append',
128 group.add_argument('-t', '--target',
130 (try "-t usage")''')
131 group.add_argument('-T', '--test-item',
139 group.add_argument('-o', '--build-opt', default=[], action='append',
142 group.add_argument('-n', '--just-print', '--dry-run', '--recon',
145 group.add_argument('-S', '--snippet', dest='snippets', metavar='SNIPPET',
150 -DSNIPPET... cmake arguments: the results are
152 group.add_argument('--shield', dest='shields', metavar='SHIELD',
157 -DSHIELD... cmake arguments: the results are
159 group.add_argument('--extra-conf', dest='extra_conf_files', metavar='EXTRA_CONF_FILE',
164 -DEXTRA_CONF_FILE... cmake arguments: the results are
166 group.add_argument('--extra-dtc-overlay', dest='extra_dtc_overlay_files',
171 -DEXTRA_DTC_OVERLAY_FILE... cmake arguments: the results are
175 group.add_argument('--sysbuild', action='store_true',
177 group.add_argument('--no-sysbuild', action='store_true',
183 group.add_argument('-p', '--pristine', choices=['auto', 'always',
194 # Store legacy -s option locally
368 if colon != -1:
372 'conditional config "{}". Add "-D{}" '
376 args.append("-D{}".format(arg.replace('"', '\"')))
381 args = ["-D{}".format(a.replace('"', '\"')) for a in config_options]
382 … args.extend(["-D{}".format(arg.replace('"', '')) for arg in non_config_options])
418 args_expanded = ["-D{}".format(a.replace('"', '')) for a in args]
455 'your build.dir-fmt configuration option')
498 'use --build-dir {} to specify a build directory'.
505 'did you mean --build-dir {srcrel} instead?'.
511 'want to build? (Use -s SOURCE_DIR to specify '
545 # consistent with --source-dir.
552 'directory "{}" was specified; please clean it, use --pristine, '
553 'or use --build-dir to set another build directory'.
557 self.run_cmake = True # If they insist, we need to re-run cmake.
571 '(provide --board, set default with '
575 # Check consistency between cached board and --board.
581 '(Clean the directory, use --pristine, or use --build-dir to '
591 # Tricky corner-case: The user has not specified a build folder but
593 # invalidated, reset to CWD and re-run the basic tests.
603 '--board=<your-board>.')
613 cmake_opts = ['-DBOARD={}'.format(board)]
619 cmake_opts.append(f'-DSNIPPET={";".join(self.args.snippets)}')
621 cmake_opts.append(f'-DSHIELD={";".join(self.args.shields)}')
623 cmake_opts.append(f'-DEXTRA_CONF_FILE={";".join(self.args.extra_conf_files)}')
626 f'-DEXTRA_DTC_OVERLAY_FILE='
630 user_args = config_get('cmake-args', None)
636 cmake_opts.extend(['-S{}'.format(SYSBUILD_PROJ_DIR),
637 '-DAPP_DIR:PATH={}'.format(self.source_dir)])
640 cmake_opts.extend(['-S{}'.format(self.source_dir)])
643 # -S and -B options (officially introduced in CMake 3.13.0).
647 # west build -- -DOVERLAY_CONFIG=relative-path.conf
648 final_cmake_args = ['-DWEST_PYTHON={}'.format(pathlib.Path(sys.executable).as_posix()),
649 '-B{}'.format(self.build_dir),
650 '-G{}'.format(config_get('generator',
667 cmake_args = [f'-DBINARY_DIR={app_bin_dir}',
668 f'-DSOURCE_DIR={app_src_dir}',
669 '-P', cache['ZEPHYR_BASE'] + '/cmake/pristine.cmake']
677 extra_args = ['--target', target] if target else []
679 extra_args.append('--')
705 # drop this nonsense and just run "cmake --build BUILD -v".
712 # Substring matching is for things like "Eclipse CDT4 - Ninja".
715 extra_args.append('--')
716 extra_args.append('-v')
719 extra_args.append('--')