aboutsummaryrefslogtreecommitdiffstats
path: root/ice40
diff options
context:
space:
mode:
authorMiodrag Milanović <mmicko@gmail.com>2018-08-02 08:24:49 -0700
committerGitHub <noreply@github.com>2018-08-02 08:24:49 -0700
commite46209e734427d6b7ed7b05930c1e4a666de7082 (patch)
treefffab82965d78d43880b2800f5bd3d76a0a4033f /ice40
parent775dba2bee48e2809dad980cc80f8d912bbf3380 (diff)
parent869a804ee13ef9ef91d87ab9c85ea602a88cc082 (diff)
downloadnextpnr-e46209e734427d6b7ed7b05930c1e4a666de7082.tar.gz
nextpnr-e46209e734427d6b7ed7b05930c1e4a666de7082.tar.bz2
nextpnr-e46209e734427d6b7ed7b05930c1e4a666de7082.zip
Merge pull request #11 from mmicko/project_load
preserve command line parameters for project load
Diffstat (limited to 'ice40')
-rw-r--r--ice40/main.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/ice40/main.cc b/ice40/main.cc
index 0724acdf..358b46ba 100644
--- a/ice40/main.cc
+++ b/ice40/main.cc
@@ -168,6 +168,11 @@ int main(int argc, char *argv[])
pt::read_json(filename, root);
log_info("Loading project %s...\n", filename.c_str());
log_break();
+
+ bool isLoadingGui = vm.count("gui") > 0;
+ std::string ascOutput;
+ if (vm.count("asc"))
+ ascOutput = vm["asc"].as<std::string>();
vm.clear();
int version = root.get<int>("project.version");
@@ -199,6 +204,10 @@ int main(int argc, char *argv[])
if (params.count("seed"))
vm.insert(std::make_pair("seed", po::variable_value(params.get<int>("seed"), false)));
}
+ if (!ascOutput.empty())
+ vm.insert(std::make_pair("asc", po::variable_value(ascOutput, false)));
+ if (isLoadingGui)
+ vm.insert(std::make_pair("gui", po::variable_value()));
po::notify(vm);
} catch (...) {
log_error("Error loading project file.\n");