Commit 46727e14 authored by Maxime Perrotin's avatar Maxime Perrotin

Fix regression in feature_buster

due to incompatibility with newer versions of opengeode
parent 5f67040f
......@@ -426,7 +426,8 @@ void GW_Ada_Backend(FV * fv)
if (fv->system_ast->context->onlycv)
return;
if (ada == fv->language || qgenada == fv->language) {
if ((ada == fv->language && sdl != fv->original_language)
|| qgenada == fv->language) {
/* Create the files and add headers */
Init_Ada_GW_Backend(fv);
......
......@@ -164,8 +164,16 @@ void Set_Property (char *name, char *val)
void Set_Language_To_SDL()
{
if (NULL != fv)
if (NULL != fv) {
// During the build the language will be changed to Ada
// so we keep a trace of the original language set in the
// model, if any backend needs it.
// The skeleton generation needs it to avoid overwriting the
// .ads file generated by opengeode.
fv->language = sdl;
fv->original_language = sdl;
}
}
void Set_Language_To_CPP()
......@@ -241,8 +249,10 @@ void Set_Language_To_Scade()
void Set_Language_To_Ada()
{
if (NULL != fv)
if (NULL != fv) {
fv->language = ada;
fv->original_language = ada;
}
}
void Set_Language_To_GUI()
......
......@@ -244,6 +244,7 @@ typedef struct t_fv {
struct t_system *system_ast;
Nature runtime_nature;
Language language;
Language original_language; // keep track of SDL
char *zipfile;
Interface_list *interfaces;
struct t_process *process;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment