From: vsr Date: Thu, 28 Mar 2019 14:50:16 +0000 (+0300) Subject: #16756 [CEA] Integration request X-Git-Tag: V9_3_0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f0c692f16680cfe6aa2aa9d3535f6fbdecb48104;p=tools%2Fyacsgen.git #16756 [CEA] Integration request - take into account MED renaming to FIELDS --- diff --git a/module_generator/gener.py b/module_generator/gener.py index 6b6dc1c..d44234d 100644 --- a/module_generator/gener.py +++ b/module_generator/gener.py @@ -485,8 +485,8 @@ class Generator(object): component_libs = "".join([x.libraryName()+" " for x in module.components]) add_modules = "" for x in self.used_modules: - cmake_text = cmake_find_module.substitute(module=x) if x == "MED": + cmake_text = cmake_find_module.substitute(module="FIELDS") cmake_text = cmake_text + """ ##################################### # FIND MEDCOUPLING @@ -503,6 +503,9 @@ ENDIF(EXISTS ${MEDCOUPLING_ROOT_DIR}) ##################################### """ + else: + cmake_text = cmake_find_module.substitute(module=x) + add_modules = add_modules + cmake_text pass @@ -538,9 +541,18 @@ ENDIF(EXISTS ${MEDCOUPLING_ROOT_DIR}) # other_sks=other_sks+os.path.splitext(os.path.basename(fidl))[0]+"SK.cc " include_template=Template("$${${module}_ROOT_DIR}/idl/salome") - opt_inc="".join([include_template.substitute(module=x)+"\n " for x in self.used_modules]) link_template=Template("$${${module}_SalomeIDL${module}}") - opt_link="".join([link_template.substitute(module=x)+"\n " for x in self.used_modules]) + opt_inc="" + opt_link="" + for x in self.used_modules: + if x=="MED": + # here template cannot be used as we mix FIELDS and MED + opt_inc+="${FIELDS_ROOT_DIR}/idl/salome\n " + opt_link+="${FIELDS_SalomeIDLMED}\n " + else: + opt_inc+=include_template.substitute(module=x)+"\n " + opt_link+=link_template.substitute(module=x)+"\n " + idlfiles={"CMakeLists.txt":cmake_idl.substitute(module=module.name, extra_idl=other_idls, diff --git a/module_generator/salomemodules.py b/module_generator/salomemodules.py index 931924f..a507781 100644 --- a/module_generator/salomemodules.py +++ b/module_generator/salomemodules.py @@ -48,10 +48,10 @@ idldefs=""" #include "MEDCouplingCorbaServant.idl" """ -linklibs=""" ${MED_SalomeIDLMED} - ${MED_med} - ${MED_medcouplingcorba} - ${MED_medcouplingclient} +linklibs=""" + ${FIELDS_SalomeIDLMED} + ${FIELDS_medcouplingcorba} + ${FIELDS_medcouplingclient} """ salome_modules["MED"]={"idldefs" : idldefs, "linklibs" : linklibs}