Skip to content
Snippets Groups Projects
Verified Commit 7e1563fd authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Allow 'use_dll' option to be specified on the command line

Ref. Enteprise/dynare#4
parent 0f268ce7
Branches
No related tags found
No related merge requests found
......@@ -57,7 +57,7 @@ usage()
<< " [-D<variable>[=<value>]] [-I/path] [nostrict] [stochastic] [fast] [minimal_workspace] [compute_xrefs] [output=dynamic|first|second|third] [language=matlab|julia]"
<< " [params_derivs_order=0|1|2] [transform_unary_ops] [exclude_eqs=<equation_tag_list_or_file>] [include_eqs=<equation_tag_list_or_file>]"
<< " [json=parse|check|transform|compute] [jsonstdout] [onlyjson] [jsonderivsimple] [nopathchange] [nopreprocessoroutput]"
<< " [mexext=<extension>] [matlabroot=<path>] [onlymodel] [notime]"
<< " [mexext=<extension>] [matlabroot=<path>] [onlymodel] [notime] [use_dll]"
<< endl;
exit(EXIT_FAILURE);
}
......@@ -166,6 +166,7 @@ main(int argc, char **argv)
dynareroot = dynareroot.parent_path();
dynareroot = dynareroot / ".." / "..";
bool onlymodel = false;
bool use_dll = false;
for (auto s : options)
{
......@@ -400,6 +401,8 @@ main(int argc, char **argv)
onlymodel = true;
else if (s == "gui")
gui = true;
else if (s == "use_dll")
use_dll = true;
else
{
cerr << "Unknown option: " << s << endl;
......@@ -454,6 +457,11 @@ main(int argc, char **argv)
// Do parsing and construct internal representation of mod file
unique_ptr<ModFile> mod_file = p.parse(macro_output, debug);
// Handle use_dll option specified on the command line
if (use_dll)
mod_file->use_dll = true;
if (json == JsonOutputPointType::parsing)
mod_file->writeJsonOutput(basename, json, json_output_mode, onlyjson);
......
......@@ -85,7 +85,8 @@ public:
//! Is the model stored in bytecode format (bytecode=true) or in a M-file (bytecode=false)
bool bytecode{false};
//! Is the model stored in a MEX file ? (option "use_dll" of "model")
/*! Is the model stored in a MEX file ? (option “use_dll”, either in the
“model” block or on the preprocessor command line) */
bool use_dll{false};
//! Is the static model have to computed (no_static=false) or not (no_static=true). Option of 'model'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment