# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
+INCLUDE(CMakeDependentOption)
+
PROJECT(SalomeKERNEL C CXX)
# Ensure a proper linker behavior:
# User options
# ============
-OPTION(SALOME_USE_MPI "Use MPI containers" OFF)
+CMAKE_DEPENDENT_OPTION(SALOME_USE_MPI "Use MPI containers" OFF
+ "NOT SALOME_PACO_PARALLEL" ON)
OPTION(SALOME_BUILD_DOC "Generate SALOME KERNEL documentation" ON)
OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON)
# Advanced:
OPTION(SALOME_LIGHT_ONLY "Build SALOME Light only (no CORBA)" OFF)
OPTION(SALOME_USE_LIBBATCH "Use LibBatch in KERNEL" ON)
-OPTION(SALOME_PACO_PARALLEL "Build with PACO in parallel" OFF)
+OPTION(SALOME_PACO_PARALLEL "Build with PACO (implies SALOME_USE_MPI)" OFF)
OPTION(SALOME_LAUNCHER_ONLY "Build only the Launcher part" OFF)
MARK_AS_ADVANCED(SALOME_LIGHT_ONLY SALOME_USE_LIBBATCH SALOME_PACO_PARALLEL SALOME_LAUNCHER_ONLY)
IF(SALOME_USE_MPI)
FIND_PACKAGE(SalomeMPI REQUIRED)
ENDIF()
+IF(SALOME_PACO_PARALLEL)
+ FIND_PACKAGE(SalomePaco REQUIRED)
+ENDIF()
IF(SALOME_BUILD_TESTS)
ENABLE_TESTING()
FIND_PACKAGE(SalomeCppUnit REQUIRED)
export PYTHONPATH=${DOCUTILS_ROOT_DIR}/lib/${_pydir}/site-packages:\${PYTHONPATH}
export PYTHONPATH=${SPHINX_ROOT_DIR}/lib/${_pydir}/site-packages:\${PYTHONPATH}"
)
+ IF(SALOME_PACO_PARALLEL)
+ SET(SCR "${SCR}
+ export LD_LIBRARY_PATH=${PACO_ROOT_DIR}/lib:\${LD_LIBRARY_PATH}
+ export PYTHONPATH=${PACO_ROOT_DIR}/lib/${_pydir}:\${PYTHONPATH}")
+ ENDIF()
SET(EXT "sh")
SET(CALL_STR ".")
ENDIF(WINDOWS)
INSTALL(TARGETS SalomeIDLKernel EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
IF(SALOME_PACO_PARALLEL)
- SET(SalomeParallelIDLKernel_IDLSOURCES
- SALOME_ComponentPaCO.idl
- SALOME_PortsPaCO.idl
- DSC_EnginesPaCO.idl
- SALOME_ParamPortsPaCO.idl
- SALOME_PACOExtensionPaCO.idl
- SALOME_GenericObjPaCO.idl
+
+ SET(SalomeParallelIDLKernel_PACO_XML_FILES
+ SALOME_Component.xml
+ SALOME_Ports.xml
+ DSC_Engines.xml
+ SALOME_PACOExtension.xml
+ SALOME_ParamPorts.xml
+ SALOME_GenericObj.xml
+ )
+
+ SET(SalomeParallelIDLKernel_SALOME_Component_GEN_PACO_SOURCES
+ SALOME_ComponentPaCO_Engines_Container_server.cxx
+ SALOME_ComponentPaCO_Engines_Container_client.cxx
+ SALOME_ComponentPaCO_Engines_EngineComponent_server.cxx
+ SALOME_ComponentPaCO_Engines_EngineComponent_client.cxx
+ SALOME_ComponentPaCO_Engines_fileTransfer_server.cxx
+ SALOME_ComponentPaCO_Engines_fileTransfer_client.cxx
+ SALOME_ComponentPaCO_Engines_Salome_file_server.cxx
+ SALOME_ComponentPaCO_Engines_Salome_file_client.cxx
+ )
+
+ SET(SalomeParallelIDLKernel_SALOME_Ports_GEN_PACO_SOURCES
+ SALOME_PortsPaCO_Ports_Port_server.cxx
+ SALOME_PortsPaCO_Ports_Port_client.cxx
+ SALOME_PortsPaCO_Ports_Data_Port_server.cxx
+ SALOME_PortsPaCO_Ports_Data_Port_client.cxx
+ )
+
+ SET(SalomeParallelIDLKernel_DSC_Engines_GEN_PACO_SOURCES
+ DSC_EnginesPaCO_Engines_DSC_server.cxx
+ DSC_EnginesPaCO_Engines_DSC_client.cxx
+ DSC_EnginesPaCO_Engines_Superv_Component_server.cxx
+ DSC_EnginesPaCO_Engines_Superv_Component_client.cxx
+ )
+
+ SET(SalomeParallelIDLKernel_SALOME_PACOExtension_GEN_PACO_SOURCES
+ SALOME_PACOExtensionPaCO_Engines_Parallel_Component_server.cxx
+ SALOME_PACOExtensionPaCO_Engines_Parallel_Component_client.cxx
+ SALOME_PACOExtensionPaCO_Engines_PACO_Container_server.cxx
+ SALOME_PACOExtensionPaCO_Engines_PACO_Container_client.cxx
+ SALOME_PACOExtensionPaCO_Engines_Parallel_Salome_file_server.cxx
+ SALOME_PACOExtensionPaCO_Engines_Parallel_Salome_file_client.cxx
+ SALOME_PACOExtensionPaCO_Engines_Parallel_DSC_server.cxx
+ SALOME_PACOExtensionPaCO_Engines_Parallel_DSC_client.cxx
+ )
+
+ SET(SalomeParallelIDLKernel_SALOME_ParamPorts_GEN_PACO_SOURCES
+ SALOME_ParamPortsPaCO_Ports_Param_Double_Port_server.cxx
+ SALOME_ParamPortsPaCO_Ports_Param_Double_Port_client.cxx
+ )
+
+ SET(SalomeParallelIDLKernel_SALOME_GenericObj_GEN_PACO_SOURCES
+ SALOME_GenericObjPaCO_SALOME_GenericObj_server.cxx
+ SALOME_GenericObjPaCO_SALOME_GenericObj_client.cxx
+ )
+
+ SET(SalomeParallelIDLKernel_PAR_SOURCES)
+ SET(SalomeParallelIDLKernel_GEN_PACO_SOURCES)
+ FOREACH(input ${SalomeParallelIDLKernel_PACO_XML_FILES})
+ GET_FILENAME_COMPONENT(base ${input} NAME_WE)
+ SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input})
+ SET(baseidl ${CMAKE_CURRENT_SOURCE_DIR}/${base}.idl)
+ SET(basehdr ${CMAKE_CURRENT_BINARY_DIR}/${base}.hxx)
+ SET(genidl ${CMAKE_CURRENT_BINARY_DIR}/${base}PaCO.idl)
+ SET(parsrc ${CMAKE_CURRENT_BINARY_DIR}/${base}PaCO.cxx)
+ SET(parhdr ${CMAKE_CURRENT_BINARY_DIR}/${base}PaCO.hxx)
+ SET(genpacosrc)
+ SET(genpacohdr)
+ FOREACH(genpacosrcname ${SalomeParallelIDLKernel_${base}_GEN_PACO_SOURCES})
+ GET_FILENAME_COMPONENT(genpacobase ${genpacosrcname} NAME_WE)
+ LIST(APPEND genpacosrc ${CMAKE_CURRENT_BINARY_DIR}/${genpacosrcname})
+ LIST(APPEND genpacohdr ${CMAKE_CURRENT_BINARY_DIR}/${genpacobase}.hxx)
+ ENDFOREACH(genpacosrcname ${SalomeParallelIDLKernel_${base}_GEN_PACO_SOURCES})
+ LIST(APPEND SalomeParallelIDLKernel_PAR_SOURCES ${parsrc})
+ LIST(APPEND SalomeParallelIDLKernel_GEN_PACO_SOURCES ${genpacosrc})
+ ADD_CUSTOM_COMMAND(OUTPUT ${genidl} ${parsrc} ${parhdr} ${genpacosrc} ${genpacohdr}
+ COMMAND ${OMNIORB_IDL_COMPILER} -p${PACO_ROOT_DIR}/lib/python -bpaco -Wb${input},${CMAKE_CURRENT_SOURCE_DIR}:${PACO_ROOT_DIR}/idl ${baseidl}
+ DEPENDS ${input} ${baseidl})
+ INSTALL(FILES ${input} ${genidl} DESTINATION idl/salome)
+ INSTALL(FILES ${basehdr} ${parhdr} ${genpacohdr} DESTINATION include/salome)
+ IF(OMNIORB_PYTHON_BACKEND)
+ SET(IDLPYFLAGS "-bpython -p${OMNIORB_PYTHON_BACKEND} -I${CMAKE_CURRENT_SOURCE_DIR} -I${PACO_ROOT_DIR}/idl")
+ INSTALL(CODE "OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL( \"${OMNIORB_IDL_COMPILER}\" \"${IDLPYFLAGS}\" \"${genidl}\" \"${CMAKE_INSTALL_PREFIX}/\${INSTALL_PYIDL_DIR}\" )")
+ ENDIF(OMNIORB_PYTHON_BACKEND)
+ ENDFOREACH(input ${SalomeParallelIDLKernel_PACO_XML_FILES})
+
+ SET(SalomeParallelIDLKernel_PAR_INCLUDES
+ SALOME_Exception.hxx
+ SALOME_GenericObj.hxx
+ SALOMEDS.hxx
+ SALOME_PyNode.hxx
+ )
+
+ FOREACH(output ${SalomeParallelIDLKernel_PAR_INCLUDES})
+ GET_FILENAME_COMPONENT(base ${output} NAME_WE)
+ SET(baseidl ${CMAKE_CURRENT_SOURCE_DIR}/${base}.idl)
+ ADD_CUSTOM_COMMAND(OUTPUT ${output}
+ COMMAND ${OMNIORB_IDL_COMPILER} -bcxx -Wbh=.hxx -Wbs=.cxx ${baseidl}
+ DEPENDS ${baseidl})
+ ENDFOREACH(output ${SalomeParallelIDLKernel_PAR_INCLUDES})
+ ADD_CUSTOM_TARGET(BUILD_PAR_INCLUDES DEPENDS ${SalomeParallelIDLKernel_PAR_INCLUDES})
+
+ INCLUDE_DIRECTORIES(${PACO_INCLUDE_DIRS})
+ ADD_LIBRARY(SalomeParallelIDLKernel
+ ${SalomeParallelIDLKernel_PAR_SOURCES}
+ ${SalomeParallelIDLKernel_GEN_PACO_SOURCES}
)
- OMNIORB_ADD_MODULE(SalomeParallelIDLKernel "${SalomeIDLKernel_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" ${TYPE})
- TARGET_LINK_LIBRARIES(SalomeParallelIDLKernel ${OMNIORB_LIBRARIES})
+ ADD_DEPENDENCIES(SalomeParallelIDLKernel BUILD_PAR_INCLUDES)
INSTALL(TARGETS SalomeParallelIDLKernel EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
ENDIF()
--- /dev/null
+# 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
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# ------
+
+MESSAGE(STATUS "Check for Paco ...")
+
+# ------
+
+SET(PACO_ROOT_DIR $ENV{PACO_ROOT_DIR} CACHE PATH "Path to Paco.")
+IF(PACO_ROOT_DIR)
+ LIST(APPEND CMAKE_PREFIX_PATH "${PACO_ROOT_DIR}")
+ENDIF(PACO_ROOT_DIR)
+
+FIND_PATH(PACO_INCLUDE_DIRS PaCO++_InterfaceManager_impl.h)
+
+FIND_LIBRARY(PACO_LIBRARY_PaCO PaCO)
+FIND_LIBRARY(PACO_LIBRARY_GaBro GaBro)
+FIND_LIBRARY(PACO_LIBRARY_BasicBC BasicBC)
+FIND_LIBRARY(PACO_LIBRARY_PaCO_dummy PaCO_dummy)
+FIND_LIBRARY(PACO_LIBRARY_PaCO_mpi PaCO_mpi)
+FIND_LIBRARY(PACO_LIBRARY_PaCO_omnithread PaCO_omnithread)
+
+FIND_PROGRAM(PACO_IDL PaCOIdlTool.sh)
+
+MARK_AS_ADVANCED(PACO_INCLUDE_DIRS PACO_LIBRARY_PaCO PACO_LIBRARY_GaBro
+ PACO_LIBRARY_BasicBC PACO_LIBRARY_PaCO_dummy
+ PACO_LIBRARY_PaCO_mpi PACO_LIBRARY_PaCO_omnithread PACO_IDL)
+
+SET(PACO_LIBRARIES
+ ${PACO_LIBRARY_PaCO}
+ ${PACO_LIBRARY_GaBro}
+ ${PACO_LIBRARY_BasicBC}
+ ${PACO_LIBRARY_PaCO_dummy}
+ ${PACO_LIBRARY_PaCO_mpi}
+ ${PACO_LIBRARY_PaCO_omnithread})
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Paco
+ REQUIRED_VARS PACO_INCLUDE_DIRS PACO_LIBRARY_PaCO PACO_LIBRARY_GaBro
+ PACO_LIBRARY_BasicBC PACO_LIBRARY_PaCO_dummy
+ PACO_LIBRARY_PaCO_mpi PACO_LIBRARY_PaCO_omnithread PACO_IDL)
--- /dev/null
+# Copyright (C) 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
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author: Renaud Barate
+#
+
+# Paco detection for SALOME
+#
+# !! Please read the generic detection procedure in SalomeMacros.cmake !!
+#
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Paco PACO_INCLUDE_DIRS 1)
+#MARK_AS_ADVANCED()
ENDIF(WITH_MPI_SEQ_CONTAINER)
IF(SALOME_PACO_PARALLEL)
- ADD_DEFINITIONS(-DWITH_PACO_PARALLEL ${PACO_DEFINITIONS})
- SET(COMMON_LIBS
- ${COMMON_LIBS}
- ${PACO_LIBS}
- )
+ INCLUDE_DIRECTORIES(${PACO_INCLUDE_DIRS})
+ ADD_DEFINITIONS(-DWITH_PACO_PARALLEL)
+ LIST(APPEND COMMON_LIBS ${PACO_LIBRARIES})
ENDIF()
SET(SalomeContainer_SOURCES
SET(COMMON_FLAGS
${OMNIORB_DEFINITIONS}
${MPI_CXX_COMPILE_FLAGS}
- ${PACO_DEFINITIONS}
)
SET(SalomeParallelDSCContainer_SOURCES
ParallelDSC_i.cxx
ADD_LIBRARY(SalomeParallelDSCContainer ${SalomeParallelDSCContainer_SOURCES})
SET_TARGET_PROPERTIES(SalomeParallelDSCContainer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
+ADD_DEPENDENCIES(SalomeParallelDSCContainer SalomeParallelIDLKernel)
INSTALL(TARGETS SalomeParallelDSCContainer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
${CMAKE_CURRENT_SOURCE_DIR}/../HDFPersist
${PROJECT_BINARY_DIR}/idl
${PROJECT_SOURCE_DIR}/src/SALOMETraceCollector
- ${PACOPATH}/lib
)
# This local variable defines the list of dependant libraries common to all target in this package.
SalomeParallelIDLKernel
SalomeIDLKernel
${OMNIORB_LIBRARIES}
- ${PACO_LIBS}
+ ${PACO_LIBRARIES}
${PYTHON_LIBRARIES}
)
SALOME_ParallelGlobalProcessVar_i.cxx
)
-ADD_DEFINITIONS(${ONMIORB_DEFINITIONS} ${MPI_CXX_COMPILE_FLAGS} ${PACO_DEFINITIONS})
+ADD_DEFINITIONS(${ONMIORB_DEFINITIONS} ${MPI_CXX_COMPILE_FLAGS})
ADD_LIBRARY(SalomeParallelContainer ${SalomeParallelContainer_SOURCES})
TARGET_LINK_LIBRARIES(SalomeParallelContainer ${COMMON_LIBS} ${MPI_CXX_LIBRARIES})
IF(SALOME_USE_MPI)
SET(SALOME_ParallelContainerProxyMpi_LIBS
SalomeParallelContainer
- ${PaCO_dummy}
- ${PaCO_mpi}
- ${PaCO_omnithread}
${MPI_CXX_LIBRARIES}
${COMMON_LIBS}
)
SET(SALOME_ParallelContainerProxyDummy_LIBS
SalomeParallelContainer
- ${PaCO_dummy}
- ${PaCO_omnithread}
${COMMON_LIBS}
)