5252# ── Main ───────────────────────────────────────────────────────────────────────
5353
5454"""
55- main(; library, version, filter, omc_exe, results_root, ref_root) → results
55+ main(; library, version, filter, omc_exe, results_root, ref_root, bm_options ) → results
5656
5757Run the full pipeline over all experiment models in `library` `version`.
5858Discovers models via OMC, runs `test_model` for each, then writes the HTML
@@ -65,6 +65,7 @@ function main(;
6565 omc_exe :: String = get (ENV , " OMC_EXE" , " omc" ),
6666 results_root :: String = " " ,
6767 ref_root :: String = get (ENV , " MAPLIB_REF" , " " ),
68+ bm_options :: String = get (ENV , " BM_OPTIONS" , " scalarize,moveBindings" ),
6869)
6970 t0 = time ()
7071
@@ -78,13 +79,14 @@ function main(;
7879 @info " Starting OMC session ($(omc_exe) )..."
7980 omc = OMJulia. OMCSession (omc_exe)
8081
82+ omc_options = " --baseModelica --frontendInline --baseModelicaOptions=$(bm_options) -d=evaluateAllParameters"
8183 omc_version = " unknown"
8284 results = ModelResult[]
8385 try
8486 omc_version = sendExpression (omc, " getVersion()" )
8587 @info " OMC version: $omc_version "
8688
87- ok = sendExpression (omc, """ setCommandLineOptions("--baseModelica --frontendInline --baseModelicaOptions=scalarize -d=evaluateAllParameters ")""" )
89+ ok = sendExpression (omc, """ setCommandLineOptions("$(omc_options) ")""" )
8890 ok || @warn " Failed to set Base Modelica options: $(sendExpression (omc, " getErrorString()" )) "
8991
9092 ok = sendExpression (omc, """ loadModel($library , {"$version "})""" )
@@ -145,6 +147,7 @@ function main(;
145147 version,
146148 something (filter, " " ),
147149 omc_exe,
150+ omc_options,
148151 results_root,
149152 ref_root,
150153 omc_version,
0 commit comments