# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
p_dollar = re.compile(r"""
\$\( # a $ then a (
(?P<val> # 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)
# --
content = content.replace("../NETGEN/libNETGEN.la", "${NETGEN_LIBS}")
+ # --
+ # Compatibility VTK 6.0
+ # --
+ content = content.replace("VTK_LIBS", "VTK_LIBRARIES")
+
# --
cas_list = [
"BinLPlugin",
"vtkGraphicsPythonD",
"vtkImagingPythonD",
"vtkPythonCore",
+ "vtkIOImage",
]
kernel_list = [
"CalciumC",
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)
""")
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
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":
pass
# --
newlines.append("""
- set(VERSION 7.0.0)
- set(SHORT_VERSION 7.0)
- set(XVERSION 0x070000)
- set(VERSION_DEV 1)
+ set(VERSION 7.3.0)
+ set(SHORT_VERSION 7.3)
+ set(XVERSION 0x070300)
+ set(VERSION_DEV 0)
""")
pass
# --
# 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)
# --
)
''')
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}
${datadir}/doc/salome
)
''')
- if mod not in ['blsurfplugin']:
+ 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")
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"
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"]:
from os import path
if mod in ['geom', 'smesh', 'visu', 'netgenplugin','blsurfplugin','hexoticplugin','ghs3dplugin','ghs3dprlplugin','pyhello'] and self.root[-len(mod):] == upmod and operator.contains(self.root, 'doc') or mod in ['pyhello'] and operator.contains(self.root, 'doc'):
ign = r"""'*usr_docs*', '*CMakeFiles*', '*.cmake', 'doxyfile*', '*.vcproj', 'static', 'Makefile*'"""
- if mod in ['geom', 'smesh']:
+ if mod in ['geom']:
if mod == 'geom':
- tmp = 'geompy'
+ tmp = 'geomBuilder'
input = "COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_tui \n\t\t"
- else:
- tmp = 'smesh'
- input = ''
newlines.append(r"""
IF(WINDOWS)
STRING(REPLACE "/" "\\" f "%s")
ELSE(WINDOWS)
SET(f "%s")
ENDIF(WINDOWS)
- ADD_CUSTOM_TARGET(usr_docs ${PYTHON_EXECUTABLE} ${f} %s.py ${CMAKE_SOURCE_DIR}/src/%s_SWIG/%sDC.py %s
+ ADD_CUSTOM_TARGET(usr_docs ${PYTHON_EXECUTABLE} ${f} ${CMAKE_SOURCE_DIR}/src/%s_SWIG/%s.py
%sCOMMAND ${DOXYGEN_EXECUTABLE} doxyfile_py
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile
COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.remove(r'''%s.py''')"
COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}''', r'''%s''', ignore=shutil.ignore_patterns(%s)); shutil.copy(r'''%s''', r'''%s''')"
VERBATIM
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- )"""%(prepare_generating_doc_src, prepare_generating_doc_src, tmp, upmod, tmp, tmp, input, tmp, doc_gui_destination, doc_gui_destination, ign, head_source, doc_gui_destination))
+ )"""%(prepare_generating_doc_src, prepare_generating_doc_src, upmod, tmp, input, tmp, doc_gui_destination, doc_gui_destination, ign, head_source, doc_gui_destination))
newlines.append(r"""ADD_DEPENDENCIES(usr_docs html_docs)""")
else:
config_f = ""
+ extra_doc_dir = ""
if mod in ['netgenplugin','blsurfplugin','hexoticplugin','ghs3dplugin', "ghs3dprlplugin"] :
config_f = "${DOXYGEN_EXECUTABLE} doxyfile_py"
+ extra_doc_dir = "%spy_doc"%(mod)
elif mod not in ['pyhello']:
config_f = "${DOXYGEN_EXECUTABLE} doxyfile_idl"
+ if mod == 'visu':
+ extra_doc_dir = "%sgen_doc"%(mod)
+ inst_head_command = ""
+ if extra_doc_dir != "":
+ inst_head_command = "; shutil.copy(r'''%s''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/%s/%s''')"%(head_source, upmod, extra_doc_dir)
newlines.append("""\t ADD_CUSTOM_TARGET(usr_docs %s
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile
- COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''',True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}''',r'''%s''', ignore=shutil.ignore_patterns(%s)); shutil.copy(r'''%s''',r'''%s''')"
+ COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''',True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}''',r'''%s''', ignore=shutil.ignore_patterns(%s)); shutil.copy(r'''%s''',r'''%s''')%s"
VERBATIM
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- )"""%(config_f, doc_gui_destination, doc_gui_destination, ign, head_source, doc_gui_destination))
+ )"""%(config_f, doc_gui_destination, doc_gui_destination, ign, head_source, doc_gui_destination, inst_head_command))
elif mod in ['yacs', 'jobmanager'] and operator.contains(self.root, upmod + '_SRC'+path.sep+'doc'):
from sys import platform
params = '';
# --
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}
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=""
- if mod not in ['blsurfplugin']:
- inst_head_command = "; shutil.copy(r'''%s''', r'''%s''')"%(head_source, doc_tui_destination)
+ inst_head_command = "; shutil.copy(r'''%s''', r'''%s''')"%(head_source, doc_tui_destination)
newlines.append(tmp + """
COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''', True); shutil.copytree(r'''%s''', r'''%s''')%s" """%(doc_tui_destination, doc_source, doc_tui_destination, inst_head_command) + tmp1 + """
VERBATIM
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)""")
if mod == 'geom' and self.root[-len('tui'):] == 'tui':
- tmp = 'geompy'
+ tmp = 'geomBuilder'
doc_source = "${CMAKE_CURRENT_BINARY_DIR}/%s"%(upmod)
newlines.append(r"""
IF(WINDOWS)
ELSE(WINDOWS)
SET(f "%s")
ENDIF(WINDOWS)
- ADD_CUSTOM_TARGET(dev_docs ${PYTHON_EXECUTABLE} ${f} ${CMAKE_BINARY_DIR}/src/%s_SWIG/%s.py ${CMAKE_SOURCE_DIR}/src/%s_SWIG/%sDC.py %s
+ ADD_CUSTOM_TARGET(dev_docs ${PYTHON_EXECUTABLE} ${f} ${CMAKE_SOURCE_DIR}/src/%s_SWIG/%s.py
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile
- COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.remove(r'''${CMAKE_BINARY_DIR}/src/%s_SWIG/%s.py''')"
+ COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.remove(r'''${CMAKE_CURRENT_BINARY_DIR}/%s.py''')"
COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''', True); shutil.copytree(r'''%s''', r'''%s'''); shutil.copy(r'''%s''', r'''%s'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/geomscreen.png''', r'''%s''')"
VERBATIM
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- )"""%(prepare_generating_doc_src, prepare_generating_doc_src, upmod, tmp, upmod, tmp, tmp, upmod, tmp, doc_tui_destination, doc_source, doc_tui_destination, head_source, doc_tui_destination, doc_tui_destination))
+ )"""%(prepare_generating_doc_src, prepare_generating_doc_src, upmod, tmp, tmp, doc_tui_destination, doc_source, doc_tui_destination, head_source, doc_tui_destination, doc_tui_destination))
# --
# convert the SUBDIRS in cmake grammar
"sharedpkgpython_PYTHON" : "${salomepythondir}/shared_modules",
"salomepypkg_PYTHON" : "${salomepypkgdir}",
"mypkgpython_PYTHON" : "${mypkgpythondir}",
+ "stdpkgpython_PYTHON" : "${stdpkgpythondir}",
"nodist_mypkgpython_PYTHON" : "${mypkgpythondir}",
}
if self.module == "jobmanager":
''')
# --
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)