Skip to content

Commit

Permalink
✨ Add --board-options argument pass-through
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancheek authored and SterlingPeet committed Aug 14, 2024
1 parent 520b9c3 commit 3d61919
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/arduino_cli_cmake_wrapper/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ def parse_arguments(arguments: Optional[List[str]]) -> argparse.Namespace:
required=False,
default=[],
)
parser.add_argument(
'--board-options',
type=str,
nargs='*',
help='List of board options to supply',
required=False,
default=[],
)
parser.add_argument(
'-p',
'--post-link',
Expand Down Expand Up @@ -268,13 +276,16 @@ def main(arguments: Optional[List[str]] = None):
level=logging.INFO
)

properties = []
for prop in args.properties:
properties.append('--build-property')
properties.append(prop)
pass_args = []
for property in args.properties:
pass_args.append('--build-property')
pass_args.append(property)
for board_option in args.board_options:
pass_args.append('--board-options')
pass_args.append(board_option)

# Run the build
test_file_map, stdout, stderr = build(args.board, args.libraries, properties)
test_file_map, stdout, stderr = build(args.board, args.libraries, pass_args)

# Parse the output into stages
stages = parse(stdout)
Expand Down

0 comments on commit 3d61919

Please sign in to comment.