From 0f6ebd638402ca1ac2a202621e9db63c2cb5eb5f Mon Sep 17 00:00:00 2001 From: David Shah Date: Thu, 7 Jun 2018 09:01:30 +0200 Subject: [PATCH] Allow specifying multiple Python files on the command line Signed-off-by: David Shah --- ice40/main.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ice40/main.cc b/ice40/main.cc index 3d3312c4..5d00fcc8 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -53,7 +53,7 @@ int main(int argc, char *argv[]) options.add_options()("test","just a check"); options.add_options()("gui","start gui"); options.add_options()("svg","dump SVG file"); - options.add_options()("file", po::value(), "python file to execute"); + options.add_options()("file", po::value>(), "python file to execute"); options.add_options()("json", po::value(), "JSON design file to ingest"); options.add_options()("version,v","show version"); options.add_options()("lp384","set device type to iCE40LP384"); @@ -207,8 +207,9 @@ int main(int argc, char *argv[]) if (vm.count("file")) { - std::string filename = vm["file"].as(); - execute_python_file(filename.c_str()); + std::vector files = vm["file"].as>(); + for(auto filename : files) + execute_python_file(filename.c_str()); } if (vm.count("gui"))