Skip to content

Commit

Permalink
Pass build properties through to arduino-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancheek committed Aug 6, 2024
1 parent 94c3145 commit c8209c3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/arduino_cli_cmake_wrapper/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def parse_arguments(arguments: List[str]) -> argparse.Namespace:
nargs="*",
help="List of build properties to supply",
required=False,
default=[],
)
parser.add_argument(
"-p",
Expand Down Expand Up @@ -231,8 +232,13 @@ def main(arguments: List[str] = None):
output_directory = Path(arguments.output)
logging.basicConfig(level=logging.DEBUG) if arguments.debug else logging.basicConfig(level=logging.INFO)

properties = []
for property in arguments.properties:
properties.append("--build-property")
properties.append(property)

# Run the build
test_file_map, stdout, stderr = build(arguments.board, arguments.libraries, [])
test_file_map, stdout, stderr = build(arguments.board, arguments.libraries, properties)

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

0 comments on commit c8209c3

Please sign in to comment.