From 520b9c30f8161a3161e2f4cd8857623a6ef35735 Mon Sep 17 00:00:00 2001 From: Nathan Cheek Date: Tue, 6 Aug 2024 13:28:31 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Pass=20build=20properties=20thro?= =?UTF-8?q?ugh=20to=20arduino-cli?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/arduino_cli_cmake_wrapper/cli.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/arduino_cli_cmake_wrapper/cli.py b/src/arduino_cli_cmake_wrapper/cli.py index 938b460..14bc2a1 100644 --- a/src/arduino_cli_cmake_wrapper/cli.py +++ b/src/arduino_cli_cmake_wrapper/cli.py @@ -107,6 +107,7 @@ def parse_arguments(arguments: Optional[List[str]]) -> argparse.Namespace: nargs='*', help='List of build properties to supply', required=False, + default=[], ) parser.add_argument( '-p', @@ -267,8 +268,13 @@ def main(arguments: Optional[List[str]] = None): level=logging.INFO ) + properties = [] + for prop in args.properties: + properties.append('--build-property') + properties.append(prop) + # Run the build - test_file_map, stdout, stderr = build(args.board, args.libraries, []) + test_file_map, stdout, stderr = build(args.board, args.libraries, properties) # Parse the output into stages stages = parse(stdout)