From f676893f12e6a1fd12358c80e4dbfaa85385b7bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?=
 <stephane.adjemian@univ-lemans.fr>
Date: Fri, 26 Jan 2018 10:23:17 +0100
Subject: [PATCH] Set M_.set_auxiliary_variables.

Fixes the bug introduced in bbdde4626ea1585b30f6c554c669fc429686551b.
---
 preprocessor/ModFile.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/preprocessor/ModFile.cc b/preprocessor/ModFile.cc
index 9d4a2689a..8983b5e6a 100644
--- a/preprocessor/ModFile.cc
+++ b/preprocessor/ModFile.cc
@@ -828,7 +828,8 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool clear_glo
 
   mOutputFile << "M_.orig_eq_nbr = " << mod_file_struct.orig_eq_nbr << ";" << endl
               << "M_.eq_nbr = " << dynamic_model.equation_number() << ";" << endl
-              << "M_.ramsey_eq_nbr = " << mod_file_struct.ramsey_eq_nbr << ";" << endl;
+              << "M_.ramsey_eq_nbr = " << mod_file_struct.ramsey_eq_nbr << ";" << endl
+              << "M_.set_auxiliary_variables = exist(['./' M_.fname '_set_auxiliary_variables.m'], 'file') == 2;" << endl;
 
   if (dynamic_model.equation_number() > 0)
     {
-- 
GitLab