|
28 | 28 | [-t TARGET] [-p {auto, always, never}] [-c] [--cmake-only] |
29 | 29 | [-n] [-o BUILD_OPT] [-f] |
30 | 30 | [--sysbuild | --no-sysbuild] [--domain DOMAIN] |
| 31 | + [--extra-conf FILE.conf] |
| 32 | + [--extra-dtc-overlay FILE.overlay] |
31 | 33 | [source_dir] -- [cmake_opt [cmake_opt ...]] |
32 | 34 | ''' |
33 | 35 |
|
@@ -150,6 +152,20 @@ def do_add_parser(self, parser_adder): |
150 | 152 | Do not use this option with manually specified |
151 | 153 | -DSHIELD... cmake arguments: the results are |
152 | 154 | undefined''') |
| 155 | + group.add_argument('--extra-conf', dest='extra_conf_files', metavar='EXTRA_CONF_FILE', |
| 156 | + action='append', default=[], |
| 157 | + help='''add the argument to EXTRA_CONF_FILE; may be given |
| 158 | + multiple times. Forces CMake to run again if given. |
| 159 | + Do not use this option with manually specified |
| 160 | + -DEXTRA_CONF_FILE... cmake arguments: the results are |
| 161 | + undefined''') |
| 162 | + group.add_argument('--extra-dtc-overlay', dest='extra_dtc_overlay_files', |
| 163 | + metavar='EXTRA_DTC_OVERLAY_FILE', action='append', default=[], |
| 164 | + help='''add the argument to EXTRA_DTC_OVERLAY_FILE; may be given |
| 165 | + multiple times. Forces CMake to run again if given. |
| 166 | + Do not use this option with manually specified |
| 167 | + -DEXTRA_DTC_OVERLAY_FILE... cmake arguments: the results are |
| 168 | + undefined''') |
153 | 169 |
|
154 | 170 | group = parser.add_mutually_exclusive_group() |
155 | 171 | group.add_argument('--sysbuild', action='store_true', |
@@ -223,7 +239,8 @@ def do_run(self, args, remainder): |
223 | 239 | self._update_cache() |
224 | 240 | if (self.args.cmake or self.args.cmake_opts or |
225 | 241 | self.args.cmake_only or self.args.snippets or |
226 | | - self.args.shields): |
| 242 | + self.args.shields or self.args.extra_conf_files or |
| 243 | + self.args.extra_dtc_overlay_files): |
227 | 244 | self.run_cmake = True |
228 | 245 | else: |
229 | 246 | self.run_cmake = True |
@@ -570,6 +587,13 @@ def _run_cmake(self, board, origin, cmake_opts): |
570 | 587 | cmake_opts.append(f'-DSNIPPET={";".join(self.args.snippets)}') |
571 | 588 | if self.args.shields: |
572 | 589 | cmake_opts.append(f'-DSHIELD={";".join(self.args.shields)}') |
| 590 | + if self.args.extra_conf_files: |
| 591 | + cmake_opts.append(f'-DEXTRA_CONF_FILE={";".join(self.args.extra_conf_files)}') |
| 592 | + if self.args.extra_dtc_overlay_files: |
| 593 | + cmake_opts.append( |
| 594 | + f'-DEXTRA_DTC_OVERLAY_FILE=' |
| 595 | + f'{";".join(self.args.extra_dtc_overlay_files)}' |
| 596 | + ) |
573 | 597 |
|
574 | 598 | user_args = config_get('cmake-args', None) |
575 | 599 | if user_args: |
|
0 commit comments