Salome HOME
initial commit : transfert of salome configuration files from internal git base
[tools/sat_salome.git] / products / patches / yacsgen_7_8_med_medcoupling.patch
1 diff -rupN YACSGEN_ori/module_generator/gener.py YACSGEN_new/module_generator/gener.py\r
2 --- YACSGEN_ori/module_generator/gener.py       2017-01-18 15:12:06.603950115 +0100\r
3 +++ YACSGEN_new/module_generator/gener.py       2017-01-20 11:00:42.912760405 +0100\r
4 @@ -438,8 +438,30 @@ class Generator(object):\r
5      prefix = os.path.abspath(self.module.prefix)\r
6      component_libs = "".join(map(lambda x: x.libraryName()+" ",\r
7                                             module.components))\r
8 -    add_modules = "".join(map(lambda x:cmake_find_module.substitute(module=x),\r
9 -                                       self.used_modules))\r
10 +    add_modules = ""\r
11 +    for x in self.used_modules:\r
12 +      cmake_text = cmake_find_module.substitute(module=x)\r
13 +      if x == "MED":\r
14 +        cmake_text += """\r
15 +\r
16 +#####################################\r
17 +# FIND MEDCOUPLING\r
18 +#####################################\r
19 +SET(MEDCOUPLING_ROOT_DIR $ENV{MEDCOUPLING_ROOT_DIR} CACHE PATH "Path to MEDCOUPLING module")\r
20 +IF(EXISTS ${MEDCOUPLING_ROOT_DIR})\r
21 +  LIST(APPEND CMAKE_MODULE_PATH "${MEDCOUPLING_ROOT_DIR}/cmake_files")\r
22 +  FIND_PACKAGE(SalomeMEDCoupling REQUIRED)\r
23 +  ADD_DEFINITIONS(${MEDCOUPLING_DEFINITIONS})\r
24 +  INCLUDE_DIRECTORIES(${MEDCOUPLING_INCLUDE_DIRS})\r
25 +ELSE(EXISTS ${MEDCOUPLING_ROOT_DIR})\r
26 +  MESSAGE(FATAL_ERROR "We absolutely need MEDCOUPLING module, please define MEDCOUPLING_ROOT_DIR")\r
27 +ENDIF(EXISTS ${MEDCOUPLING_ROOT_DIR})\r
28 +#####################################\r
29 +\r
30 +"""\r
31 +      add_modules = add_modules + cmake_text\r
32 +      pass\r
33 +\r
34      self.makeFiles({"CMakeLists.txt":cmake_root_cpp.substitute(\r
35                                                   module=self.module.name,\r
36                                                   module_min=self.module.name.lower(),\r
37 diff -rupN YACSGEN_ori/module_generator/hxxcompo.py YACSGEN_new/module_generator/hxxcompo.py\r
38 --- YACSGEN_ori/module_generator/hxxcompo.py    2017-01-18 15:12:06.608950285 +0100\r
39 +++ YACSGEN_new/module_generator/hxxcompo.py    2017-01-20 11:00:42.913760396 +0100\r
40 @@ -459,7 +459,8 @@ class HXX2SALOMEComponent(Component):\r
41        gui_xml_fr=hxxgui_xml_fr.substitute(component_name=self.name)\r
42        gui_xml_en=hxxgui_xml_en.substitute(component_name=self.name)\r
43        gui_salomeapp_gen=cppsalomeapp.substitute(module=self.name,\r
44 -                                                lmodule=self.name.lower())\r
45 +                                                lmodule=self.name.lower(),\r
46 +                                                version="V0")\r
47        # for a salome component generated by hxx2salome from a c++ component, \r
48        # the documentation points at the c++ component documentation\r
49        salome_doc_path=os.path.join("%"+self.name+"_ROOT_DIR%","share",\r