X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=salome_adm%2Fcmake_files%2Fdeprecated%2Fam2cmake.py;h=c506dbe738520e27f7e92b4ea2112e500f5cd402;hb=ccfad0b25a9c4c79842a515f7288a4600aec9b39;hp=dcb33a0202fbf47f278b15cb4075a47d52e38500;hpb=ae49be2e33c151ab57b901b5358338869bd03d10;p=modules%2Fkernel.git diff --git a/salome_adm/cmake_files/deprecated/am2cmake.py b/salome_adm/cmake_files/deprecated/am2cmake.py index dcb33a020..c506dbe73 100644 --- a/salome_adm/cmake_files/deprecated/am2cmake.py +++ b/salome_adm/cmake_files/deprecated/am2cmake.py @@ -33,7 +33,7 @@ p_multiline = re.compile(r""" p_dollar = re.compile(r""" \$\( # a $ then a ( (?P # open the group val -[^)]* # the group contain 0 or more non ) characters +[^()]* # the group contain 0 or more non ) characters ) # close the group \) # a ) at the end """, re.VERBOSE) @@ -550,6 +550,7 @@ class CMakeFile(object): INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindSWIG.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindDOXYGEN.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSalomeLIBBATCH.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindKERNEL.cmake) """) @@ -594,9 +595,11 @@ class CMakeFile(object): newlines.append(""" SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR}) SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR}) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindQWT.cmake) INCLUDE(${GEOM_ROOT_DIR}/adm_local/cmake_files/FindGEOM.cmake) - INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMEDFILE.cmake) - INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake) + + INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindSalomeMED.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSPHINX.cmake) """) pass @@ -660,6 +663,10 @@ class CMakeFile(object): INCLUDE(${CMAKE_SOURCE_DIR}/adm/cmake/FindEXPAT.cmake) INCLUDE(${CMAKE_SOURCE_DIR}/adm/cmake/FindGRAPHVIZ.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSPHINX.cmake) + + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_SECURE_SCL=0) + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_SECURE_SCL_THROWS=0) + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_HAS_ITERATOR_DEBUGGING=0) # To avoid runtime error during checking iterators """) pass if self.module == "jobmanager": @@ -809,10 +816,10 @@ class CMakeFile(object): pass # -- newlines.append(""" - set(VERSION 7.1.0) - set(SHORT_VERSION 7.1) - set(XVERSION 0x070100) - set(VERSION_DEV 1) + set(VERSION 7.3.0) + set(SHORT_VERSION 7.3) + set(XVERSION 0x070300) + set(VERSION_DEV 0) """) pass # -- @@ -980,7 +987,13 @@ class CMakeFile(object): # Replace the $(TOTO) by ${TOTO} # Replace the @TOTO@ by ${TOTO} # -- - line = p_dollar.sub(r"${\1}", line) + # VSR 15.04.2013 - process nesting substitutions properly, e.g. $(aaa$(bbb)) + #line = p_dollar.sub(r"${\1}", line) + m_dollar = p_dollar.search(line) + while m_dollar: + line = p_dollar.sub(r"${\1}", line) + m_dollar = p_dollar.search(line) + pass line = p_arobas.sub(r"${\1}", line) # -- @@ -1126,7 +1139,7 @@ class CMakeFile(object): ) ''') self.files.append("static/header.html.in") - elif self.root[-len(mod):] == upmod and operator.contains(self.root, 'doc') or mod in ['kernel', 'gui', 'geom', 'med', 'smesh', 'visu', 'blsurfplugin'] and self.root[-len('tui'):] == 'tui' or operator.contains(self.root, 'doc') and mod in ['pyhello']: + elif self.root[-len(mod):] == upmod and operator.contains(self.root, 'doc') or mod in ['kernel', 'gui', 'geom', 'med', 'smesh', 'visu', 'blsurfplugin'] and self.root[-len('tui'):] == 'tui' or operator.contains(self.root, 'doc') and mod in ['pyhello', 'yacs']: newlines.append(r''' SET(top_builddir ${CMAKE_BINARY_DIR} @@ -1147,7 +1160,10 @@ class CMakeFile(object): ${datadir}/doc/salome ) ''') - self.files.append("static/header.html.in") + if mod in ['yacs']: + self.files.append("sources/header.html.in") + else: + self.files.append("static/header.html.in") if mod in ['geom', 'smesh', 'visu','netgenplugin','blsurfplugin','hexoticplugin','ghs3dplugin',"ghs3dprlplugin"] and self.root[-len(mod):] == upmod: self.files.append("static/header_py.html.in") @@ -1158,13 +1174,6 @@ class CMakeFile(object): self.files.append("resources/SalomeApp.xml.in") pass pass - from os import path - if operator.contains(self.root, 'YACS_SRC'+path.sep+'doc'): - newlines.append(r''' - SET(srcdir - ${CMAKE_CURRENT_SOURCE_DIR} - ) - ''') if self.module == "jobmanager": key = "salomegui" @@ -1174,8 +1183,6 @@ class CMakeFile(object): pass for f in self.files: if f[-3:] == ".in": - if self.module == 'yacs' and f == "Doxyfile.in": - continue if f == "sstream.in": continue if f in ["runContainer.in", "stopContainer.in"]: @@ -1306,7 +1313,7 @@ class CMakeFile(object): # -- upmod = self.module.upper() - if mod in ['kernel', 'gui', 'med', 'smesh', 'visu', 'blsurfplugin'] and self.root[-len('tui'):] == 'tui': + if ( mod in ['kernel', 'gui', 'med', 'smesh', 'visu', 'blsurfplugin'] and self.root[-len('tui'):] == 'tui' ) or ( mod in ['yacs'] and self.root[-len('doc'):] == 'doc' ): if mod == 'kernel': tmp = """\tADD_CUSTOM_TARGET(dev_docs ${DOXYGEN_EXECUTABLE} -u COMMAND ${DOXYGEN_EXECUTABLE} @@ -1320,7 +1327,10 @@ class CMakeFile(object): tmp1= """\n COMMAND ${PYTHON_EXECUTABLE} -c "from shutil import copy; copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/smeshscreen.png''', r'''%s''')" """%(doc_tui_destination) else: tmp1="" - doc_source = "${CMAKE_CURRENT_BINARY_DIR}/%s"%(upmod) + if mod == 'yacs': + doc_source = "${CMAKE_CURRENT_BINARY_DIR}/htmldev" + else: + doc_source = "${CMAKE_CURRENT_BINARY_DIR}/%s"%(upmod) inst_head_command="" inst_head_command = "; shutil.copy(r'''%s''', r'''%s''')"%(head_source, doc_tui_destination) newlines.append(tmp + """ @@ -1831,6 +1841,7 @@ class CMakeFile(object): ''') # -- newlines.append(r''' + STRING(REPLACE "-module" "" ${amname}_LDFLAGS "${${amname}_LDFLAGS}") SET(libs ${PLATFORM_LIBADD} ${PLATFORM_LDFLAGS} ${LDADD} ${${amname}_LIBADD} ${${amname}_LDADD} ${${amname}_LDFLAGS}) FOREACH(lib SALOMEBasics SalomeBatch) IF(name STREQUAL lib)