]> SALOME platform Git repositories - tools/yacsgen.git/commitdiff
Salome HOME
#16756 [CEA] Integration request V9_3_BR V9_3_0 V9_3_0rc1 V9_3_0rc2
authorvsr <vsr@opencascade.com>
Thu, 28 Mar 2019 14:50:16 +0000 (17:50 +0300)
committervsr <vsr@opencascade.com>
Thu, 28 Mar 2019 14:50:16 +0000 (17:50 +0300)
- take into account MED renaming to FIELDS

module_generator/gener.py
module_generator/salomemodules.py

index 6b6dc1c47217c4aac4fe5bb5e664a4dabdbb927a..d44234d96fd645f2e7a6dbaa51379a41ca523eae 100644 (file)
@@ -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,
index 931924f5c762f1f9d4726858b46e1bc9cb42c91b..a5077810bd964daad63e922ea43c21ad02e45cdd 100644 (file)
@@ -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}