From: ana Date: Wed, 26 Sep 2012 12:00:44 +0000 (+0000) Subject: Porting SALOME KERNEL to CMake X-Git-Tag: V6_6_0a1~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=608e215bc94930c3e3166982bcf9a67fadc999dc;p=modules%2Fkernel.git Porting SALOME KERNEL to CMake --- diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100755 index 000000000..80dd89acf --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,108 @@ +# Copyright (C) 2012 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 +# + +CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7 FATAL_ERROR) + +IF(COMMAND cmake_policy) + cmake_policy(SET CMP0003 NEW) +ENDIF(COMMAND cmake_policy) + +# Temporary step instead Find Calcium.cmake +SET(CALCIUM_IDL_INT_F77 long) +SET(CALCIUM_CORBA_INT_F77 CORBA::Long) +SET(LONG_OR_INT int) + +# Temporary definitions +SET(DOXYGEN_IS_OK 0) +IF(WINDOWS) + SET(CPPUNIT_IS_OK 0) +ENDIF(WINDOWS) +SET(WITH_LOCAL 1) +SET(WITH_BATCH 1) + +ENABLE_TESTING() +SET(VERSION "6.5.0") +SET(VERSION_DEV "1") + +INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake) +INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPYTHON.cmake) +INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindMPI.cmake) +INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake) +INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake) +INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindHDF5.cmake) +INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindBOOST.cmake) +INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake) +INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindSWIG.cmake) +INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) +INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake) +INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindLIBBATCH.cmake) +INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindSPHINX.cmake) +INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/SalomeMacros.cmake) + +EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; t=sys.argv[-1].split(\".\") ; t[:]=(int(elt) for elt in t) ; sys.stdout.write(\"0x%02x%02x%02x\"%tuple(t))" ${VERSION} + OUTPUT_VARIABLE XVERSION) + +SET(KERNEL_salomebin_BINS bin/salome) + +SET(KERNEL_salomelib_LIBS lib/salome) + +SET(KERNEL_salomeidl_IDLS idl/salome) + +SET(KERNEL_salomeinclude_HEADERS include/salome) + +SET(KERNEL_salomeres_DATA share/salome/resources/kernel) + +SET(KERNEL_salomeres_SCRIPTS share/salome/resources/kernel) + +SET(KERNEL_salomescript_SCRIPTS bin/salome) + +SET(KERNEL_salomescript_DATA bin/salome) + +SET(KERNEL_salomescript_PYTHON bin/salome) + +SET(KERNEL_appliskel_SCRIPTS bin/salome/appliskel) + +SET(KERNEL_appliskel_PYTHON bin/salome/appliskel) + +SET(KERNEL_pythondir lib/python${PYTHON_VERSION}/site-packages) + +SET(KERNEL_salomepythondir ${KERNEL_pythondir}/salome) + +SET(KERNEL_sharedpkgpython_PYTHON ${KERNEL_salomepythondir}/shared_modules) + +SET(KERNEL_salomeadmcmake salome_adm/cmake_files) + +IF(CORBA_GEN) + ADD_SUBDIRECTORY(idl) +ENDIF(CORBA_GEN) + +ADD_SUBDIRECTORY(src) +ADD_SUBDIRECTORY(resources) + +IF(NOT WITHONLYLAUNCHER) + ADD_SUBDIRECTORY(bin) + ADD_SUBDIRECTORY(salome_adm) + ADD_SUBDIRECTORY(doc) +ENDIF(NOT WITHONLYLAUNCHER) + +SET(input ${CMAKE_CURRENT_SOURCE_DIR}/KERNEL_version.h.in) +SET(output ${CMAKE_CURRENT_BINARY_DIR}/KERNEL_version.h) +MESSAGE(STATUS "Creation of ${output}") +CONFIGURE_FILE(${input} ${output} @ONLY) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/KERNEL_version.h DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt new file mode 100755 index 000000000..2f4536803 --- /dev/null +++ b/bin/CMakeLists.txt @@ -0,0 +1,68 @@ +# Copyright (C) 2012 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 +# + +ADD_SUBDIRECTORY(appliskel) + +CONFIGURE_FILE(VERSION.in VERSION @ONLY) + +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION DESTINATION ${KERNEL_salomebin_BINS}) + +# =============================================================== +# Files to be installed +# =============================================================== + +# These files are data, module or lib files +INSTALL(FILES config_appli.xml salome.launch DESTINATION ${KERNEL_salomescript_DATA}) + +# These files are executable scripts +SET(SCRIPTS + appli_clean.sh + appli_install.sh + createAppli.sh + runIDLparser + runNS.sh + runSalome + runSalome.csh + runSalome.ksh + runSalome.bat + waitNS.sh + addToKillList.py + appli_gen.py + envSalome.py + killSalome.py + killSalomeWithPort.py + launchConfigureParser.py + launchSalome.py + nameserver.py + NSparam.py + orbmodule.py + runNS.py + runSalome.py + salomeConsole.py + salome_session.py + salome_utils.py + server.py + setenv.py + showNS.py + shutdownSalome.py + virtual_salome.py + waitContainers.py + waitNS.py + ) +SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${KERNEL_salomescript_SCRIPTS}) diff --git a/bin/appliskel/CMakeLists.txt b/bin/appliskel/CMakeLists.txt new file mode 100755 index 000000000..e1763cfca --- /dev/null +++ b/bin/appliskel/CMakeLists.txt @@ -0,0 +1,39 @@ +# Copyright (C) 2012 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 +# + +# =============================================================== +# Files to be installed +# =============================================================== + +# These files are executable scripts +SET(SCRIPTS + envd + searchFreePort.sh + runRemote.sh + runAppli + runConsole + runSession + runSalomeScript + runTests + getAppliPath.py + update_catalogs.py + kill_remote_containers.py +) + +SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${KERNEL_salomescript_SCRIPTS}/appliskel) diff --git a/configure.ac b/configure.ac index 719c66a7d..e8d2e1458 100644 --- a/configure.ac +++ b/configure.ac @@ -532,7 +532,7 @@ sed -i "s%\(\s*\)\(for searchdir in \$searchdirs; do\)%\1for sss in \$searchdirs # This could be helpfull to update de configuration. AC_OUTPUT([ \ KERNEL_version.h \ - salome_adm/unix/SALOMEconfig.ref \ + salome_adm/SALOMEconfig.ref \ salome_adm/Makefile \ salome_adm/cmake_files/Makefile \ salome_adm/unix/Makefile \ diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100755 index 000000000..b7c2d2d0e --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (C) 2012 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 +# + +ADD_SUBDIRECTORY(salome) +ADD_SUBDIRECTORY(docutils) \ No newline at end of file diff --git a/doc/salome/CMakeLists.txt b/doc/salome/CMakeLists.txt new file mode 100755 index 000000000..19bbb94b0 --- /dev/null +++ b/doc/salome/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (C) 2012 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 +# + +ADD_SUBDIRECTORY(gui) +ADD_SUBDIRECTORY(tui) \ No newline at end of file diff --git a/doc/salome/gui/CMakeLists.txt b/doc/salome/gui/CMakeLists.txt new file mode 100755 index 000000000..d98151fa1 --- /dev/null +++ b/doc/salome/gui/CMakeLists.txt @@ -0,0 +1,35 @@ +# Copyright (C) 2012 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 +# + +SET(top_builddir ${CMAKE_BINARY_DIR}) +SET(top_srcdir ${CMAKE_SOURCE_DIR}) +SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) +SET(builddir ${CMAKE_CURRENT_BINARY_DIR}) +SET(datadir ${CMAKE_INSTALL_PREFIX}/share) +SET(docdir ${datadir}/doc/salome) + +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/doxyfile) +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/static/header.html.in ${CMAKE_CURRENT_SOURCE_DIR}/static/header.html) + +ADD_CUSTOM_TARGET(usr_docs ${DOXYGEN_EXECUTABLE} + COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/KERNEL''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}/KERNEL''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/KERNEL'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/KERNEL''')" + VERBATIM + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +) + diff --git a/doc/salome/tui/CMakeLists.txt b/doc/salome/tui/CMakeLists.txt new file mode 100755 index 000000000..ae05910b6 --- /dev/null +++ b/doc/salome/tui/CMakeLists.txt @@ -0,0 +1,36 @@ +# Copyright (C) 2012 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 +# + +SET(top_builddir ${CMAKE_BINARY_DIR}) +SET(top_srcdir ${CMAKE_SOURCE_DIR}) +SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) +SET(builddir ${CMAKE_CURRENT_BINARY_DIR}) +SET(datadir ${CMAKE_INSTALL_PREFIX}/share) +SET(docdir ${datadir}/doc/salome) + +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/doxyfile) +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/static/header.html.in ${CMAKE_CURRENT_SOURCE_DIR}/static/header.html) + +ADD_CUSTOM_TARGET(dev_docs ${DOXYGEN_EXECUTABLE} -u + COMMAND ${DOXYGEN_EXECUTABLE} + COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.remove(r'''${CMAKE_CURRENT_BINARY_DIR}/doxyfile.bak''')" + COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/KERNEL''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}/KERNEL''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/KERNEL'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/KERNEL''')" + VERBATIM + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +) diff --git a/idl/CMakeLists.txt b/idl/CMakeLists.txt new file mode 100755 index 000000000..8dc0b75a9 --- /dev/null +++ b/idl/CMakeLists.txt @@ -0,0 +1,95 @@ +# Copyright (C) 2012 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 +# + +INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/UseOMNIORB.cmake) + +INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_CURRENT_BINARY_DIR} +) + +CONFIGURE_FILE(Calcium_Ports.idl.in Calcium_Ports.idl @ONLY) + +SET(SalomeIDLKernel_IDLSOURCES + SALOME_Exception.idl + SALOME_Comm.idl + SALOME_ModuleCatalog.idl + SALOME_RessourcesCatalog.idl + SALOMEDS.idl + SALOMEDS_Attributes.idl + SALOME_Component.idl + SALOME_ContainerManager.idl + SALOME_Registry.idl + Logger.idl + SALOME_GenericObj.idl + SALOME_Types.idl + SALOME_Session.idl + nstest.idl + DSC_Engines.idl + SALOME_Ports.idl + SALOME_PyNode.idl + Palm_Ports.idl + SALOME_PACOExtension.idl + SALOME_ParamPorts.idl + SALOME_Parametric.idl + SALOME_MPIObject.idl + SALOME_TestComponent.idl + SALOME_TestModuleCatalog.idl + ${CMAKE_CURRENT_BINARY_DIR}/Calcium_Ports.idl +) + +IF(MPI_IS_OK) + SET(SalomeIDLKernel_IDLSOURCES ${SalomeIDLKernel_IDLSOURCES} SALOME_MPIContainer.idl SALOME_TestMPIComponent.idl) +ENDIF(MPI_IS_OK) + +SET(IDL_INCLUDE_DIRS + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} +) + +SET(COMMON_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(TYPE) +IF(WINDOWS) + SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOGDI") + SET(TYPE STATIC) +ELSE(WINDOWS) + SET(TYPE SHARED) +ENDIF(WINDOWS) + +OMNIORB_ADD_MODULE(SalomeIDLKernel "${SalomeIDLKernel_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" ${TYPE}) +TARGET_LINK_LIBRARIES(SalomeIDLKernel ${CORBA_LIBS}) +SET_TARGET_PROPERTIES(SalomeIDLKernel PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") + +INSTALL(TARGETS SalomeIDLKernel DESTINATION ${KERNEL_salomelib_LIBS}) + +IF(WITH_PACO_PARALLEL) + SET(SalomeParallelIDLKernel_IDLSOURCES + SALOME_ComponentPaCO.idl + SALOME_PortsPaCO.idl + DSC_EnginesPaCO.idl + SALOME_ParamPortsPaCO.idl + SALOME_PACOExtensionPaCO.idl + SALOME_GenericObjPaCO.idl + ) + OMNIORB_ADD_MODULE(SalomeParallelIDLKernel "${SalomeIDLKernel_IDLSOURCES}" "${IDL_INCLUDE_DIRS}") + TARGET_LINK_LIBRARIES(SalomeParallelIDLKernel ${CORBA_LIBS}) + SET_TARGET_PROPERTIES(SalomeParallelIDLKernel PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}") + + INSTALL(TARGETS SalomeParallelIDLKernel DESTINATION ${KERNEL_salomelib_LIBS}) +ENDIF(WITH_PACO_PARALLEL) diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt new file mode 100755 index 000000000..d14075949 --- /dev/null +++ b/resources/CMakeLists.txt @@ -0,0 +1,40 @@ +# Copyright (C) 2012 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 +# + +# =============================================================== +# Files to be installed +# =============================================================== + +# These files are data, module or lib files +INSTALL(FILES CatalogModulePersonnel.xml_skel DESTINATION ${KERNEL_salomeres_DATA}) + +CONFIGURE_FILE(CatalogResources.xml.in CatalogResources.xml @ONLY) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/CatalogResources.xml DESTINATION ${KERNEL_salomeres_DATA}) + +IF(NOT WITHONLYLAUNCHER) + INSTALL(FILES channel.cfg SALOMEDS_Resources DESTINATION ${KERNEL_salomeres_DATA}) + + CONFIGURE_FILE(KERNELCatalog.xml.in KERNELCatalog.xml @ONLY) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/KERNELCatalog.xml DESTINATION ${KERNEL_salomeres_DATA}) + +ENDIF(NOT WITHONLYLAUNCHER) + + + + diff --git a/salome_adm/CMakeLists.txt b/salome_adm/CMakeLists.txt new file mode 100755 index 000000000..0bc8d03f1 --- /dev/null +++ b/salome_adm/CMakeLists.txt @@ -0,0 +1,28 @@ +# Copyright (C) 2012 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 +# + +ADD_SUBDIRECTORY(unix) +ADD_SUBDIRECTORY(cmake_files) + +SET(input ${CMAKE_CURRENT_SOURCE_DIR}/SALOMEconfig.ref.in) +SET(output ${CMAKE_CURRENT_BINARY_DIR}/SALOMEconfig.h) + +MESSAGE(STATUS "Creation of ${output}") +CONFIGURE_FILE(${input} ${output}) +INSTALL(FILES ${output} DESTINATION ${KERNEL_salomeinclude_HEADERS}) \ No newline at end of file diff --git a/salome_adm/Makefile.am b/salome_adm/Makefile.am index 01b7790d5..c58a20c5a 100644 --- a/salome_adm/Makefile.am +++ b/salome_adm/Makefile.am @@ -19,6 +19,29 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +include $(top_srcdir)/salome_adm/unix/make_common_starter.am SUBDIRS = unix cmake_files AUTOMAKE_OPTIONS=filename-length-max=255 + +# rules for install and build (see make_common_starter.am) +salomeadmux_DATA = SALOMEconfig.h.in +salomeinclude_DATA = SALOMEconfig.h +BUILT_SOURCES=SALOMEconfig.ref SALOMEconfig.h SALOMEconfig.h.in + +mostlyclean-local: + -rm -rf SALOMEconfig.h SALOMEconfig.h.in + +SALOMEconfig.h.in : SALOMEconfig.ref.in + cp -pf $< $@; + +# test if SALOMEconfig.ref has changed (contents), at build time +SALOMEconfig.h: $(top_builddir)/salome_adm/SALOMEconfig.ref + @if ! [ -a $@ ]; then \ + echo cp -pf $< $@; \ + cp -pf $< $@; \ + fi; \ + if ! cmp -s $< $@; then \ + echo cp -pf $< $@; \ + cp -pf $< $@; \ + fi; diff --git a/salome_adm/SALOMEconfig.ref.in b/salome_adm/SALOMEconfig.ref.in new file mode 100755 index 000000000..8db6100ef --- /dev/null +++ b/salome_adm/SALOMEconfig.ref.in @@ -0,0 +1,65 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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 +// + +/* Debug mode ??? */ +#ifndef DEBUG +# define DEBUG +#endif + +/* CORBA headers include rules */ +#ifndef CORBA_CLIENT_HEADER +# define QUOTE(x) #x +# define CORBA_CLIENT_HEADER(x) QUOTE(x@IDL_CLN_H@) +# define CORBA_SERVER_HEADER(x) QUOTE(x@IDL_SRV_H@) +#endif + +/* Platform definition */ +#ifndef @MACHINE@ + #define @MACHINE@ +#endif + +// This is only to suppress warning messages with defines redefined (cause of omniORB that exports these names) +#ifdef PACKAGE +#undef PACKAGE +#endif +#ifdef PACKAGE_BUGREPORT +#undef PACKAGE_BUGREPORT +#endif +#ifdef PACKAGE_NAME +#undef PACKAGE_NAME +#endif +#ifdef PACKAGE_STRING +#undef PACKAGE_STRING +#endif +#ifdef PACKAGE_TARNAME +#undef PACKAGE_TARNAME +#endif +#ifdef PACKAGE_VERSION +#undef PACKAGE_VERSION +#endif +#ifdef VERSION +#undef VERSION +#endif + +#ifdef _POSIX_C_SOURCE +#undef _POSIX_C_SOURCE +#endif diff --git a/salome_adm/cmake_files/CMakeLists.txt b/salome_adm/cmake_files/CMakeLists.txt new file mode 100755 index 000000000..d78a6f18d --- /dev/null +++ b/salome_adm/cmake_files/CMakeLists.txt @@ -0,0 +1,50 @@ +# Copyright (C) 2012 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 +# + +# =============================================================== +# Files to be installed +# =============================================================== + +# These files are data, module or lib files +SET(DATA + am2cmake.py + FindBOOST.cmake + FindCPPUNIT.cmake + FindDOXYGEN.cmake + FindHDF5.cmake + FindKERNEL.cmake + FindLIBBATCH.cmake + FindLIBXML2.cmake + FindMPI.cmake + FindOMNIORB.cmake + UseOMNIORB.cmake + FindPLATFORM.cmake + FindPTHREADS.cmake + FindPYTHON.cmake + FindSWIG.cmake + FindSPHINX.cmake + install_python_from_idl.cmake + install_and_compile_python_file.cmake + InstallAndCompilePythonFile.cmake + SalomeMacros.cmake +) +INSTALL(FILES ${DATA} DESTINATION ${KERNEL_salomeadmcmake}) + +# These files are executable scripts +SALOME_INSTALL_SCRIPTS(prepare_generating_doc.py ${KERNEL_salomescript_SCRIPTS}) diff --git a/salome_adm/cmake_files/SalomeMacros.cmake b/salome_adm/cmake_files/SalomeMacros.cmake new file mode 100755 index 000000000..121658f4b --- /dev/null +++ b/salome_adm/cmake_files/SalomeMacros.cmake @@ -0,0 +1,40 @@ +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D +# +# 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 +# + +# File defining miscellaneous macros + +#---------------------------------------------------------------------------- +# SALOME_INSTALL_SCRIPTS is a macro useful for installing executable scripts. +# ARGUMENTS: +# file_list: IN : list of files to be installed as executable scripts. +# path: IN : full pathname for installing. +#---------------------------------------------------------------------------- +MACRO(SALOME_INSTALL_SCRIPTS file_list path) + SET(PERMS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + FOREACH(file ${file_list}) + INSTALL(FILES ${file} DESTINATION ${path} PERMISSIONS ${PERMS}) + GET_FILENAME_COMPONENT(ext ${file} EXT) + IF(ext STREQUAL .py) + INSTALL(CODE "MESSAGE(STATUS \"py compiling ${CMAKE_INSTALL_PREFIX}/${path}/${file}\")") + INSTALL(CODE "SET(CMD \"import py_compile ; py_compile.compile('${CMAKE_INSTALL_PREFIX}/${path}/${file}')\")") + INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"\${CMD}\")") + INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -O -c \"\${CMD}\")") + ENDIF(ext STREQUAL .py) + ENDFOREACH(file ${file_list}) +ENDMACRO(SALOME_INSTALL_SCRIPTS) \ No newline at end of file diff --git a/salome_adm/cmake_files/am2cmake.py b/salome_adm/cmake_files/am2cmake.py index 831727c58..5a30e0ca9 100644 --- a/salome_adm/cmake_files/am2cmake.py +++ b/salome_adm/cmake_files/am2cmake.py @@ -826,8 +826,8 @@ class CMakeFile(object): ''') elif self.module == "kernel": newlines.append(r''' - SET(AM_CPPFLAGS ${AM_CPPFLAGS} -DHAVE_SALOME_CONFIG -I${CMAKE_BINARY_DIR}/salome_adm/unix -include SALOMEconfig.h) - SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DHAVE_SALOME_CONFIG -I${CMAKE_BINARY_DIR}/salome_adm/unix -include SALOMEconfig.h) + SET(AM_CPPFLAGS ${AM_CPPFLAGS} -DHAVE_SALOME_CONFIG -I${CMAKE_BINARY_DIR}/salome_adm -include SALOMEconfig.h) + SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DHAVE_SALOME_CONFIG -I${CMAKE_BINARY_DIR}/salome_adm -include SALOMEconfig.h) ''') else: if self.module not in ["yacs"]: diff --git a/salome_adm/unix/Makefile.am b/salome_adm/unix/Makefile.am index 7029d3f35..307ee59f1 100644 --- a/salome_adm/unix/Makefile.am +++ b/salome_adm/unix/Makefile.am @@ -34,28 +34,6 @@ DEPRECATED_FILES=\ DEPRECATED/make_module.in \ DEPRECATED/make_omniorb.in -# rules for install and build (see make_common_starter.am) -salomeadmux_DATA = SALOMEconfig.h.in -salomeinclude_DATA = SALOMEconfig.h -BUILT_SOURCES=SALOMEconfig.ref SALOMEconfig.h SALOMEconfig.h.in - -mostlyclean-local: - -rm -rf SALOMEconfig.h SALOMEconfig.h.in - -SALOMEconfig.h.in : SALOMEconfig.ref.in - cp -pf $< $@; - -# test if SALOMEconfig.ref has changed (contents), at build time -SALOMEconfig.h: $(top_builddir)/salome_adm/unix/SALOMEconfig.ref - @if ! [ -a $@ ]; then \ - echo cp -pf $< $@; \ - cp -pf $< $@; \ - fi; \ - if ! cmp -s $< $@; then \ - echo cp -pf $< $@; \ - cp -pf $< $@; \ - fi; - # The deprecated files are deprecated for the KERNEL but not for the # related modules (GUI, MED, ...), for now. Some files have to be installed. dist_salomeadmux_DATA=\ diff --git a/salome_adm/unix/SALOMEconfig.ref.in b/salome_adm/unix/SALOMEconfig.ref.in deleted file mode 100644 index 8db6100ef..000000000 --- a/salome_adm/unix/SALOMEconfig.ref.in +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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 -// - -/* Debug mode ??? */ -#ifndef DEBUG -# define DEBUG -#endif - -/* CORBA headers include rules */ -#ifndef CORBA_CLIENT_HEADER -# define QUOTE(x) #x -# define CORBA_CLIENT_HEADER(x) QUOTE(x@IDL_CLN_H@) -# define CORBA_SERVER_HEADER(x) QUOTE(x@IDL_SRV_H@) -#endif - -/* Platform definition */ -#ifndef @MACHINE@ - #define @MACHINE@ -#endif - -// This is only to suppress warning messages with defines redefined (cause of omniORB that exports these names) -#ifdef PACKAGE -#undef PACKAGE -#endif -#ifdef PACKAGE_BUGREPORT -#undef PACKAGE_BUGREPORT -#endif -#ifdef PACKAGE_NAME -#undef PACKAGE_NAME -#endif -#ifdef PACKAGE_STRING -#undef PACKAGE_STRING -#endif -#ifdef PACKAGE_TARNAME -#undef PACKAGE_TARNAME -#endif -#ifdef PACKAGE_VERSION -#undef PACKAGE_VERSION -#endif -#ifdef VERSION -#undef VERSION -#endif - -#ifdef _POSIX_C_SOURCE -#undef _POSIX_C_SOURCE -#endif diff --git a/salome_adm/unix/make_common_starter.am b/salome_adm/unix/make_common_starter.am index 2f07b58af..3842661dd 100644 --- a/salome_adm/unix/make_common_starter.am +++ b/salome_adm/unix/make_common_starter.am @@ -26,8 +26,8 @@ # ============================================================ if !WITHONLYLAUNCHER - AM_CXXFLAGS = -I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h - AM_CPPFLAGS = -I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h + AM_CXXFLAGS = -I$(top_builddir)/salome_adm -include SALOMEconfig.h + AM_CPPFLAGS = -I$(top_builddir)/salome_adm -include SALOMEconfig.h else WITHONLYLAUNCHER AM_CXXFLAGS = AM_CPPFLAGS = diff --git a/src/Basics/Basics_Utils.cxx b/src/Basics/Basics_Utils.cxx index 77eaacc19..673914693 100644 --- a/src/Basics/Basics_Utils.cxx +++ b/src/Basics/Basics_Utils.cxx @@ -123,6 +123,18 @@ namespace Kernel_Utils free (strings); } +#else + #if (_MSC_VER >= 1400) // Visual Studio 2005 + #include + int setenv(const char *name, const char *value, int rewrite) + { + std::stringstream sstr; + sstr<= 1400) // Visual Studio 2005 + BASICS_EXPORT int setenv(const char*, const char*, int); +#endif #endif } diff --git a/src/Basics/CMakeLists.txt b/src/Basics/CMakeLists.txt new file mode 100755 index 000000000..0ba895b59 --- /dev/null +++ b/src/Basics/CMakeLists.txt @@ -0,0 +1,41 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} +) + +SET(SALOMEBasics_SOURCES + BasicsGenericDestructor.cxx + Basics_Utils.cxx + Basics_DirUtils.cxx + SALOME_Basics.hxx + BasicsGenericDestructor.hxx + Basics_Utils.hxx + Basics_DirUtils.hxx +) + +ADD_LIBRARY(SALOMEBasics SHARED ${SALOMEBasics_SOURCES}) +INSTALL(TARGETS SALOMEBasics DESTINATION ${KERNEL_salomelib_LIBS}) + +SET_TARGET_PROPERTIES(SALOMEBasics PROPERTIES COMPILE_FLAGS "${PTHREAD_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SALOMEBasics ${PTHREAD_LIBS} ${PLATFORM_LIBS}) + +FILE(GLOB SALOMEBasics_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${SALOMEBasics_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) \ No newline at end of file diff --git a/src/Basics/Test/CMakeLists.txt b/src/Basics/Test/CMakeLists.txt new file mode 100755 index 000000000..f5edb13b3 --- /dev/null +++ b/src/Basics/Test/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (C) 2012 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 + +FILE(GLOB SALOMEBasics_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${SALOMEBasics_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100755 index 000000000..931de8be9 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,119 @@ +# Copyright (C) 2012 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 +# + +SET(SUBDIR_BASE + Basics + SALOMELocalTrace + HDFPersist + KERNEL_PY +) + +SET(SUBDIR_CORBA + DF + Logger + SALOMETraceCollector + Utils + NamingService + GenericObj + Registry + ModuleCatalog + ResourcesManager + Notification + NOTIFICATION_SWIG + Container + TestContainer + Launcher + LifeCycleCORBA + LifeCycleCORBA_SWIG + SALOMEDSClient + TOOLSDS + SALOMEDSImpl + SALOMEDS + KernelHelpers + ModuleGenerator + Communication + Communication_SWIG + DSC +) + +SET(SUBDIR_CPPUNIT_BASE + Basics/Test + SALOMELocalTrace/Test +) + +SET(SUBDIR_CPPUNIT_CORBA + Logger/Test + SALOMETraceCollector/Test + Utils/Test + NamingService/Test + LifeCycleCORBA/Test + LifeCycleCORBA_SWIG/Test + SALOMEDSImpl/Test + SALOMEDS/Test + KernelHelpers/Test +) + +SET(SUBDIR_CPPUNIT_GENERAL UnitTests) +SET(SUBDIR_MPI MPIContainer TestMPIContainer) +SET(SUBDIR_PARALLEL ParallelContainer) + +IF(WITHONLYLAUNCHER) + SET(SUBDIRS Basics ResourcesManager Launcher) +ELSE(WITHONLYLAUNCHER) + SET(SUBDIRS ${SUBDIR_BASE}) +ENDIF(WITHONLYLAUNCHER) + +IF(CORBA_GEN) + SET(SUBDIRS ${SUBDIRS} ${SUBDIR_CORBA}) +ENDIF(CORBA_GEN) + +IF(MPI_IS_OK) + SET(SUBDIRS + ${SUBDIRS} + ${SUBDIR_MPI} + ) +ENDIF(MPI_IS_OK) + +IF(CPPUNIT_IS_OK) + IF(CORBA_GEN) + SET(SUBDIRS + ${SUBDIRS} + ${SUBDIR_CPPUNIT_BASE} + ${SUBDIR_CPPUNIT_CORBA} + ${SUBDIR_CPPUNIT_GENERAL} + ) + ELSE(CORBA_GEN) + SET(SUBDIRS + ${SUBDIRS} + ${SUBDIR_CPPUNIT_BASE} + ${SUBDIR_CPPUNIT_GENERAL} + ) + ENDIF(CORBA_GEN) +ENDIF(CPPUNIT_IS_OK) + +IF(WITH_PACO_PARALLEL) + SET(SUBDIRS + ${SUBDIRS} + ${SUBDIR_PARALLEL} + ) +ENDIF(WITH_PACO_PARALLEL) + +FOREACH(DIR ${SUBDIRS}) + ADD_SUBDIRECTORY(${DIR}) +ENDFOREACH(DIR ${SUBDIRS}) diff --git a/src/Communication/CMakeLists.txt b/src/Communication/CMakeLists.txt new file mode 100755 index 000000000..4cb0ea1d3 --- /dev/null +++ b/src/Communication/CMakeLists.txt @@ -0,0 +1,71 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${MPI_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../Utils + ${CMAKE_BINARY_DIR}/idl +) + +SET(COMMON_LIBS + OpUtil + SALOMELocalTrace + SalomeIDLKernel +) + +SET(SalomeCommunication_SOURCES + SALOME_Comm_i.cxx + SALOME_Matrix_i.cxx + SenderFactory.cxx + MultiCommException.cxx + SALOMEMultiComm.cxx + ReceiverFactory.cxx + MatrixClient.cxx + MultiCommException.hxx + SALOME_Comm_i.hxx + SALOME_Matrix_i.hxx + SenderFactory.hxx + ReceiverFactory.hxx + MatrixClient.hxx + SALOMEMultiComm.hxx + Receivers.hxx + Receiver.hxx +) + +ADD_LIBRARY(SalomeCommunication SHARED ${SalomeCommunication_SOURCES}) +SET_TARGET_PROPERTIES(SalomeCommunication PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeCommunication ${COMMON_LIBS} ${PYTHON_LIBS} ${MPI_LIBS}) +INSTALL(TARGETS SalomeCommunication DESTINATION ${KERNEL_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +SET(NOINST_HEADERS_HXX + Receiver.hxx + Receivers.hxx +) +FOREACH(HEADER ${NOINST_HEADERS_HXX}) + LIST(REMOVE_ITEM COMMON_HEADERS_HXX ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER}) +ENDFOREACH(HEADER ${NOINST_HEADERS_HXX}) + +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/Communication_SWIG/CMakeLists.txt b/src/Communication_SWIG/CMakeLists.txt new file mode 100755 index 000000000..34543b966 --- /dev/null +++ b/src/Communication_SWIG/CMakeLists.txt @@ -0,0 +1,62 @@ +# Copyright (C) 2012 CEA/DEN, EDF R&D +# +# 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 +# + +FIND_PACKAGE(SWIG REQUIRED) +INCLUDE(${SWIG_USE_FILE}) + +SET_SOURCE_FILES_PROPERTIES(libSALOME_Comm.i PROPERTIES CPLUSPLUS ON) +SET_SOURCE_FILES_PROPERTIES(libSALOME_Comm.i PROPERTIES SWIG_DEFINITIONS "-shadow") + +INCLUDE_DIRECTORIES( + ${PYTHON_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../Communication + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../Utils + ${CMAKE_BINARY_DIR}/idl +) +SET(_libSALOME_Comm_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(_libSALOME_Comm_LIBS + SalomeCommunication + ${PYTHON_LIBS} +) + +IF(MPI_IS_OK) + INCLUDE_DIRECTORIES(${MPI_INCLUDE_DIRS}) + + SET(_libSALOME_Comm_FLAGS "${_libSALOME_Comm_FLAGS} ${MPI_DEFINITIONS}") + SET(_libSALOME_Comm_LIBS + ${_libSALOME_Comm_LIBS} + ${MPI_LIBS} + ) +ENDIF(MPI_IS_OK) + +SWIG_ADD_MODULE(libSALOME_Comm python libSALOME_Comm.i) +SWIG_LINK_LIBRARIES(libSALOME_Comm ${_libSALOME_Comm_LIBS}) +SET_TARGET_PROPERTIES(_libSALOME_Comm PROPERTIES COMPILE_FLAGS "${_libSALOME_Comm_FLAGS}") + +IF(${MACHINE} STREQUAL WINDOWS) + SET_TARGET_PROPERTIES(_libSALOME_Comm PROPERTIES DEBUG_OUTPUT_NAME _libSALOME_Comm_d) +ENDIF(${MACHINE} STREQUAL WINDOWS) + +INSTALL(TARGETS _libSALOME_Comm DESTINATION ${KERNEL_salomepythondir}) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_Comm.py DESTINATION ${KERNEL_salomepythondir}) \ No newline at end of file diff --git a/src/Container/CMakeLists.txt b/src/Container/CMakeLists.txt new file mode 100755 index 000000000..313f43d24 --- /dev/null +++ b/src/Container/CMakeLists.txt @@ -0,0 +1,121 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${HDF5_INCLUDE_DIRS} + ${LIBXML_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService + ${CMAKE_CURRENT_SOURCE_DIR}/../Utils + ${CMAKE_CURRENT_SOURCE_DIR}/../Registry + ${CMAKE_CURRENT_SOURCE_DIR}/../Notification + ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager + ${CMAKE_CURRENT_SOURCE_DIR}/../HDFPersist + ${CMAKE_CURRENT_SOURCE_DIR}/../GenericObj + ${CMAKE_BINARY_DIR}/idl +) + +SET(SCRIPTS + SALOME_ComponentPy.py + SALOME_PyNode.py + SALOME_Container.py + SALOME_ContainerPy.py +) + +SET(COMMON_FLAGS "${HDF5_DEFINITIONS} ${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS + Registry + SalomeNotification + SalomeResourcesManager + ResourcesManager + SalomeNS + OpUtil + SALOMELocalTrace + SALOMEBasics + SalomeHDFPersist + SalomeGenericObj + SalomeIDLKernel + ${CORBA_LIBS} + ${PYTHON_LIBS} +) + +IF(WITH_MPI_SEQ_CONTAINER) + SET(COMMON_FLAGS + ${COMMON_FLAGS} + ${MPI_DEFINITIONS} + ) + SET(COMMON_LIBS + ${COMMON_LIBS} + ${MPI_LIBS} + ) +ENDIF(WITH_MPI_SEQ_CONTAINER) + +IF(WITH_PACO_PARALLEL) + SET(COMMON_FLAGS + ${COMMON_FLAGS} + -DWITH_PACO_PARALLEL + ${PACO_DEFINITIONS} + ) + SET(COMMON_LIBS + ${COMMON_LIBS} + ${PACO_LIBS} + ) +ENDIF(WITH_PACO_PARALLEL) + +SET(SalomeContainer_SOURCES + Component_i.cxx + Container_i.cxx + SALOME_FileTransfer_i.cxx + SALOME_FileRef_i.cxx + Container_init_python.cxx + SALOME_ContainerManager.cxx + Salome_file_i.cxx +) + +ADD_LIBRARY(SalomeContainer SHARED ${SalomeContainer_SOURCES}) +SET_TARGET_PROPERTIES(SalomeContainer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SalomeContainer ${COMMON_LIBS}) +INSTALL(TARGETS SalomeContainer DESTINATION ${KERNEL_salomelib_LIBS}) + +SET(SALOME_Container_LIBS + SalomeContainer + SALOMEBasics + ${COMMON_LIBS} + ${HDF5_LIBS} +) + +ADD_EXECUTABLE(SALOME_Container SALOME_Container.cxx SALOME_Container_SignalsHandler.cxx) +SET_TARGET_PROPERTIES(SALOME_Container PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SALOME_Container ${SALOME_Container_LIBS}) + +ADD_EXECUTABLE(TestSalome_file TestSalome_file.cxx) +SET_TARGET_PROPERTIES(TestSalome_file PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(TestSalome_file SALOMETraceCollectorTest ${SALOME_Container_LIBS}) + +INSTALL(TARGETS SALOME_Container DESTINATION ${KERNEL_salomebin_BINS}) + +# Executable scripts to be installed +SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${KERNEL_salomescript_PYTHON}) +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/DF/CMakeLists.txt b/src/DF/CMakeLists.txt new file mode 100755 index 000000000..013773a91 --- /dev/null +++ b/src/DF/CMakeLists.txt @@ -0,0 +1,50 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${BOOST_INCLUDE_DIRS} +) + +SET(DF_SOURCES + DF_Attribute.cxx + DF_Label.cxx + DF_Document.cxx + DF_Application.cxx + DF_ChildIterator.cxx + DF_Container.cxx + DF_Attribute.hxx + DF_Label.hxx + DF_Application.hxx + DF_Document.hxx + DF_ChildIterator.hxx + DF_Container.hxx + DF_definitions.hxx +) + +ADD_LIBRARY(DF SHARED ${DF_SOURCES}) +SET_TARGET_PROPERTIES(DF PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS}") +INSTALL(TARGETS DF DESTINATION ${KERNEL_salomelib_LIBS}) + +ADD_EXECUTABLE(testDF testDF.cxx) +SET_TARGET_PROPERTIES(testDF PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS}") +TARGET_LINK_LIBRARIES(testDF DF) +INSTALL(TARGETS testDF DESTINATION ${KERNEL_salomebin_BINS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/DSC/CMakeLists.txt b/src/DSC/CMakeLists.txt new file mode 100755 index 000000000..97881f53e --- /dev/null +++ b/src/DSC/CMakeLists.txt @@ -0,0 +1,45 @@ +# Copyright (C) 2012 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 +# + +SET(SUBDIRS_COMMON + DSC_Basic +) + +IF(NOT WINDOWS) + SET(SUBDIRS_ADD + DSC_User + DSC_Python + ) +ENDIF(NOT WINDOWS) + +IF(WITH_PACO_PARALLEL) + SET(SUBDIR_PAR + ParallelDSC + ) +ENDIF(WITH_PACO_PARALLEL) + +SET(SUBDIRS + ${SUBDIRS_COMMON} + ${SUBDIRS_ADD} + ${SUBDIR_PAR} +) + +FOREACH(DIR ${SUBDIRS}) + ADD_SUBDIRECTORY(${DIR}) +ENDFOREACH(DIR ${SUBDIRS}) diff --git a/src/DSC/DSC_Basic/CMakeLists.txt b/src/DSC/DSC_Basic/CMakeLists.txt new file mode 100755 index 000000000..23c91cce8 --- /dev/null +++ b/src/DSC/DSC_Basic/CMakeLists.txt @@ -0,0 +1,64 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_SOURCE_DIR}/src/Container + ${CMAKE_SOURCE_DIR}/src/GenericObj + ${CMAKE_SOURCE_DIR}/src/Notification + ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace + ${CMAKE_SOURCE_DIR}/src/Basics + ${CMAKE_SOURCE_DIR}/src/NamingService + ${CMAKE_SOURCE_DIR}/src/Utils + ${CMAKE_BINARY_DIR}/idl +) + +SET(SalomeDSCContainer_SOURCES + DSC_i.cxx + DSC_interface.cxx + PortProperties_i.cxx +) + +ADD_LIBRARY(SalomeDSCContainer SHARED ${SalomeDSCContainer_SOURCES}) +SET_TARGET_PROPERTIES(SalomeDSCContainer PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeDSCContainer SalomeContainer ${OMNIORB_LIBS}) +INSTALL(TARGETS SalomeDSCContainer DESTINATION ${KERNEL_salomelib_LIBS}) + +SET(SALOME_ConnectionManagerServer_SOURCES + SALOME_ConnectionManagerServer.cxx + ConnectionManager_i.cxx +) + +SET(SALOME_ConnectionManagerServer_LIBS + SalomeIDLKernel + SalomeNS + SALOMELocalTrace + SalomeContainer + ${OMNIORB_LIBS} +) + +ADD_EXECUTABLE(SALOME_ConnectionManagerServer ${SALOME_ConnectionManagerServer_SOURCES}) +SET_TARGET_PROPERTIES(SALOME_ConnectionManagerServer PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SALOME_ConnectionManagerServer ${SALOME_ConnectionManagerServer_LIBS}) +INSTALL(TARGETS SALOME_ConnectionManagerServer DESTINATION ${KERNEL_salomebin_BINS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/DSC/DSC_Python/CMakeLists.txt b/src/DSC/DSC_Python/CMakeLists.txt new file mode 100755 index 000000000..56c4918ee --- /dev/null +++ b/src/DSC/DSC_Python/CMakeLists.txt @@ -0,0 +1,67 @@ +# Copyright (C) 2012 CEA/DEN, EDF R&D +# +# 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 +# + +FIND_PACKAGE(SWIG REQUIRED) +INCLUDE(${SWIG_USE_FILE}) + +SET_SOURCE_FILES_PROPERTIES(calcium.i PROPERTIES CPLUSPLUS ON) +SET(CMAKE_SWIG_FLAGS "-noexcept") +SET_SOURCE_FILES_PROPERTIES(calciumPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS}") + +INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User + ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream + ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream/Palm + ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream/Calcium + ${CMAKE_BINARY_DIR}/src/DSC/DSC_User/Datastream/Calcium + ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Basic + ${CMAKE_SOURCE_DIR}/src/DSC/DSC_Basic + ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace + ${CMAKE_SOURCE_DIR}/src/Basics + ${CMAKE_SOURCE_DIR}/src/Utils + ${CMAKE_SOURCE_DIR}/src/Container + ${CMAKE_SOURCE_DIR}/src/GenericObj + ${CMAKE_SOURCE_DIR}/src/Notification + ${CMAKE_BINARY_DIR}/idl + ) + +SET(_calcium_LIBS + CalciumC + SalomeDatastream + SalomeDSCSupervBasic + SalomeDSCSuperv + SalomeDSCContainer + SalomeContainer + ${CORBA_LIBS} +) + +SWIG_ADD_MODULE(calcium python calcium.i) +SWIG_LINK_LIBRARIES(calcium ${_calcium_LIBS}) +SET_TARGET_PROPERTIES(_calcium PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS}") +INSTALL(TARGETS _calcium DESTINATION ${KERNEL_salomepythondir}) + +SET(SCRIPTS + dsccalcium.py +) +SALOME_INSTALL_SCRIPTS( ${SCRIPTS} ${KERNEL_salomepythondir}) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/calcium.py DESTINATION ${KERNEL_salomepythondir}) diff --git a/src/DSC/DSC_User/Basic/CMakeLists.txt b/src/DSC/DSC_User/Basic/CMakeLists.txt new file mode 100755 index 000000000..31836de3b --- /dev/null +++ b/src/DSC/DSC_User/Basic/CMakeLists.txt @@ -0,0 +1,45 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/idl + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_SOURCE_DIR}/src/DSC/DSC_Basic + ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User + ${CMAKE_SOURCE_DIR}/src/Container + ${CMAKE_SOURCE_DIR}/src/GenericObj + ${CMAKE_SOURCE_DIR}/src/Notification + ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace + ${CMAKE_SOURCE_DIR}/src/Basics + ${CMAKE_SOURCE_DIR}/src/Utils) + +SET(SalomeDSCSupervBasic_SOURCES + basic_port_factory.cxx + data_short_port_uses.cxx + data_short_port_provides.cxx +) + +ADD_LIBRARY(SalomeDSCSupervBasic SHARED ${SalomeDSCSupervBasic_SOURCES}) +SET_TARGET_PROPERTIES(SalomeDSCSupervBasic PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeDSCSupervBasic SalomeDSCSuperv) +INSTALL(TARGETS SalomeDSCSupervBasic DESTINATION ${KERNEL_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/DSC/DSC_User/CMakeLists.txt b/src/DSC/DSC_User/CMakeLists.txt new file mode 100755 index 000000000..3df869328 --- /dev/null +++ b/src/DSC/DSC_User/CMakeLists.txt @@ -0,0 +1,58 @@ +# Copyright (C) 2012 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 +# + +ADD_SUBDIRECTORY(Basic) +ADD_SUBDIRECTORY(Datastream) + +INCLUDE_DIRECTORIES( + ${BOOST_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_SOURCE_DIR}/src/Container + ${CMAKE_SOURCE_DIR}/src/GenericObj + ${CMAKE_SOURCE_DIR}/src/Notification + ${CMAKE_SOURCE_DIR}/src/DSC/DSC_Basic + ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace + ${CMAKE_SOURCE_DIR}/src/Basics + ${CMAKE_SOURCE_DIR}/src/Utils + ${CMAKE_BINARY_DIR}/idl +) + +SET(COMMON_FLAGS + ${OMNIORB_DEFINITIONS} + ${BOOST_DEFINITIONS} +) +SET(SalomeDSCSuperv_SOURCES + base_port.cxx + uses_port.cxx + provides_port.cxx + Superv_Component_i.cxx +) + +ADD_LIBRARY(SalomeDSCSuperv SHARED ${SalomeDSCSuperv_SOURCES}) +SET_TARGET_PROPERTIES(SalomeDSCSuperv PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeDSCSuperv SalomeDSCContainer ${PLATFORM_LIBS}) +INSTALL(TARGETS SalomeDSCSuperv DESTINATION ${KERNEL_salomelib_LIBS}) + +ADD_EXECUTABLE(test_DSC_Exception test_DSC_Exception.cxx) +SET_TARGET_PROPERTIES(test_DSC_Exception PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(test_DSC_Exception OpUtil SALOMELocalTrace ${OMNIORB_FLAGS} ${PLATFORM_LIBS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/DSC/DSC_User/Datastream/CMakeLists.txt b/src/DSC/DSC_User/Datastream/CMakeLists.txt new file mode 100755 index 000000000..f26bd7c6a --- /dev/null +++ b/src/DSC/DSC_User/Datastream/CMakeLists.txt @@ -0,0 +1,54 @@ +# Copyright (C) 2012 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 +# + +ADD_SUBDIRECTORY(Palm) +ADD_SUBDIRECTORY(Calcium) + +INCLUDE_DIRECTORIES( + ${BOOST_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User + ${CMAKE_BINARY_DIR}/src/DSC/DSC_User/Datastream/Palm + ${CMAKE_BINARY_DIR}/src/DSC/DSC_User/Datastream/Calcium + ${CMAKE_CURRENT_SOURCE_DIR}/.. +) + +# This local variable defines the list of dependant libraries common to all target in this package. +SET(COMMON_LIBS + SalomePalm + SalomeCalcium + SalomeDSCSuperv +) + +ADD_LIBRARY(SalomeDatastream SHARED fake.cc) +SET_TARGET_PROPERTIES(SalomeDatastream PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeDatastream ${COMMON_LIBS}) +INSTALL(TARGETS SalomeDatastream DESTINATION ${KERNEL_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +SET(NOINST_HEADERS_HXX + ProcessTimeIntervalTraits.hxx + AdjacentPredicate.hxx +) +FOREACH(HEADER ${NOINST_HEADERS_HXX}) + LIST(REMOVE_ITEM COMMON_HEADERS_HXX ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER}) +ENDFOREACH(HEADER ${NOINST_HEADERS_HXX}) + +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) + diff --git a/src/DSC/DSC_User/Datastream/Calcium/CMakeLists.txt b/src/DSC/DSC_User/Datastream/Calcium/CMakeLists.txt new file mode 100755 index 000000000..708311a8e --- /dev/null +++ b/src/DSC/DSC_User/Datastream/Calcium/CMakeLists.txt @@ -0,0 +1,89 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${BOOST_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User + ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream + ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream/Palm + ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream/Calcium + ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Basic + ${CMAKE_SOURCE_DIR}/src/DSC/DSC_Basic + ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace + ${CMAKE_SOURCE_DIR}/src/Basics + ${CMAKE_SOURCE_DIR}/src/Utils + ${CMAKE_SOURCE_DIR}/src/Container + ${CMAKE_SOURCE_DIR}/src/GenericObj + ${CMAKE_SOURCE_DIR}/src/Notification + ${CMAKE_BINARY_DIR}/idl + ${CMAKE_BINARY_DIR}/src/DSC/DSC_User/Datastream/Calcium +) + +SET(SalomeCalcium_SOURCES + calcium_port_factory.cxx + calcium_uses_port.cxx + calcium_provides_port.cxx + calcium_repository_types.cxx + CalciumCouplingPolicy.cxx + CorbaTypes2CalciumTypes.cxx + CalciumCxxInterface.cxx + CalciumTypes2CorbaTypes.cxx + CalciumCInterface.cxx + CalciumProvidesPort.cxx + Calcium.cxx + calcium_destructors_port_uses.cxx +) +ADD_LIBRARY(SalomeCalcium SHARED ${SalomeCalcium_SOURCES}) +SET_TARGET_PROPERTIES(SalomeCalcium PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeCalcium ${PTHREAD_LIBS} ${CORBA_LIBS} ${PLATFORM_LIBS}) + +SET(CalciumC_SOURCES + CalciumC.c + Calcium.cxx + calciumf.c +) +ADD_LIBRARY(CalciumC SHARED ${CalciumC_SOURCES}) +SET_TARGET_PROPERTIES(CalciumC PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") + +INSTALL(TARGETS CalciumC DESTINATION ${KERNEL_salomelib_LIBS}) + +ADD_EXECUTABLE(test_DataIdContainer test_DataIdContainer.cxx) +SET_TARGET_PROPERTIES(test_DataIdContainer PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(test_DataIdContainer SalomeDSCSuperv SalomeContainer SalomeCalcium OpUtil SALOMELocalTrace ${CORBA_LIBS} ${PLATFORM_LIBS}) + +CONFIGURE_FILE(calcium_integer_port_uses.hxx.in calcium_integer_port_uses.hxx @ONLY) +CONFIGURE_FILE(CalciumProvidesPort.hxx.in CalciumProvidesPort.hxx @ONLY) +CONFIGURE_FILE(CalciumFortranInt.h.in CalciumFortranInt.h @ONLY) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") +SET(COMMON_HEADERS + ${COMMON_HEADERS_HXX} + ${COMMON_HEADERS_H} + calcium.hf + ${CMAKE_CURRENT_BINARY_DIR}/calcium_integer_port_uses.hxx + ${CMAKE_CURRENT_BINARY_DIR}/CalciumProvidesPort.hxx + ${CMAKE_CURRENT_BINARY_DIR}/CalciumFortranInt.h +) +LIST(REMOVE_ITEM COMMON_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/fortoc.h) +LIST(REMOVE_ITEM COMMON_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/CalciumTypesManipulator.hxx) +INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/DSC/DSC_User/Datastream/Palm/CMakeLists.txt b/src/DSC/DSC_User/Datastream/Palm/CMakeLists.txt new file mode 100755 index 000000000..ece77cee7 --- /dev/null +++ b/src/DSC/DSC_User/Datastream/Palm/CMakeLists.txt @@ -0,0 +1,44 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User + ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream + ${CMAKE_SOURCE_DIR}/src/DSC/DSC_Basic + ${CMAKE_SOURCE_DIR}/src/Container + ${CMAKE_SOURCE_DIR}/src/GenericObj + ${CMAKE_SOURCE_DIR}/src/Notification + ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace + ${CMAKE_SOURCE_DIR}/src/Basics + ${CMAKE_SOURCE_DIR}/src/Utils + ${CMAKE_BINARY_DIR}/idl +) + +ADD_LIBRARY(SalomePalm SHARED palm_port_factory.cxx) +SET_TARGET_PROPERTIES(SalomePalm PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}") + +ADD_EXECUTABLE(test_DataIdContainer test_DataIdContainer.cxx) +SET_TARGET_PROPERTIES(test_DataIdContainer PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}") +TARGET_LINK_LIBRARIES(test_DataIdContainer ${OMNIORB_LIBS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) + diff --git a/src/DSC/ParallelDSC/CMakeLists.txt b/src/DSC/ParallelDSC/CMakeLists.txt new file mode 100755 index 000000000..bb64c8313 --- /dev/null +++ b/src/DSC/ParallelDSC/CMakeLists.txt @@ -0,0 +1,54 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${MPI_INCLUDE_DIRS} + ${PACO_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_SOURCE_DIR}/src/Container + ${CMAKE_SOURCE_DIR}/src/ParallelContainer + ${CMAKE_SOURCE_DIR}/src/Notification + ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace + ${CMAKE_SOURCE_DIR}/src/Basics + ${CMAKE_SOURCE_DIR}/src/NamingService + ${CMAKE_SOURCE_DIR}/src/Utils + ${CMAKE_SOURCE_DIR}/src/DSC/DSC_Basic + ${CMAKE_SOURCE_DIR}/src/GenericObj + ${CMAKE_BINARY_DIR}/idl + ${CMAKE_SOURCE_DIR}/src/Registry + ${CMAKE_SOURCE_DIR}/src/Utils +) + +SET(COMMON_FLAGS + ${OMNIORB_DEFINITIONS} + ${MPI_DEFINITIONS} + ${PACO_DEFINITIONS} +) +SET(SalomeParallelDSCContainer_SOURCES + ParallelDSC_i.cxx + Param_Double_Port_provides_i.cxx + Param_Double_Port_uses_i.cxx +) + +ADD_LIBRARY(SalomeParallelDSCContainer SHARED ${SalomeParallelDSCContainer_SOURCES}) +SET_TARGET_PROPERTIES(SalomeParallelDSCContainer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +INSTALL(TARGETS SalomeParallelDSCContainer DESTINATION ${KERNEL_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/GenericObj/CMakeLists.txt b/src/GenericObj/CMakeLists.txt new file mode 100755 index 000000000..ab3b87f6c --- /dev/null +++ b/src/GenericObj/CMakeLists.txt @@ -0,0 +1,35 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_BINARY_DIR}/idl +) + +ADD_LIBRARY(SalomeGenericObj SHARED SALOME_GenericObj_i.cc) +SET_TARGET_PROPERTIES(SalomeGenericObj PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeGenericObj SALOMELocalTrace SalomeIDLKernel) +INSTALL(TARGETS SalomeGenericObj DESTINATION ${KERNEL_salomelib_LIBS}) + +INSTALL(FILES SALOME_GenericObj_i.hh DESTINATION ${KERNEL_salomeinclude_HEADERS}) + diff --git a/src/HDFPersist/CMakeLists.txt b/src/HDFPersist/CMakeLists.txt new file mode 100755 index 000000000..30aef7f00 --- /dev/null +++ b/src/HDFPersist/CMakeLists.txt @@ -0,0 +1,84 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${HDF5_INCLUDE_DIRS} +) + +SET(SalomeHDFPersist_SOURCES + HDFfileCreate.c + HDFfileClose.c + HDFfileOpen.c + HDFfileMount.c + HDFfileUmount.c + HDFgroupCreate.c + HDFgroupOpen.c + HDFgroupClose.c + HDFdatasetOpen.c + HDFdatasetClose.c + HDFdatasetCreate.c + HDFdatasetWrite.c + HDFdatasetRead.c + HDFdatasetGetDim.c + HDFdatasetGetSize.c + HDFdatasetGetType.c + HDFdatasetGetnDim.c + HDFdatasetGetOrder.c + HDFarrayGetType.c + HDFarrayGetTypeId.c + HDFarrayCreate.c + HDFarrayClose.c + HDFarrayGetnDim.c + HDFarrayGetDim.c + HDFattrOpen.c + HDFattrClose.c + HDFattrWrite.c + HDFattrCreate.c + HDFattrRead.c + HDFattrGetType.c + HDFattrGetSize.c + HDFerrorModeLock.c + HDFnObjects.c + HDFobjectIdentify.c + HDFobjectType.c + HDFobject.cc + HDFarray.cc + HDFinternalObject.cc + HDFattribute.cc + HDFcontainerObject.cc + HDFdataset.cc + HDFfile.cc + HDFgroup.cc + HDFexplorer.cc + HDFconvert.cc + HDFascii.cc +) + +ADD_LIBRARY(SalomeHDFPersist SHARED ${SalomeHDFPersist_SOURCES}) +SET_TARGET_PROPERTIES(SalomeHDFPersist PROPERTIES COMPILE_FLAGS "-D${MACHINE} ${HDF5_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeHDFPersist ${HDF5_LIBS} ${PLATFORM_LIBS}) +INSTALL(TARGETS SalomeHDFPersist DESTINATION ${KERNEL_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") +SET(COMMON_HEADERS + ${COMMON_HEADERS_HXX} + ${COMMON_HEADERS_H} +) +INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/KERNEL_PY/CMakeLists.txt b/src/KERNEL_PY/CMakeLists.txt new file mode 100755 index 000000000..676b5842e --- /dev/null +++ b/src/KERNEL_PY/CMakeLists.txt @@ -0,0 +1,49 @@ +# Copyright (C) 2012 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 +# + +ADD_SUBDIRECTORY(kernel) + +SET(salomepython_PYTHON + salome_shared_modules.py + import_hook.py + omnipatch.py +) + +IF(CORBA_GEN) + SET(salomepython_PYTHON + ${salomepython_PYTHON} + Help.py + PyInterp.py + batchmode_salome.py + salome_test.py + salome_kernel.py + salome_study.py + salome_iapp.py + salome_ComponentGUI.py + iparameters.py + salome_version.py + salome_notebook.py + salome_pynode.py + salome_genericobj.py + ) +ENDIF(CORBA_GEN) + +SALOME_INSTALL_SCRIPTS("${salomepython_PYTHON}" ${KERNEL_salomepythondir}) +SALOME_INSTALL_SCRIPTS(kernel_shared_modules.py ${KERNEL_sharedpkgpython_PYTHON}) +SALOME_INSTALL_SCRIPTS(__init__.py ${KERNEL_salomepythondir}/salome) diff --git a/src/KERNEL_PY/kernel/CMakeLists.txt b/src/KERNEL_PY/kernel/CMakeLists.txt new file mode 100755 index 000000000..40ac0b228 --- /dev/null +++ b/src/KERNEL_PY/kernel/CMakeLists.txt @@ -0,0 +1,49 @@ +# Copyright (C) 2012 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 +# + +ADD_SUBDIRECTORY(parametric) + +CONFIGURE_FILE(logconfig.py.in logconfig.py @ONLY) +CONFIGURE_FILE(kernelpy_autotest.sh.in kernelpy_autotest.sh @ONLY) + +# This first set of modules could be used in any context, you just +# have to get a python environement. +SET(mypkgpython_PYTHON + __init__.py + deprecation.py + logger.py + termcolor.py + unittester.py + pyunittester.py + enumerate.py + uiexception.py + datamodeler.py + testdata.py + diclookup.py + threadhelper.py + syshelper.py +) +# This set of modules required a running SALOME application. +SET(mypkgpython_PYTHON + ${mypkgpython_PYTHON} + studyedit.py + services.py +) +SALOME_INSTALL_SCRIPTS("${mypkgpython_PYTHON}" ${KERNEL_salomepythondir}/salome/kernel) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/logconfig.py DESTINATION ${KERNEL_salomepythondir}/salome/kernel) \ No newline at end of file diff --git a/src/KERNEL_PY/kernel/parametric/CMakeLists.txt b/src/KERNEL_PY/kernel/parametric/CMakeLists.txt new file mode 100755 index 000000000..fc6392119 --- /dev/null +++ b/src/KERNEL_PY/kernel/parametric/CMakeLists.txt @@ -0,0 +1,28 @@ +# Copyright (C) 2012 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 +# + +SET(mypkgpython_PYTHON + __init__.py + study_exchange_vars.py + compo_utils.py + pyscript_utils.py +) + +# Executable scripts to be installed +SALOME_INSTALL_SCRIPTS("${mypkgpython_PYTHON}" ${KERNEL_salomepythondir}/salome/kernel/parametric) diff --git a/src/KernelHelpers/CMakeLists.txt b/src/KernelHelpers/CMakeLists.txt new file mode 100755 index 000000000..62e0c90ef --- /dev/null +++ b/src/KernelHelpers/CMakeLists.txt @@ -0,0 +1,65 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../Utils + ${CMAKE_CURRENT_SOURCE_DIR}/../LifeCycleCORBA + ${CMAKE_CURRENT_SOURCE_DIR}/../Container + ${CMAKE_CURRENT_SOURCE_DIR}/../Notification + ${CMAKE_CURRENT_SOURCE_DIR}/../GenericObj + ${CMAKE_BINARY_DIR}/idl +) + +SET(SalomeKernelHelpers_LIBS + ${OMNIORB_LIBS} + SalomeNS + SALOMELocalTrace + SALOMEBasics + OpUtil + SalomeLifeCycleCORBA + SalomeContainer + SalomeNotification + SalomeGenericObj + SalomeIDLKernel +) + +SET(SalomeKernelHelpers_SOURCES + SALOME_KernelServices.cxx + SALOME_StudyEditor.cxx + SALOMEDS_DriverDefaultImpl.cxx +) + +ADD_LIBRARY(SalomeKernelHelpers SHARED ${SalomeKernelHelpers_SOURCES}) +SET_TARGET_PROPERTIES(SalomeKernelHelpers PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeKernelHelpers ${SalomeKernelHelpers_LIBS}) +INSTALL(TARGETS SalomeKernelHelpers DESTINATION ${KERNEL_salomelib_LIBS}) + +ADD_EXECUTABLE(KernelHelpersUseCases KernelHelpersUseCases.cxx) +SET_TARGET_PROPERTIES(KernelHelpersUseCases PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(KernelHelpersUseCases SalomeKernelHelpers ${SalomeKernelHelpers_LIBS}) +INSTALL(TARGETS KernelHelpersUseCases DESTINATION ${KERNEL_salomebin_BINS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/KernelHelpers/Test/CMakeLists.txt b/src/KernelHelpers/Test/CMakeLists.txt new file mode 100755 index 000000000..9797d0bf5 --- /dev/null +++ b/src/KernelHelpers/Test/CMakeLists.txt @@ -0,0 +1,68 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${CPPUNIT_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_SOURCE_DIR}/src/Basics/Test + ${CMAKE_CURRENT_SOURCE_DIR}/.. + ${CMAKE_SOURCE_DIR}/src/NamingService + ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace + ${CMAKE_SOURCE_DIR}/src/Basics + ${CMAKE_SOURCE_DIR}/src/Utils + ${CMAKE_SOURCE_DIR}/src/LifeCycleCORBA + ${CMAKE_SOURCE_DIR}/src/Container + ${CMAKE_SOURCE_DIR}/src/Notification + ${CMAKE_SOURCE_DIR}/src/GenericObj + ${CMAKE_BINARY_DIR}/idl +) + +SET(SalomeKernelHelpersTest_LIBS + ${CPPUNIT_LIBS} + SalomeKernelHelpers + ${OMNIORB_LIBS} + SalomeNS + SALOMELocalTrace + SALOMEBasics + OpUtil + SalomeLifeCycleCORBA + SalomeContainer + SalomeNotification + SalomeGenericObj + SalomeIDLKernel +) + +ADD_LIBRARY(SalomeKernelHelpersTest SHARED KernelHelpersUnitTests.cxx) +SET_TARGET_PROPERTIES(SalomeKernelHelpersTest PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeKernelHelpersTest ${SalomeKernelHelpersTest_LIBS}) +INSTALL(TARGETS SalomeKernelHelpersTest DESTINATION ${KERNEL_salomelib_LIBS}) + +ADD_EXECUTABLE(TestKernelHelpers TestKernelHelpers.cxx) +SET_TARGET_PROPERTIES(TestKernelHelpers PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(TestKernelHelpers SalomeKernelHelpersTest ${SalomeKernelHelpersTest_LIBS}) +ADD_TEST(TestKernelHelpers TestKernelHelpers) +INSTALL(TARGETS TestKernelHelpers DESTINATION ${KERNEL_salomebin_BINS}) + +# Executable scripts to be installed +SALOME_INSTALL_SCRIPTS(TestKernelHelpers.py ${KERNEL_salomescript_PYTHON}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/KernelHelpers/Test/KernelHelpersUnitTests.hxx b/src/KernelHelpers/Test/KernelHelpersUnitTests.hxx index 4e9b96696..045e1149f 100644 --- a/src/KernelHelpers/Test/KernelHelpersUnitTests.hxx +++ b/src/KernelHelpers/Test/KernelHelpersUnitTests.hxx @@ -25,7 +25,17 @@ #include -class KernelHelpersUnitTests : public CppUnit::TestFixture +#ifdef WIN32 +# if defined KERNELHELPERSTEST_EXPORTS || defined SalomeKernelHelpersTest_EXPORTS +# define KERNELHELPERSTEST_EXPORT __declspec( dllexport ) +# else +# define KERNELHELPERSTEST_EXPORT __declspec( dllimport ) +# endif +#else +# define KERNELHELPERSTEST_EXPORT +#endif + +class KERNELHELPERSTEST_EXPORT KernelHelpersUnitTests : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE( KernelHelpersUnitTests ); CPPUNIT_TEST( TEST_corba ); diff --git a/src/Launcher/CMakeLists.txt b/src/Launcher/CMakeLists.txt new file mode 100755 index 000000000..bddf4e6a7 --- /dev/null +++ b/src/Launcher/CMakeLists.txt @@ -0,0 +1,122 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${LIBXML_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${MPI_INCLUDE_DIRS} + ${LIBBATCH_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService + ${CMAKE_CURRENT_SOURCE_DIR}/../Utils + ${CMAKE_CURRENT_SOURCE_DIR}/../Registry + ${CMAKE_CURRENT_SOURCE_DIR}/../Notification + ${CMAKE_CURRENT_SOURCE_DIR}/../Container + ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager + ${CMAKE_BINARY_DIR}/idl +) +SET(WITH_LIBBATCH_FLAG) +IF(WITH_LIBBATCH) + SET(WITH_LIBBATCH_FLAG "-DWITH_LIBBATCH") +ENDIF(WITH_LIBBATCH) + +# This local variable defines the list of FLAGS common to all target in this package. +SET(COMMON_FLAGS "${MPI_DEFINITIONS} ${LIBXML_DEFINITIONS} ${LIBBATCH_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${WITH_LIBBATCH_FLAG} ${PLATFORM_DEFINITIONS}") + +# This local variable defines the list of dependant libraries common to all target in this package. +SET(COMMON_LIBS + Registry + SalomeNotification + SalomeContainer + SalomeResourcesManager + SalomeNS + OpUtil + SALOMELocalTrace + SALOMEBasics + SalomeIDLKernel + ${LIBBATCH_LIBS} + ${MPI_LIBS} + ${OMNIORB_LIBS} + ${LIBXML_LIBS} + ${PYTHON_LIBS} +) + +SET(Launcher_SOURCES + SALOME_Launcher_Parser.cxx + SALOME_Launcher_Handler.cxx + Launcher_Utils.hxx + Launcher_Job.cxx + Launcher_Job_Command.cxx + Launcher_Job_SALOME.cxx + Launcher_Job_PythonSALOME.cxx + Launcher_Job_YACSFile.cxx + Launcher.cxx +) +SET(Launcher_FLAGS "${MPI_DEFINITIONS} ${LIBXML_DEFINITIONS} ${LIBBATCH_DEFINITIONS} ${WITH_LIBBATCH_FLAG} ${PLATFORM_DEFINITIONS}") + +ADD_LIBRARY(Launcher SHARED ${Launcher_SOURCES}) +SET_TARGET_PROPERTIES(Launcher PROPERTIES COMPILE_FLAGS "${Launcher_FLAGS}") +TARGET_LINK_LIBRARIES(Launcher ResourcesManager ${LIBBATCH_LIBS} ${MPI_LIBS} ${LIBXML_LIBS}) +INSTALL(TARGETS Launcher DESTINATION ${KERNEL_salomelib_LIBS}) + +SET(TestLauncher_LIBS + ${LIBXML_LIBS} + ResourcesManager + Launcher + OpUtil + ${LIBBATCH_LIBS} +) + +ADD_EXECUTABLE(TestLauncher TestLauncher.cxx) +SET_TARGET_PROPERTIES(TestLauncher PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${LIBBATCH_DEFINITIONS} ${WITH_LIBBATCH_FLAG} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(TestLauncher ${TestLauncher_LIBS}) +INSTALL(TARGETS TestLauncher DESTINATION ${KERNEL_salomebin_BINS}) + +IF(NOT WITHONLYLAUNCHER) + ADD_LIBRARY(SalomeLauncher SHARED BatchTest.cxx SALOME_Launcher.cxx) + SET_TARGET_PROPERTIES(SalomeLauncher PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") + TARGET_LINK_LIBRARIES(SalomeLauncher Launcher ${COMMON_LIBS}) + INSTALL(TARGETS SalomeLauncher DESTINATION ${KERNEL_salomelib_LIBS}) + + SET(SALOME_LauncherServer_LIBS + Launcher + SalomeLauncher + SALOMEBasics + SALOMELocalTrace + ${LIBBATCH_LIBS} + ${MPI_LIBS} + ${OMNIORB_LIBS} + ${LIBXML_LIBS} + ${PYTHON_LIBS} + ) + + + + ADD_EXECUTABLE(SALOME_LauncherServer SALOME_LauncherServer.cxx) + SET_TARGET_PROPERTIES(SALOME_LauncherServer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") + TARGET_LINK_LIBRARIES(SALOME_LauncherServer ${SALOME_LauncherServer_LIBS}) + INSTALL(TARGETS SALOME_LauncherServer DESTINATION ${KERNEL_salomebin_BINS}) +ENDIF(NOT WITHONLYLAUNCHER) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/LifeCycleCORBA/CMakeLists.txt b/src/LifeCycleCORBA/CMakeLists.txt new file mode 100755 index 000000000..59c6eaf01 --- /dev/null +++ b/src/LifeCycleCORBA/CMakeLists.txt @@ -0,0 +1,67 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${LIBXML_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMETraceCollector + ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService + ${CMAKE_CURRENT_SOURCE_DIR}/../Utils + ${CMAKE_CURRENT_SOURCE_DIR}/../GenericObj + ${CMAKE_CURRENT_SOURCE_DIR}/../Container + ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager + ${CMAKE_CURRENT_SOURCE_DIR}/../Batch + ${CMAKE_CURRENT_SOURCE_DIR}/../Notification + ${CMAKE_CURRENT_SOURCE_DIR}/../Registry + ${CMAKE_BINARY_DIR}/idl +) + +SET(COMMON_LIBS + SalomeContainer + SalomeResourcesManager + SalomeNS + OpUtil + SALOMELocalTrace + SALOMEBasics + SalomeGenericObj + SalomeIDLKernel +) + +ADD_LIBRARY(SalomeLifeCycleCORBA SHARED SALOME_LifeCycleCORBA.cxx SALOME_FileTransferCORBA.cxx) +SET_TARGET_PROPERTIES(SalomeLifeCycleCORBA PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeLifeCycleCORBA ${COMMON_LIBS}) +INSTALL(TARGETS SalomeLifeCycleCORBA DESTINATION ${KERNEL_salomelib_LIBS}) + +ADD_EXECUTABLE(Test_LifeCycleCORBA Test_LifeCycleCORBA.cxx) +SET_TARGET_PROPERTIES(Test_LifeCycleCORBA PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(Test_LifeCycleCORBA SalomeLifeCycleCORBA Registry SalomeNotification SalomeContainer ${COMMON_LIBS} ${OMNIORB_LIBS}) + +ADD_EXECUTABLE(TestContainerManager TestContainerManager.cxx) +SET_TARGET_PROPERTIES(TestContainerManager PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(TestContainerManager SalomeLifeCycleCORBA Registry SalomeNotification SalomeContainer ${COMMON_LIBS} ${OMNIORB_LIBS}) + +INSTALL(TARGETS Test_LifeCycleCORBA TestContainerManager DESTINATION ${KERNEL_salomebin_BINS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/LifeCycleCORBA/Test/CMakeLists.txt b/src/LifeCycleCORBA/Test/CMakeLists.txt new file mode 100755 index 000000000..89221ff63 --- /dev/null +++ b/src/LifeCycleCORBA/Test/CMakeLists.txt @@ -0,0 +1,72 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} + ${CPPUNIT_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../NamingService + ${CMAKE_CURRENT_SOURCE_DIR}/../../NamingService/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../Utils + ${CMAKE_CURRENT_SOURCE_DIR}/../../Utils/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../ResourcesManager + ${CMAKE_CURRENT_SOURCE_DIR}/../../LifeCycleCORBA + ${CMAKE_BINARY_DIR}/idl +) + +SET(COMMON_LIBS + ${CPPUNIT_LIBS} + SALOMEBasics + SalomeResourcesManager + SalomeContainer + SalomeNS + Registry + SalomeNotification + UtilsTest + OpUtil + SALOMELocalTraceTest + SALOMELocalTrace + SALOMETraceCollectorTest + SalomeIDLKernel + SalomeLifeCycleCORBA + ${OMNIORB_LIBS} +) + +ADD_LIBRARY(LifeCycleCORBATest SHARED LifeCycleCORBATest.cxx) +SET_TARGET_PROPERTIES(LifeCycleCORBATest PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(LifeCycleCORBATest ${COMMON_LIBS}) +INSTALL(TARGETS LifeCycleCORBATest DESTINATION ${KERNEL_salomelib_LIBS}) + +ADD_EXECUTABLE(TestLifeCycleCORBA TestLifeCycleCORBA.cxx) +SET_TARGET_PROPERTIES(TestLifeCycleCORBA PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(TestLifeCycleCORBA LifeCycleCORBATest NamingServiceTest SalomeLifeCycleCORBA ${COMMON_LIBS}) +INSTALL(TARGETS TestLifeCycleCORBA DESTINATION ${KERNEL_salomebin_BINS}) + +# Executable scripts to be installed +SALOME_INSTALL_SCRIPTS(TestLifeCycleCORBA.py ${KERNEL_salomescript_PYTHON}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/LifeCycleCORBA/Test/LifeCycleCORBATest.cxx b/src/LifeCycleCORBA/Test/LifeCycleCORBATest.cxx index e359aef8c..1212c0fb7 100644 --- a/src/LifeCycleCORBA/Test/LifeCycleCORBATest.cxx +++ b/src/LifeCycleCORBA/Test/LifeCycleCORBATest.cxx @@ -44,6 +44,9 @@ #define MYDEVTRACE #define DEVTRACE(msg) #endif +#ifdef WIN32 +#define setenv Kernel_Utils::setenv +#endif #define TRACEFILE "/tmp/traceUnitTest.log" diff --git a/src/LifeCycleCORBA/Test/LifeCycleCORBATest.hxx b/src/LifeCycleCORBA/Test/LifeCycleCORBATest.hxx index 3be0ebab6..054680653 100644 --- a/src/LifeCycleCORBA/Test/LifeCycleCORBATest.hxx +++ b/src/LifeCycleCORBA/Test/LifeCycleCORBATest.hxx @@ -30,7 +30,17 @@ #include CORBA_CLIENT_HEADER(SALOME_TestComponent) #include "SALOME_NamingService.hxx" -class LifeCycleCORBATest : public CppUnit::TestFixture +#ifdef WIN32 +# if defined LIFECYCLECORBATEST_EXPORTS || defined LifeCycleCORBATest_EXPORTS +# define LIFECYCLECORBATEST_EXPORT __declspec( dllexport ) +# else +# define LIFECYCLECORBATEST_EXPORT __declspec( dllimport ) +# endif +#else +# define LIFECYCLECORBATEST_EXPORT +#endif + +class LIFECYCLECORBATEST_EXPORT LifeCycleCORBATest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE( LifeCycleCORBATest ); CPPUNIT_TEST( testFindOrLoad_Component_LaunchContainer ); diff --git a/src/LifeCycleCORBA_SWIG/CMakeLists.txt b/src/LifeCycleCORBA_SWIG/CMakeLists.txt new file mode 100755 index 000000000..72737ab2b --- /dev/null +++ b/src/LifeCycleCORBA_SWIG/CMakeLists.txt @@ -0,0 +1,56 @@ +# Copyright (C) 2012 CEA/DEN, EDF R&D +# +# 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 +# + +FIND_PACKAGE(SWIG REQUIRED) +INCLUDE(${SWIG_USE_FILE}) + +SET_SOURCE_FILES_PROPERTIES(libSALOME_LifeCycleCORBA.i PROPERTIES CPLUSPLUS ON) +SET_SOURCE_FILES_PROPERTIES(libSALOME_LifeCycleCORBA.i PROPERTIES SWIG_DEFINITIONS "-shadow") +SET_SOURCE_FILES_PROPERTIES(libSALOME_LifeCycleCORBAPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}") + +INCLUDE_DIRECTORIES( + ${PYTHON_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService + ${CMAKE_CURRENT_SOURCE_DIR}/../LifeCycleCORBA + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../Utils + ${CMAKE_BINARY_DIR}/idl + ) + +SWIG_ADD_MODULE(libSALOME_LifeCycleCORBA python libSALOME_LifeCycleCORBA.i) +SWIG_LINK_LIBRARIES(libSALOME_LifeCycleCORBA ${PYTHON_LIBS} SalomeLifeCycleCORBA) +SET_TARGET_PROPERTIES(_libSALOME_LifeCycleCORBA PROPERTIES COMPILE_FLAGS "${PLATFORM_LIBS}") + +IF(${MACHINE} STREQUAL WINDOWS) + SET_TARGET_PROPERTIES(_libSALOME_LifeCycleCORBA PROPERTIES DEBUG_OUTPUT_NAME _libSALOME_LifeCycleCORBA_d) +ENDIF(${MACHINE} STREQUAL WINDOWS) + +INSTALL(TARGETS _libSALOME_LifeCycleCORBA DESTINATION ${KERNEL_salomepythondir}) +SET(SCRIPTS + LifeCycleCORBA.py + TestLifeCycleCORBA.py +) +SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${KERNEL_salomescript_PYTHON}) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_LifeCycleCORBA.py DESTINATION ${KERNEL_salomepythondir}) diff --git a/src/LifeCycleCORBA_SWIG/Test/CMakeLists.txt b/src/LifeCycleCORBA_SWIG/Test/CMakeLists.txt new file mode 100755 index 000000000..d16803029 --- /dev/null +++ b/src/LifeCycleCORBA_SWIG/Test/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (C) 2012 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 + +# Scripts to be installed +SET(SCRIPTS + LifeCycleCORBA_SWIGTest.py + testresourcemanager.py + testcontainermanager.py + TestLifeCycleCORBA_SWIG.py +) + +SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${KERNEL_salomescript_PYTHON}) diff --git a/src/Logger/CMakeLists.txt b/src/Logger/CMakeLists.txt new file mode 100755 index 000000000..f18ae2bdf --- /dev/null +++ b/src/Logger/CMakeLists.txt @@ -0,0 +1,53 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_BINARY_DIR}/idl +) + +ADD_LIBRARY(SalomeLoggerServer SHARED SALOME_Trace.cxx SALOME_Logger_Server.cxx) +SET_TARGET_PROPERTIES(SalomeLoggerServer PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeLoggerServer SalomeIDLKernel ${OMNIORB_LIBS} ${PLATFORM_LIBS}) +INSTALL(TARGETS SalomeLoggerServer DESTINATION ${KERNEL_salomelib_LIBS}) + +SET(SALOME_Logger_Server_SOURCES + SALOME_Logger_Server_main.cxx + SALOME_Logger_Server.hxx +) + +SET(SALOME_Logger_Server_LIBS + SalomeLoggerServer + SalomeIDLKernel + ${OMNIORB_LIBS} +) + +ADD_EXECUTABLE(SALOME_Logger_Server ${SALOME_Logger_Server_SOURCES}) +SET_TARGET_PROPERTIES(SALOME_Logger_Server PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SALOME_Logger_Server ${SALOME_Logger_Server_LIBS}) +INSTALL(TARGETS SALOME_Logger_Server DESTINATION ${KERNEL_salomebin_BINS}) + +# Executable scripts to be installed +SALOME_INSTALL_SCRIPTS(SALOME_Trace.py ${KERNEL_salomescript_PYTHON}) + +INSTALL(FILES SALOME_Trace.hxx DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/Logger/Test/CMakeLists.txt b/src/Logger/Test/CMakeLists.txt new file mode 100755 index 000000000..1805bf2fd --- /dev/null +++ b/src/Logger/Test/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (C) 2012 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 +# + +# Executable scripts to be installed +SALOME_INSTALL_SCRIPTS(TestKiller.py ${KERNEL_salomescript_PYTHON}) diff --git a/src/MPIContainer/CMakeLists.txt b/src/MPIContainer/CMakeLists.txt new file mode 100755 index 000000000..0308be072 --- /dev/null +++ b/src/MPIContainer/CMakeLists.txt @@ -0,0 +1,69 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${MPI_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService + ${CMAKE_CURRENT_SOURCE_DIR}/../Utils + ${CMAKE_CURRENT_SOURCE_DIR}/../Registry + ${CMAKE_CURRENT_SOURCE_DIR}/../Notification + ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager + ${CMAKE_CURRENT_SOURCE_DIR}/../Container + ${CMAKE_CURRENT_SOURCE_DIR}/../GenericObj + ${CMAKE_BINARY_DIR}/idl +) + +SET(COMMON_LIBS + Registry + SalomeNotification + SalomeResourcesManager + SalomeNS + OpUtil + SALOMELocalTrace + SALOMEBasics + SalomeContainer + SalomeGenericObj + SalomeIDLKernel + ${CORBA_LIBS} +) + +ADD_LIBRARY(SalomeMPIContainer SHARED MPIObject_i.cxx MPIContainer_i.cxx) +SET_TARGET_PROPERTIES(SalomeMPIContainer PROPERTIES COMPILE_FLAGS "${MPI_DEFINITIONS} ${OMNIORB_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeMPIContainer ${COMMON_LIBS}) +INSTALL(TARGETS SalomeMPIContainer DESTINATION ${KERNEL_salomelib_LIBS}) + +ADD_EXECUTABLE(SALOME_MPIContainer SALOME_MPIContainer.cxx) +SET_TARGET_PROPERTIES(SALOME_MPIContainer PROPERTIES COMPILE_FLAGS "${MPI_DEFINITIONS} ${OMNIORB_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SALOME_MPIContainer SalomeMPIContainer ${COMMON_LIBS} ${PYTHON_LIBS} ${MPI_LIBS}) + +ADD_EXECUTABLE(testMPI2 testMPI2.cxx) +SET_TARGET_PROPERTIES(testMPI2 PROPERTIES COMPILE_FLAGS "${MPI_DEFINITIONS}") +TARGET_LINK_LIBRARIES(testMPI2 ${MPI_LIBS}) + +INSTALL(TARGETS SALOME_MPIContainer testMPI2 DESTINATION ${KERNEL_salomebin_BINS}) + +INSTALL(FILES launch_testMPI2.csh DESTINATION ${KERNEL_salomescript_SCRIPTS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/MPIContainer/MPIContainer_i.cxx b/src/MPIContainer/MPIContainer_i.cxx index f72a0b5b8..8ce73d65c 100644 --- a/src/MPIContainer/MPIContainer_i.cxx +++ b/src/MPIContainer/MPIContainer_i.cxx @@ -35,6 +35,11 @@ #include #include #include // must be before Python.h ! + +#ifdef _XOPEN_SOURCE +#undef _XOPEN_SOURCE +#endif + #include #include "Container_init_python.hxx" diff --git a/src/ModuleCatalog/CMakeLists.txt b/src/ModuleCatalog/CMakeLists.txt new file mode 100755 index 000000000..a134d9c41 --- /dev/null +++ b/src/ModuleCatalog/CMakeLists.txt @@ -0,0 +1,68 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${LIBXML_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService + ${CMAKE_CURRENT_SOURCE_DIR}/../Utils + ${CMAKE_BINARY_DIR}/idl +) + +# This local variable defines the list of dependant libraries common to all target in this package. +SET(COMMON_LIBS + SalomeNS + OpUtil + SALOMELocalTrace + SALOMEBasics + SalomeIDLKernel + ${LIBXML_LIBS} +) + +SET(SalomeCatalog_SOURCES + SALOME_ModuleCatalog_Handler.cxx + SALOME_ModuleCatalog_Parser_IO.cxx + SALOME_ModuleCatalog_impl.cxx + SALOME_ModuleCatalog_Acomponent_impl.cxx +) + +ADD_LIBRARY(SalomeCatalog SHARED ${SalomeCatalog_SOURCES}) +SET_TARGET_PROPERTIES(SalomeCatalog PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeCatalog ${COMMON_LIBS}) +INSTALL(TARGETS SalomeCatalog DESTINATION ${KERNEL_salomelib_LIBS}) + +ADD_EXECUTABLE(SALOME_ModuleCatalog_Server SALOME_ModuleCatalog_Server.cxx) +SET_TARGET_PROPERTIES(SALOME_ModuleCatalog_Server PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SALOME_ModuleCatalog_Server SalomeCatalog ${COMMON_LIBS} ${OMNIORB_LIBS}) + +ADD_EXECUTABLE(SALOME_ModuleCatalog_Client SALOME_ModuleCatalog_Client.cxx) +SET_TARGET_PROPERTIES(SALOME_ModuleCatalog_Client PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SALOME_ModuleCatalog_Client SalomeCatalog ${COMMON_LIBS} ${OMNIORB_LIBS}) + +INSTALL(TARGETS SALOME_ModuleCatalog_Server SALOME_ModuleCatalog_Client DESTINATION ${KERNEL_salomebin_BINS}) + +# Executable scripts to be installed +SALOME_INSTALL_SCRIPTS(TestModuleCatalog.py ${KERNEL_salomescript_PYTHON}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/ModuleGenerator/CMakeLists.txt b/src/ModuleGenerator/CMakeLists.txt new file mode 100755 index 000000000..8fed90f7f --- /dev/null +++ b/src/ModuleGenerator/CMakeLists.txt @@ -0,0 +1,25 @@ +# Copyright (C) 2012 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 +# + +CONFIGURE_FILE(testIDLparser.in testIDLparser @ONLY) + +# =============================================================== +# Files to be installed +# =============================================================== +SALOME_INSTALL_SCRIPTS(IDLparser.py ${KERNEL_salomescript_PYTHON}) diff --git a/src/NOTIFICATION_SWIG/CMakeLists.txt b/src/NOTIFICATION_SWIG/CMakeLists.txt new file mode 100755 index 000000000..c1b8d8c61 --- /dev/null +++ b/src/NOTIFICATION_SWIG/CMakeLists.txt @@ -0,0 +1,50 @@ +# Copyright (C) 2012 CEA/DEN, EDF R&D +# +# 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 +# + +FIND_PACKAGE(SWIG REQUIRED) +INCLUDE(${SWIG_USE_FILE}) + +SET_SOURCE_FILES_PROPERTIES(NOTIFICATION.i PROPERTIES CPLUSPLUS ON) +SET_SOURCE_FILES_PROPERTIES(NOTIFICATION.i PROPERTIES SWIG_DEFINITIONS "-shadow") +SET_SOURCE_FILES_PROPERTIES(NOTIFICATIONPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} -DHAVE_CONFIG_H") + +INCLUDE_DIRECTORIES( + ${PYTHON_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../Notification + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ) + +SWIG_ADD_MODULE(libNOTIFICATION python NOTIFICATION.i NOTIFICATION_Swig.cxx) +SWIG_LINK_LIBRARIES(libNOTIFICATION ${PYTHON_LIBS} SalomeNotification) +SET_TARGET_PROPERTIES(_libNOTIFICATION PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") + +IF(${MACHINE} STREQUAL WINDOWS) + SET_TARGET_PROPERTIES(_libNOTIFICATION PROPERTIES DEBUG_OUTPUT_NAME _libNOTIFICATION_d) +ENDIF(${MACHINE} STREQUAL WINDOWS) + +INSTALL(TARGETS _libNOTIFICATION DESTINATION ${KERNEL_salomepythondir}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMON_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS}) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libNOTIFICATION.py DESTINATION ${KERNEL_salomepythondir}) \ No newline at end of file diff --git a/src/NamingService/CMakeLists.txt b/src/NamingService/CMakeLists.txt new file mode 100755 index 000000000..bb4722fea --- /dev/null +++ b/src/NamingService/CMakeLists.txt @@ -0,0 +1,45 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../Utils + ${CMAKE_BINARY_DIR}/idl + ) + +SET(SalomeNS_SOURCES + SALOME_NamingService.cxx + ServiceUnreachable.cxx + NamingService_WaitForServerReadiness.cxx +) + +ADD_LIBRARY(SalomeNS SHARED ${SalomeNS_SOURCES}) +SET_TARGET_PROPERTIES(SalomeNS PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeNS OpUtil) +INSTALL(TARGETS SalomeNS DESTINATION ${KERNEL_salomelib_LIBS}) + +# Executable scripts to be installed +SALOME_INSTALL_SCRIPTS(SALOME_NamingServicePy.py ${KERNEL_salomescript_PYTHON}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/NamingService/Test/CMakeLists.txt b/src/NamingService/Test/CMakeLists.txt new file mode 100755 index 000000000..31b28bd01 --- /dev/null +++ b/src/NamingService/Test/CMakeLists.txt @@ -0,0 +1,70 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} + ${CPPUNIT_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../../NamingService + ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../../Utils + ${CMAKE_BINARY_DIR}/idl + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../Utils/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test +) + +# This local variable defines the list of dependant libraries common to all target in this package. +SET(COMMON_LIBS + ${CPPUNIT_LIBS} + SalomeNS + ${OMNIORB_LIBS} +) + +ADD_LIBRARY(NamingServiceTest SHARED NamingServiceTest.cxx) +SET_TARGET_PROPERTIES(NamingServiceTest PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(NamingServiceTest ${COMMON_LIBS} ${PLATFORM_LIBS}) +INSTALL(TARGETS NamingServiceTest DESTINATION ${KERNEL_salomelib_LIBS}) + +SET(TestNamingService_LIBS + NamingServiceTest + SalomeNS + SALOMELocalTraceTest + SALOMELocalTrace + SALOMETraceCollectorTest + UtilsTest + OpUtil + SALOMEBasics + SalomeIDLKernel + ${COMMON_LIBS} +) + +ADD_EXECUTABLE(TestNamingService TestNamingService.cxx) +SET_TARGET_PROPERTIES(TestNamingService PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(TestNamingService ${TestNamingService_LIBS} ${PLATFORM_LIBS}) +INSTALL(TARGETS TestNamingService DESTINATION ${KERNEL_salomebin_BINS}) + +# Executable scripts to be installed +SALOME_INSTALL_SCRIPTS(TestNamingService.py ${KERNEL_salomescript_PYTHON}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/NamingService/Test/NamingServiceTest.cxx b/src/NamingService/Test/NamingServiceTest.cxx index 033f8f87e..b36194d05 100644 --- a/src/NamingService/Test/NamingServiceTest.cxx +++ b/src/NamingService/Test/NamingServiceTest.cxx @@ -23,6 +23,7 @@ #include "NamingServiceTest.hxx" #include "Utils_ORB_INIT.hxx" #include "Utils_SINGLETON.hxx" +#include "Basics_Utils.hxx" #include #include @@ -43,6 +44,10 @@ #define DEVTRACE(msg) #endif +#ifdef WIN32 +#define setenv Kernel_Utils::setenv +#endif + #define TRACEFILE "/tmp/traceUnitTest.log" // ============================================================================ diff --git a/src/NamingService/Test/NamingServiceTest.hxx b/src/NamingService/Test/NamingServiceTest.hxx index 69ea3df88..ecd42a73d 100644 --- a/src/NamingService/Test/NamingServiceTest.hxx +++ b/src/NamingService/Test/NamingServiceTest.hxx @@ -29,7 +29,17 @@ #include #include CORBA_SERVER_HEADER(nstest) -class NSTEST_echo_i : public virtual POA_NSTEST::echo, +#ifdef WIN32 +# if defined NAMINGSERVICETEST_EXPORTS || defined NamingServiceTest_EXPORTS +# define NAMINGSERVICETEST_EXPORT __declspec( dllexport ) +# else +# define NAMINGSERVICETEST_EXPORT __declspec( dllimport ) +# endif +#else +# define NAMINGSERVICETEST_EXPORT +#endif + +class NAMINGSERVICETEST_EXPORT NSTEST_echo_i : public virtual POA_NSTEST::echo, public virtual PortableServer::ServantBase { public: @@ -52,7 +62,7 @@ private: int _num; }; -class NamingServiceTest : public CppUnit::TestFixture +class NAMINGSERVICETEST_EXPORT NamingServiceTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE( NamingServiceTest ); CPPUNIT_TEST( testConstructorDefault ); diff --git a/src/Notification/CMakeLists.txt b/src/Notification/CMakeLists.txt new file mode 100755 index 000000000..58e31d33c --- /dev/null +++ b/src/Notification/CMakeLists.txt @@ -0,0 +1,49 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../Utils + ) + +SET(COMMON_LIBS + OpUtil + SALOMELocalTrace + SALOMEBasics + ${OMNIORB_LIBS} +) + +SET(SalomeNotification_SOURCES + NOTIFICATION.cxx + NOTIFICATION_Supplier.cxx + NOTIFICATION_Consumer.cxx +) + +ADD_LIBRARY(SalomeNotification SHARED ${SalomeNotification_SOURCES}) +SET_TARGET_PROPERTIES(SalomeNotification PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeNotification ${COMMON_LIBS}) +INSTALL(TARGETS SalomeNotification DESTINATION ${KERNEL_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +SET(COMMON_HEADERS ${COMMON_HEADERS_HXX} CosNotifyShorthands.h) +INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/ParallelContainer/CMakeLists.txt b/src/ParallelContainer/CMakeLists.txt new file mode 100755 index 000000000..1b3595ede --- /dev/null +++ b/src/ParallelContainer/CMakeLists.txt @@ -0,0 +1,106 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIRS} + ${MPI_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${PACO_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_SOURCE_DIR}/src/Container + ${CMAKE_SOURCE_DIR}/src/Notification + ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace + ${CMAKE_SOURCE_DIR}/src/Basics + ${CMAKE_SOURCE_DIR}/src/NamingService + ${CMAKE_SOURCE_DIR}/src/Registry + ${CMAKE_SOURCE_DIR}/src/Utils + ${CMAKE_SOURCE_DIR}/src/GenericObj + ${CMAKE_CURRENT_SOURCE_DIR}/../HDFPersist + ${CMAKE_BINARY_DIR}/idl + ${CMAKE_SOURCE_DIR}/src/SALOMETraceCollector + ${PACOPATH}/lib +) + +# This local variable defines the list of dependant libraries common to all target in this package. +SET(COMMON_LIBS + SalomeContainer + SalomeNS + SALOMELocalTrace + SALOMEBasics + SalomeHDFPersist + SalomeParallelIDLKernel + SalomeIDLKernel + ${CORBA_LIBS} + ${PACO_LIBS} + ${PYTHON_LIBS} +) + +SET(SalomeParallelContainer_SOURCES + SALOME_ParallelComponent_i.cxx + SALOME_ParallelContainer_i.cxx + SALOME_ParallelContainerProxy_i.cxx + Parallel_Salome_file_i.cxx + SALOME_ParallelGlobalProcessVar_i.cxx +) + +ADD_LIBRARY(SalomeParallelContainer SHARED ${SalomeParallelContainer_SOURCES}) +SET_TARGET_PROPERTIES(SalomeParallelContainer PROPERTIES COMPILE_FLAGS "${ONMIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PACO_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeParallelContainer ${COMMON_LIBS} ${MPI_LIBS}) +INSTALL(TARGETS Registry DESTINATION ${KERNEL_salomelib_LIBS}) + +IF(MPI_IS_OK) + SET(SALOME_ParallelContainerProxyMpi_LIBS + SalomeParallelContainer + ${PaCO_dummy} + ${PaCO_mpi} + ${PaCO_omnithread} + ${MPI_LIBS} + ${COMMON_LIBS} + ) + ADD_EXECUTABLE(SALOME_ParallelContainerProxyMpi SALOME_Registry_Server.cxx) + SET_TARGET_PROPERTIES(SALOME_ParallelContainerProxyMpi PROPERTIES COMPILE_FLAGS "${ONMIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PACO_DEFINITIONS}") + TARGET_LINK_LIBRARIES(SALOME_ParallelContainerProxyMpi ${SALOME_ParallelContainerProxyMpi_LIBS}) + + ADD_EXECUTABLE(SALOME_ParallelContainerNodeMpi SALOME_ParallelContainerNodeMpi.cxx) + SET_TARGET_PROPERTIES(SALOME_ParallelContainerNodeMpi PROPERTIES COMPILE_FLAGS "${ONMIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PACO_DEFINITIONS}") + TARGET_LINK_LIBRARIES(SALOME_ParallelContainerNodeMpi ${SALOME_ParallelContainerProxyMpi_LIBS}) + + INSTALL(TARGETS SALOME_ParallelContainerProxyMpi SALOME_ParallelContainerNodeMpi DESTINATION ${KERNEL_salomebin_BINS}) +ENDIF(MPI_IS_OK) + +SET(SALOME_ParallelContainerProxyDummy_LIBS + SalomeParallelContainer + ${PaCO_dummy} + ${PaCO_omnithread} + ${COMMON_LIBS} +) + +ADD_EXECUTABLE(SALOME_ParallelContainerProxyDummy SALOME_ParallelContainerProxyDummy.cxx) +SET_TARGET_PROPERTIES(SALOME_ParallelContainerProxyDummy PROPERTIES COMPILE_FLAGS "${ONMIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PACO_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SALOME_ParallelContainerProxyDummy ${SALOME_ParallelContainerProxyDummy_LIBS}) + +ADD_EXECUTABLE(SALOME_ParallelContainerNodeDummy SALOME_ParallelContainerNodeDummy.cxx) +SET_TARGET_PROPERTIES(SALOME_ParallelContainerNodeDummy PROPERTIES COMPILE_FLAGS "${ONMIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PACO_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SALOME_ParallelContainerNodeDummy ${SALOME_ParallelContainerProxyDummy_LIBS}) + +INSTALL(TARGETS SALOME_ParallelContainerNodeDummy SALOME_ParallelContainerProxyDummy DESTINATION ${KERNEL_salomebin_BINS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) + diff --git a/src/Registry/CMakeLists.txt b/src/Registry/CMakeLists.txt new file mode 100755 index 000000000..09bcb2b5b --- /dev/null +++ b/src/Registry/CMakeLists.txt @@ -0,0 +1,53 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService + ${CMAKE_CURRENT_SOURCE_DIR}/../Utils + ${CMAKE_BINARY_DIR}/idl +) + +ADD_LIBRARY(Registry SHARED RegistryConnexion.cxx RegistryService.cxx) +SET_TARGET_PROPERTIES(Registry PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(Registry SalomeNS OpUtil SALOMELocalTrace SalomeIDLKernel ${PLATFORM_LIBS}) +INSTALL(TARGETS Registry DESTINATION ${KERNEL_salomelib_LIBS}) + +SET(SALOME_Registry_Server_LIBS + SalomeIDLKernel + Registry + SalomeNS + OpUtil + SALOMELocalTrace + SALOMEBasics + ${OMNIORB_LIBS} + ${PLATFORM_LIBS} +) + +ADD_EXECUTABLE(SALOME_Registry_Server SALOME_Registry_Server.cxx) +SET_TARGET_PROPERTIES(SALOME_Registry_Server PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SALOME_Registry_Server ${SALOME_Registry_Server_LIBS}) +INSTALL(TARGETS SALOME_Registry_Server DESTINATION ${KERNEL_salomebin_BINS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/ResourcesManager/CMakeLists.txt b/src/ResourcesManager/CMakeLists.txt new file mode 100755 index 000000000..04d37967f --- /dev/null +++ b/src/ResourcesManager/CMakeLists.txt @@ -0,0 +1,64 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${LIBXML_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService + ${CMAKE_CURRENT_SOURCE_DIR}/../Utils + ${CMAKE_BINARY_DIR}/idl +) + +# This local variable defines the list of FLAGS common to all target in this package. +SET(COMMON_FLAGS "${OMNIORB_DEFINITIONS} ${LIBXML_DEFINITIONS} ${PLATFORM_DEFINITIONS}") + +# This local variable defines the list of dependant libraries common to all target in this package. +SET(COMMON_LIBS + SalomeNS + OpUtil + SALOMEBasics + SalomeIDLKernel + ${LIBXML_LIBS} +) + +SET(ResourcesManager_SOURCES + SALOME_ResourcesCatalog_Parser.cxx + SALOME_ResourcesCatalog_Handler.cxx + SALOME_LoadRateManager.cxx + ResourcesManager.cxx +) + +ADD_LIBRARY(ResourcesManager SHARED ${ResourcesManager_SOURCES}) +SET_TARGET_PROPERTIES(ResourcesManager PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(ResourcesManager SALOMEBasics OpUtil ${LIBXML_LIBS}) +INSTALL(TARGETS ResourcesManager DESTINATION ${KERNEL_salomelib_LIBS}) + +IF(NOT WITHONLYLAUNCHER) + ADD_LIBRARY(SalomeResourcesManager SHARED SALOME_ResourcesManager.cxx) + SET_TARGET_PROPERTIES(SalomeResourcesManager PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") + TARGET_LINK_LIBRARIES(SalomeResourcesManager ResourcesManager ${COMMON_LIBS}) + INSTALL(TARGETS SalomeResourcesManager DESTINATION ${KERNEL_salomelib_LIBS}) +ENDIF(NOT WITHONLYLAUNCHER) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/SALOMEDS/CMakeLists.txt b/src/SALOMEDS/CMakeLists.txt new file mode 100755 index 000000000..9ba9076a7 --- /dev/null +++ b/src/SALOMEDS/CMakeLists.txt @@ -0,0 +1,269 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${HDF5_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../HDFPersist + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../Utils + ${CMAKE_CURRENT_SOURCE_DIR}/../DF + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMEDSImpl + ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService + ${CMAKE_CURRENT_SOURCE_DIR}/../GenericObj + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMEDSClient + ${CMAKE_CURRENT_SOURCE_DIR}/../LifeCycleCORBA + ${CMAKE_BINARY_DIR}/idl +) + +SET(COMMON_FLAGS "${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS + TOOLSDS + SalomeNS + OpUtil + SALOMELocalTrace + SALOMEBasics + SalomeHDFPersist + DF + SalomeDSImpl + SalomeGenericObj + SalomeLifeCycleCORBA + SalomeIDLKernel + ${HDF5_LIBS} +) + +SET(SalomeDS_SOURCES + SALOMEDS.cxx + SALOMEDS_Driver_i.cxx + SALOMEDS_StudyManager_i.cxx + SALOMEDS_UseCaseBuilder_i.cxx + SALOMEDS_UseCaseIterator_i.cxx + SALOMEDS_ChildIterator_i.cxx + SALOMEDS_SComponentIterator_i.cxx + SALOMEDS_Study_i.cxx + SALOMEDS_StudyBuilder_i.cxx + SALOMEDS_SObject_i.cxx + SALOMEDS_SComponent_i.cxx + SALOMEDS_GenericAttribute_i.cxx + SALOMEDS_AttributeComment_i.cxx + SALOMEDS_AttributeExternalFileDef_i.cxx + SALOMEDS_AttributeFileType_i.cxx + SALOMEDS_AttributeIOR_i.cxx + SALOMEDS_AttributeInteger_i.cxx + SALOMEDS_AttributeName_i.cxx + SALOMEDS_AttributePersistentRef_i.cxx + SALOMEDS_AttributeReal_i.cxx + SALOMEDS_AttributeSequenceOfReal_i.cxx + SALOMEDS_AttributeSequenceOfInteger_i.cxx + SALOMEDS_AttributeDrawable_i.cxx + SALOMEDS_AttributeSelectable_i.cxx + SALOMEDS_AttributeOpened_i.cxx + SALOMEDS_AttributeFlags_i.cxx + SALOMEDS_AttributeGraphic_i.cxx + SALOMEDS_AttributeExpandable_i.cxx + SALOMEDS_AttributeTextColor_i.cxx + SALOMEDS_AttributeTextHighlightColor_i.cxx + SALOMEDS_AttributePixMap_i.cxx + SALOMEDS_AttributeTreeNode_i.cxx + SALOMEDS_AttributeLocalID_i.cxx + SALOMEDS_AttributeUserID_i.cxx + SALOMEDS_AttributeTarget_i.cxx + SALOMEDS_AttributeTableOfInteger_i.cxx + SALOMEDS_AttributeTableOfReal_i.cxx + SALOMEDS_AttributeTableOfString_i.cxx + SALOMEDS_AttributeStudyProperties_i.cxx + SALOMEDS_AttributePythonObject_i.cxx + SALOMEDS_AttributeParameter_i.cxx + SALOMEDS_AttributeString_i.cxx + SALOMEDS_SObject.cxx + SALOMEDS_SComponent.cxx + SALOMEDS_GenericAttribute.cxx + SALOMEDS_ChildIterator.cxx + SALOMEDS_SComponentIterator.cxx + SALOMEDS_UseCaseIterator.cxx + SALOMEDS_UseCaseBuilder.cxx + SALOMEDS_StudyBuilder.cxx + SALOMEDS_Study.cxx + SALOMEDS_StudyManager.cxx + SALOMEDS_AttributeStudyProperties.cxx + SALOMEDS_AttributeComment.cxx + SALOMEDS_AttributeDrawable.cxx + SALOMEDS_AttributeExpandable.cxx + SALOMEDS_AttributeExternalFileDef.cxx + SALOMEDS_AttributeFileType.cxx + SALOMEDS_AttributeFlags.cxx + SALOMEDS_AttributeGraphic.cxx + SALOMEDS_AttributeIOR.cxx + SALOMEDS_AttributeInteger.cxx + SALOMEDS_AttributeLocalID.cxx + SALOMEDS_AttributeName.cxx + SALOMEDS_AttributeOpened.cxx + SALOMEDS_AttributePythonObject.cxx + SALOMEDS_AttributeReal.cxx + SALOMEDS_AttributeSelectable.cxx + SALOMEDS_AttributeSequenceOfInteger.cxx + SALOMEDS_AttributePersistentRef.cxx + SALOMEDS_AttributePixMap.cxx + SALOMEDS_AttributeSequenceOfReal.cxx + SALOMEDS_AttributeTableOfInteger.cxx + SALOMEDS_AttributeTableOfReal.cxx + SALOMEDS_AttributeTableOfString.cxx + SALOMEDS_AttributeTarget.cxx + SALOMEDS_AttributeTextColor.cxx + SALOMEDS_AttributeTextHighlightColor.cxx + SALOMEDS_AttributeTreeNode.cxx + SALOMEDS_AttributeUserID.cxx + SALOMEDS_TMPFile_i.cxx + SALOMEDS_AttributeParameter.cxx + SALOMEDS_AttributeString.cxx + SALOMEDS_IParameters.cxx + SALOMEDS_AttLong_i.hxx + SALOMEDS_AttReal_i.hxx + SALOMEDS_AttributeComment.hxx + SALOMEDS_AttributeComment_i.hxx + SALOMEDS_AttributeDrawable.hxx + SALOMEDS_AttributeDrawable_i.hxx + SALOMEDS_AttributeExpandable.hxx + SALOMEDS_AttributeExpandable_i.hxx + SALOMEDS_AttributeExternalFileDef.hxx + SALOMEDS_AttributeExternalFileDef_i.hxx + SALOMEDS_AttributeFileType.hxx + SALOMEDS_AttributeFileType_i.hxx + SALOMEDS_AttributeFlags.hxx + SALOMEDS_AttributeFlags_i.hxx + SALOMEDS_AttributeGraphic.hxx + SALOMEDS_AttributeGraphic_i.hxx + SALOMEDS_AttributeInteger.hxx + SALOMEDS_AttributeInteger_i.hxx + SALOMEDS_AttributeIOR.hxx + SALOMEDS_AttributeIOR_i.hxx + SALOMEDS_AttributeLocalID.hxx + SALOMEDS_AttributeLocalID_i.hxx + SALOMEDS_AttributeName.hxx + SALOMEDS_AttributeName_i.hxx + SALOMEDS_AttributeOpened.hxx + SALOMEDS_AttributeOpened_i.hxx + SALOMEDS_AttributePersistentRef.hxx + SALOMEDS_AttributePersistentRef_i.hxx + SALOMEDS_AttributePixMap.hxx + SALOMEDS_AttributePixMap_i.hxx + SALOMEDS_AttributePythonObject.hxx + SALOMEDS_AttributePythonObject_i.hxx + SALOMEDS_AttributeReal.hxx + SALOMEDS_AttributeReal_i.hxx + SALOMEDS_AttributeSelectable.hxx + SALOMEDS_AttributeSelectable_i.hxx + SALOMEDS_AttributeSequenceOfInteger.hxx + SALOMEDS_AttributeSequenceOfInteger_i.hxx + SALOMEDS_AttributeSequenceOfReal.hxx + SALOMEDS_AttributeSequenceOfReal_i.hxx + SALOMEDS_Attributes.hxx + SALOMEDS_AttributeStudyProperties.hxx + SALOMEDS_AttributeStudyProperties_i.hxx + SALOMEDS_AttributeTableOfInteger.hxx + SALOMEDS_AttributeTableOfInteger_i.hxx + SALOMEDS_AttributeTableOfReal.hxx + SALOMEDS_AttributeTableOfReal_i.hxx + SALOMEDS_AttributeTableOfString.hxx + SALOMEDS_AttributeTableOfString_i.hxx + SALOMEDS_AttributeTarget.hxx + SALOMEDS_AttributeTarget_i.hxx + SALOMEDS_AttributeTextColor.hxx + SALOMEDS_AttributeTextColor_i.hxx + SALOMEDS_AttributeTextHighlightColor.hxx + SALOMEDS_AttributeTextHighlightColor_i.hxx + SALOMEDS_AttributeTreeNode.hxx + SALOMEDS_AttributeTreeNode_i.hxx + SALOMEDS_AttributeUserID.hxx + SALOMEDS_AttributeUserID_i.hxx + SALOMEDS_BasicAttributeFactory.hxx + SALOMEDS_BasicAttribute_i.hxx + SALOMEDS_Callback_i.hxx + SALOMEDS_ChildIterator.hxx + SALOMEDS_ChildIterator_i.hxx + SALOMEDS_ClientAttributes.hxx + SALOMEDS_Driver_i.hxx + SALOMEDS_GenericAttribute.hxx + SALOMEDS_GenericAttribute_i.hxx + SALOMEDS.hxx + SALOMEDS_SComponent.hxx + SALOMEDS_SComponent_i.hxx + SALOMEDS_SComponentIterator.hxx + SALOMEDS_SComponentIterator_i.hxx + SALOMEDS_SObject.hxx + SALOMEDS_SObject_i.hxx + SALOMEDS_StudyBuilder.hxx + SALOMEDS_StudyBuilder_i.hxx + SALOMEDS_Study.hxx + SALOMEDS_Study_i.hxx + SALOMEDS_StudyManager.hxx + SALOMEDS_StudyManager_i.hxx + SALOMEDS_UseCaseBuilder.hxx + SALOMEDS_UseCaseBuilder_i.hxx + SALOMEDS_UseCaseIterator.hxx + SALOMEDS_UseCaseIterator_i.hxx + SALOMEDS_AttributeParameter.hxx + SALOMEDS_AttributeParameter_i.hxx + SALOMEDS_AttributeString.hxx + SALOMEDS_AttributeString_i.hxx + SALOMEDS_TMPFile_i.hxx +) + +IF(WINDOWS) + SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOGDI") +ENDIF(WINDOWS) + +ADD_LIBRARY(SalomeDS SHARED ${SalomeDS_SOURCES}) +SET_TARGET_PROPERTIES(SalomeDS PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SalomeDS ${COMMON_LIBS}) +INSTALL(TARGETS SalomeDS DESTINATION ${KERNEL_salomelib_LIBS}) + +ADD_EXECUTABLE(SALOMEDS_Server SALOMEDS_Server.cxx) +SET_TARGET_PROPERTIES(SALOMEDS_Server PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SALOMEDS_Server SalomeDS SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBS}) + +ADD_EXECUTABLE(SALOMEDS_Client SALOMEDS_Client.cxx) +SET_TARGET_PROPERTIES(SALOMEDS_Client PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SALOMEDS_Client SalomeDS SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBS}) + +INSTALL(TARGETS SALOMEDS_Server SALOMEDS_Client DESTINATION ${KERNEL_salomebin_BINS}) + +# Executable scripts to be installed +SALOME_INSTALL_SCRIPTS(SALOME_DriverPy.py ${KERNEL_salomescript_PYTHON}) + +SET(COMMON_HEADERS_HXX + SALOMEDS_StudyManager_i.hxx + SALOMEDS_Driver_i.hxx + SALOMEDS_StudyManager.hxx + SALOMEDS_Study_i.hxx + SALOMEDS_Study.hxx + SALOMEDS_SObject_i.hxx + SALOMEDS_SObject.hxx + SALOMEDS_SComponent_i.hxx + SALOMEDS_SComponent.hxx + SALOMEDS_GenericAttribute_i.hxx + SALOMEDS_GenericAttribute.hxx + SALOMEDS_IParameters.hxx + SALOMEDS_Defines.hxx +) +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/SALOMEDS/Test/CMakeLists.txt b/src/SALOMEDS/Test/CMakeLists.txt new file mode 100755 index 000000000..380669ddd --- /dev/null +++ b/src/SALOMEDS/Test/CMakeLists.txt @@ -0,0 +1,87 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} + ${CPPUNIT_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../NamingService + ${CMAKE_CURRENT_SOURCE_DIR}/../../NamingService/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../Utils + ${CMAKE_CURRENT_SOURCE_DIR}/../../Utils/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../ResourcesManager + ${CMAKE_CURRENT_SOURCE_DIR}/../../LifeCycleCORBA + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMEDS + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMEDSClient + ${CMAKE_CURRENT_SOURCE_DIR}/../../DF + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMEDSImpl + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMEDSImpl/Test + ${CMAKE_BINARY_DIR}/idl +) + +# This local variable defines the list of dependant libraries common to all target in this package. +SET(COMMON_LIBS + ${CPPUNIT_LIBS} + SALOMEBasics + SalomeResourcesManager + SalomeContainer + SalomeNS + Registry + SalomeNotification + UtilsTest + OpUtil + SALOMELocalTraceTest + SALOMELocalTrace + SALOMETraceCollectorTest + SALOMEDSImplTest + DF + SalomeDSImpl + SalomeDSClient + SalomeDS + SalomeIDLKernel +) + +SET(COMMON_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +IF(WINDOWS) + SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOGDI") +ENDIF(WINDOWS) + +ADD_LIBRARY(SALOMEDSTest SHARED SALOMEDSTest.cxx) +SET_TARGET_PROPERTIES(SALOMEDSTest PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SALOMEDSTest ${COMMON_LIBS}) +INSTALL(TARGETS SALOMEDSTest DESTINATION ${KERNEL_salomelib_LIBS}) + +ADD_EXECUTABLE(TestSALOMEDS TestSALOMEDS.cxx) +SET_TARGET_PROPERTIES(TestSALOMEDS PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(TestSALOMEDS SALOMEDSTest SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBS}) +INSTALL(TARGETS TestSALOMEDS DESTINATION ${KERNEL_salomebin_BINS}) + +# Executable scripts to be installed +SALOME_INSTALL_SCRIPTS(TestSALOMEDS.py ${KERNEL_salomescript_PYTHON}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/SALOMEDS/Test/SALOMEDSTest.hxx b/src/SALOMEDS/Test/SALOMEDSTest.hxx index 6d433f199..fc544d636 100644 --- a/src/SALOMEDS/Test/SALOMEDSTest.hxx +++ b/src/SALOMEDS/Test/SALOMEDSTest.hxx @@ -28,7 +28,17 @@ #include #include CORBA_SERVER_HEADER(SALOMEDS) -class SALOMEDSTest : public CppUnit::TestFixture +#ifdef WIN32 +# if defined SALOMEDSTEST_EXPORTS || defined SALOMEDSTest_EXPORTS +# define SALOMEDSTEST_EXPORT __declspec( dllexport ) +# else +# define SALOMEDSTEST_EXPORT __declspec( dllimport ) +# endif +#else +# define SALOMEDSTEST_EXPORT +#endif + +class SALOMEDSTEST_EXPORT SALOMEDSTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE( SALOMEDSTest ); @@ -130,7 +140,7 @@ CORBA::ORB_var _orb; -class SALOMEDSTest_Embedded : public SALOMEDSTest +class SALOMEDSTEST_EXPORT SALOMEDSTest_Embedded : public SALOMEDSTest { CPPUNIT_TEST_SUITE( SALOMEDSTest_Embedded ); diff --git a/src/SALOMEDS/Test/TestSALOMEDS.cxx b/src/SALOMEDS/Test/TestSALOMEDS.cxx index 117a494bc..c9421cca1 100644 --- a/src/SALOMEDS/Test/TestSALOMEDS.cxx +++ b/src/SALOMEDS/Test/TestSALOMEDS.cxx @@ -53,6 +53,9 @@ CPPUNIT_TEST_SUITE_REGISTRATION( SALOMEDSTest_Embedded ); #include "NamingService_WaitForServerReadiness.hxx" #include "SALOMEDS_StudyManager_i.hxx" +#ifdef WIN32 +#define setenv Kernel_Utils::setenv +#endif // ============================================================================ /*! @@ -84,8 +87,13 @@ int main(int argc, char* argv[]) ORB_INIT &init = *SINGLETON_::Instance() ; ASSERT(SINGLETON_::IsAlreadyExisting()); CORBA::ORB_var orb = init(argc , argv ) ; - - sleep(15); + + #ifndef WIN32 + sleep(15); + #else + Sleep(15000); + #endif + std::string host; // = Kernel_Utils::GetHostname(); char* wait_Superv = getenv("SALOMEDS_UNITTESTS_WAIT_SUPERVISOR"); diff --git a/src/SALOMEDSClient/CMakeLists.txt b/src/SALOMEDSClient/CMakeLists.txt new file mode 100755 index 000000000..efaf1ad8a --- /dev/null +++ b/src/SALOMEDSClient/CMakeLists.txt @@ -0,0 +1,33 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_BINARY_DIR}/idl +) + +ADD_LIBRARY(SalomeDSClient SHARED SALOMEDSClient_ClientFactory.cxx) +SET_TARGET_PROPERTIES(SalomeDSClient PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${OMNIORB_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeDSClient SalomeIDLKernel) +INSTALL(TARGETS SalomeDSClient DESTINATION ${KERNEL_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/SALOMEDSImpl/CMakeLists.txt b/src/SALOMEDSImpl/CMakeLists.txt new file mode 100755 index 000000000..f91f7e08b --- /dev/null +++ b/src/SALOMEDSImpl/CMakeLists.txt @@ -0,0 +1,169 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${HDF5_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../HDFPersist + ${CMAKE_CURRENT_SOURCE_DIR}/../DF + ${CMAKE_CURRENT_SOURCE_DIR}/../GenericObj + ${CMAKE_BINARY_DIR}/idl + ${CMAKE_BINARY_DIR} +) + +# This local variable defines the list of FLAGS common to all target in this package. +SET(COMMON_FLAGS "${HDF5_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}") + +# This local variable defines the list of dependant libraries common to all target in this package. +SET(COMMON_LIBS + SALOMEBasics + SalomeHDFPersist + DF + SalomeGenericObj + SalomeIDLKernel + ${HDF5_LIBS} +) + +SET(SalomeDSImpl_SOURCES + SALOMEDSImpl_Tool.cxx + SALOMEDSImpl_Callback.cxx + SALOMEDSImpl_StudyHandle.cxx + SALOMEDSImpl_GenericAttribute.cxx + SALOMEDSImpl_SObject.cxx + SALOMEDSImpl_SComponent.cxx + SALOMEDSImpl_ChildIterator.cxx + SALOMEDSImpl_AttributeIOR.cxx + SALOMEDSImpl_AttributeExternalFileDef.cxx + SALOMEDSImpl_AttributeFileType.cxx + SALOMEDSImpl_AttributePersistentRef.cxx + SALOMEDSImpl_AttributeSequenceOfReal.cxx + SALOMEDSImpl_AttributeSequenceOfInteger.cxx + SALOMEDSImpl_AttributeDrawable.cxx + SALOMEDSImpl_AttributeSelectable.cxx + SALOMEDSImpl_AttributeExpandable.cxx + SALOMEDSImpl_AttributeOpened.cxx + SALOMEDSImpl_AttributeFlags.cxx + SALOMEDSImpl_AttributeGraphic.cxx + SALOMEDSImpl_AttributeTextColor.cxx + SALOMEDSImpl_AttributeTextHighlightColor.cxx + SALOMEDSImpl_AttributePixMap.cxx + SALOMEDSImpl_AttributeLocalID.cxx + SALOMEDSImpl_AttributeTarget.cxx + SALOMEDSImpl_AttributeTableOfInteger.cxx + SALOMEDSImpl_AttributeTableOfReal.cxx + SALOMEDSImpl_AttributeTableOfString.cxx + SALOMEDSImpl_AttributeStudyProperties.cxx + SALOMEDSImpl_AttributePythonObject.cxx + SALOMEDSImpl_AttributeReal.cxx + SALOMEDSImpl_AttributeInteger.cxx + SALOMEDSImpl_AttributeUserID.cxx + SALOMEDSImpl_AttributeTreeNode.cxx + SALOMEDSImpl_AttributeName.cxx + SALOMEDSImpl_AttributeComment.cxx + SALOMEDSImpl_AttributeReference.cxx + SALOMEDSImpl_AttributeParameter.cxx + SALOMEDSImpl_AttributeString.cxx + SALOMEDSImpl_ChildNodeIterator.cxx + SALOMEDSImpl_UseCaseBuilder.cxx + SALOMEDSImpl_UseCaseIterator.cxx + SALOMEDSImpl_SComponentIterator.cxx + SALOMEDSImpl_StudyBuilder.cxx + SALOMEDSImpl_Study.cxx + SALOMEDSImpl_StudyManager.cxx + SALOMEDSImpl_IParameters.cxx + SALOMEDSImpl_TMPFile.cxx + SALOMEDSImpl_GenericVariable.cxx + SALOMEDSImpl_ScalarVariable.cxx + SALOMEDSImpl_AttributeComment.hxx + SALOMEDSImpl_AttributeDrawable.hxx + SALOMEDSImpl_AttributeExpandable.hxx + SALOMEDSImpl_AttributeExternalFileDef.hxx + SALOMEDSImpl_AttributeFileType.hxx + SALOMEDSImpl_AttributeFlags.hxx + SALOMEDSImpl_AttributeGraphic.hxx + SALOMEDSImpl_AttributeInteger.hxx + SALOMEDSImpl_AttributeIOR.hxx + SALOMEDSImpl_AttributeLocalID.hxx + SALOMEDSImpl_AttributeName.hxx + SALOMEDSImpl_AttributeOpened.hxx + SALOMEDSImpl_AttributePersistentRef.hxx + SALOMEDSImpl_AttributePixMap.hxx + SALOMEDSImpl_AttributePythonObject.hxx + SALOMEDSImpl_AttributeReal.hxx + SALOMEDSImpl_AttributeReference.hxx + SALOMEDSImpl_AttributeSelectable.hxx + SALOMEDSImpl_AttributeSequenceOfInteger.hxx + SALOMEDSImpl_AttributeSequenceOfReal.hxx + SALOMEDSImpl_Attributes.hxx + SALOMEDSImpl_AttributeStudyProperties.hxx + SALOMEDSImpl_AttributeTable.hxx + SALOMEDSImpl_AttributeTableOfInteger.hxx + SALOMEDSImpl_AttributeTableOfReal.hxx + SALOMEDSImpl_AttributeTableOfString.hxx + SALOMEDSImpl_AttributeTarget.hxx + SALOMEDSImpl_AttributeTextColor.hxx + SALOMEDSImpl_AttributeTextHighlightColor.hxx + SALOMEDSImpl_AttributeTreeNode.hxx + SALOMEDSImpl_AttributeUserID.hxx + SALOMEDSImpl_AttributeParameter.hxx + SALOMEDSImpl_AttributeString.hxx + SALOMEDSImpl_Callback.hxx + SALOMEDSImpl_ChildIterator.hxx + SALOMEDSImpl_ChildNodeIterator.hxx + SALOMEDSImpl_Defines.hxx + SALOMEDSImpl_Driver.hxx + SALOMEDSImpl_GenericAttribute.hxx + SALOMEDSImpl_SComponent.hxx + SALOMEDSImpl_SComponentIterator.hxx + SALOMEDSImpl_SObject.hxx + SALOMEDSImpl_StudyBuilder.hxx + SALOMEDSImpl_StudyHandle.hxx + SALOMEDSImpl_Study.hxx + SALOMEDSImpl_StudyManager.hxx + SALOMEDSImpl_Tool.hxx + SALOMEDSImpl_UseCaseBuilder.hxx + SALOMEDSImpl_UseCaseIterator.hxx + SALOMEDSImpl_GenericVariable.hxx + SALOMEDSImpl_ScalarVariable.hxx +) + +ADD_LIBRARY(SalomeDSImpl SHARED ${SalomeDSImpl_SOURCES}) +SET_TARGET_PROPERTIES(SalomeDSImpl PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SalomeDSImpl SALOMELocalTrace ${COMMON_LIBS} ${OMNIORB_LIBS} ${PLATFORM_LIBS}) +INSTALL(TARGETS SalomeDSImpl DESTINATION ${KERNEL_salomelib_LIBS}) + +ADD_EXECUTABLE(testDS testDS.cxx) +SET_TARGET_PROPERTIES(testDS PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(testDS SalomeDSImpl ${COMMON_LIBS} ${OMNIORB_LIBS} ${PLATFORM_LIBS}) +INSTALL(TARGETS testDS DESTINATION ${KERNEL_salomebin_BINS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +SET(NOINST_HEADERS_HXX + SALOMEDSImpl_Tool.hxx + SALOMEDSImpl_StudyHandle.hxx +) +FOREACH(HEADER ${NOINST_HEADERS_HXX}) + LIST(REMOVE_ITEM COMMON_HEADERS_HXX ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER}) +ENDFOREACH(HEADER ${NOINST_HEADERS_HXX}) +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/SALOMEDSImpl/Test/CMakeLists.txt b/src/SALOMEDSImpl/Test/CMakeLists.txt new file mode 100755 index 000000000..d5397c2f0 --- /dev/null +++ b/src/SALOMEDSImpl/Test/CMakeLists.txt @@ -0,0 +1,79 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} + ${CPPUNIT_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../NamingService + ${CMAKE_CURRENT_SOURCE_DIR}/../../NamingService/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../Utils + ${CMAKE_CURRENT_SOURCE_DIR}/../../Utils/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../ResourcesManager + ${CMAKE_CURRENT_SOURCE_DIR}/../../LifeCycleCORBA + ${CMAKE_CURRENT_SOURCE_DIR}/../../DF + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMEDSImpl + ${CMAKE_BINARY_DIR}/idl +) + +# This local variable defines the list of FLAGS common to all target in this package. +SET(COMMON_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}") + +# This local variable defines the list of dependant libraries common to all target in this package. +SET(COMMON_LIBS + ${CPPUNIT_LIBS} + SALOMEBasics + SalomeResourcesManager + SalomeContainer + SalomeNS + Registry + SalomeNotification + UtilsTest + OpUtil + SALOMELocalTraceTest + SALOMELocalTrace + SALOMETraceCollectorTest + DF + SalomeDSImpl + SalomeHDFPersist + SalomeIDLKernel +) + +ADD_LIBRARY(SALOMEDSImplTest SHARED SALOMEDSImplTest.cxx) +SET_TARGET_PROPERTIES(SALOMEDSImplTest PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SALOMEDSImplTest ${COMMON_LIBS}) +INSTALL(TARGETS SALOMEDSImplTest DESTINATION ${KERNEL_salomelib_LIBS}) + +ADD_EXECUTABLE(TestSALOMEDSImpl TestSALOMEDSImpl.cxx) +SET_TARGET_PROPERTIES(TestSALOMEDSImpl PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(TestSALOMEDSImpl SALOMEDSImplTest SalomeDSImpl NamingServiceTest ${COMMON_LIBS}) +INSTALL(TARGETS TestSALOMEDSImpl DESTINATION ${KERNEL_salomebin_BINS}) + +# Executable scripts to be installed +SALOME_INSTALL_SCRIPTS(TestSALOMEDSImpl.py ${KERNEL_salomescript_PYTHON}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/SALOMEDSImpl/Test/SALOMEDSImplTest.hxx b/src/SALOMEDSImpl/Test/SALOMEDSImplTest.hxx index 07944d285..826e13afc 100644 --- a/src/SALOMEDSImpl/Test/SALOMEDSImplTest.hxx +++ b/src/SALOMEDSImpl/Test/SALOMEDSImplTest.hxx @@ -25,7 +25,17 @@ #include -class SALOMEDSImplTest : public CppUnit::TestFixture +#ifdef WIN32 +# if defined SALOMEDSIMPLTEST_EXPORTS || defined SALOMEDSImplTest_EXPORTS +# define SALOMEDSIMPLTEST_EXPORT __declspec( dllexport ) +# else +# define SALOMEDSIMPLTEST_EXPORT __declspec( dllimport ) +# endif +#else +# define SALOMEDSIMPLTEST_EXPORT +#endif + +class SALOMEDSIMPLTEST_EXPORT SALOMEDSImplTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE( SALOMEDSImplTest ); CPPUNIT_TEST( testAttributeParameter ); diff --git a/src/SALOMELocalTrace/CMakeLists.txt b/src/SALOMELocalTrace/CMakeLists.txt new file mode 100755 index 000000000..6ac53683f --- /dev/null +++ b/src/SALOMELocalTrace/CMakeLists.txt @@ -0,0 +1,49 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${PTHREAD_INCLUDE_DIRS} +) + +SET(COMMON_HEADERS + utilities.h + LocalTraceBufferPool.hxx + BaseTraceCollector.hxx + SALOME_LocalTrace.hxx +) + +SET(SALOMELocalTrace_SOURCES + BaseTraceCollector.cxx + BaseTraceCollector.hxx + LocalTraceCollector.cxx + LocalTraceCollector.hxx + FileTraceCollector.cxx + FileTraceCollector.hxx + LocalTraceBufferPool.cxx + LocalTraceBufferPool.hxx + SALOME_LocalTrace.hxx +) + +ADD_LIBRARY(SALOMELocalTrace SHARED ${SALOMELocalTrace_SOURCES}) +SET_TARGET_PROPERTIES(SALOMELocalTrace PROPERTIES COMPILE_FLAGS "${PTHREAD_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SALOMELocalTrace SALOMEBasics ${PLATFORM_LIBS} ${PTHREAD_LIBS}) +INSTALL(TARGETS SALOMELocalTrace DESTINATION ${KERNEL_salomelib_LIBS}) + +INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/SALOMELocalTrace/Test/CMakeLists.txt b/src/SALOMELocalTrace/Test/CMakeLists.txt new file mode 100755 index 000000000..a80528ca3 --- /dev/null +++ b/src/SALOMELocalTrace/Test/CMakeLists.txt @@ -0,0 +1,42 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${CPPUNIT_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace +) + +ADD_LIBRARY(SALOMELocalTraceTest SHARED SALOMELocalTraceTest.cxx) +SET_TARGET_PROPERTIES(SALOMELocalTraceTest PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PTHREAD_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SALOMELocalTraceTest SALOMELocalTrace ${CPPUNIT_LIBS} ${PTHREAD_LIBS} ${PLATFORM_LIBS}) +INSTALL(TARGETS SALOMELocalTraceTest DESTINATION ${KERNEL_salomelib_LIBS}) + +ADD_EXECUTABLE(TestSALOMELocalTrace TestSALOMELocalTrace.cxx) +SET_TARGET_PROPERTIES(TestSALOMELocalTrace PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(TestSALOMELocalTrace SALOMELocalTraceTest SALOMELocalTrace SALOMEBasics ${CPPUNIT_LIBS} ${PLATFORM_LIBS}) +INSTALL(TARGETS TestSALOMELocalTrace DESTINATION ${KERNEL_salomebin_BINS}) + +# Executable scripts to be installed +SALOME_INSTALL_SCRIPTS(TestSALOMELocalTrace.py ${KERNEL_salomescript_PYTHON}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/SALOMELocalTrace/Test/SALOMELocalTraceTest.cxx b/src/SALOMELocalTrace/Test/SALOMELocalTraceTest.cxx index 0e685195c..7d9747cf5 100644 --- a/src/SALOMELocalTrace/Test/SALOMELocalTraceTest.cxx +++ b/src/SALOMELocalTrace/Test/SALOMELocalTraceTest.cxx @@ -28,7 +28,11 @@ #include #include "LocalTraceBufferPool.hxx" #include "utilities.h" +#include "Basics_Utils.hxx" +#ifdef WIN32 +#define setenv Kernel_Utils::setenv +#endif // ============================================================================ /*! @@ -100,11 +104,10 @@ SALOMELocalTraceTest::testLoadBufferPoolLocal() std::string s = "local"; CPPUNIT_ASSERT(! setenv("SALOME_trace",s.c_str(),1)); // 1: overwrite - // --- numThread thread creation for trace generation. - int numThread = 2; - pthread_t threads[numThread]; + // --- NUM_THREADS thread creation for trace generation. + pthread_t threads[NUM_THREADS]; int rc, t; - for(t=0;t -class SALOMELocalTraceTest : public CppUnit::TestFixture +#ifdef WIN32 +# if defined SALOMELOCALTRACETEST_EXPORTS || defined SALOMELocalTraceTest_EXPORTS +# define SALOMELOCALTRACETEST_EXPORT __declspec( dllexport ) +# else +# define SALOMELOCALTRACETEST_EXPORT __declspec( dllimport ) +# endif +#else +# define SALOMELOCALTRACETEST_EXPORT +#endif + +class SALOMELOCALTRACETEST_EXPORT SALOMELocalTraceTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE( SALOMELocalTraceTest ); CPPUNIT_TEST( testSingletonBufferPool ); diff --git a/src/SALOMETraceCollector/CMakeLists.txt b/src/SALOMETraceCollector/CMakeLists.txt new file mode 100755 index 000000000..11da0038f --- /dev/null +++ b/src/SALOMETraceCollector/CMakeLists.txt @@ -0,0 +1,36 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_BINARY_DIR}/idl +) + +ADD_LIBRARY(with_loggerTraceCollector SHARED SALOMETraceCollector.cxx TraceCollector_WaitForServerReadiness.cxx) +SET_TARGET_PROPERTIES(with_loggerTraceCollector PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PTHREAD_DEFINITIONS} ${PLATFORM_DEFINITIONS}") + +TARGET_LINK_LIBRARIES(with_loggerTraceCollector SALOMELocalTrace SalomeIDLKernel ${OMNIORB_LIBS} ${PTHREAD_LIBS}) +INSTALL(TARGETS with_loggerTraceCollector DESTINATION ${KERNEL_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/SALOMETraceCollector/Test/CMakeLists.txt b/src/SALOMETraceCollector/Test/CMakeLists.txt new file mode 100755 index 000000000..570a8595d --- /dev/null +++ b/src/SALOMETraceCollector/Test/CMakeLists.txt @@ -0,0 +1,52 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${CPPUNIT_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector +) + +SET(COMMON_LIBS + SALOMELocalTraceTest + SALOMELocalTrace + SALOMEBasics + ${PTHREAD_LIBS} + ${PLATFORM_LIBS} +) + +ADD_LIBRARY(SALOMETraceCollectorTest SHARED SALOMETraceCollectorTest.cxx) +SET_TARGET_PROPERTIES(SALOMETraceCollectorTest PROPERTIES COMPILE_FLAGS "${PTHREAD_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SALOMETraceCollectorTest ${COMMON_LIBS}) +INSTALL(TARGETS SALOMETraceCollectorTest DESTINATION ${KERNEL_salomelib_LIBS}) + +ADD_EXECUTABLE(TestSALOMETraceCollector TestSALOMETraceCollector.cxx) +SET_TARGET_PROPERTIES(TestSALOMETraceCollector PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(TestSALOMETraceCollector SALOMETraceCollectorTest ${COMMON_LIBS}) +INSTALL(TARGETS TestSALOMETraceCollector DESTINATION ${KERNEL_salomebin_BINS}) + +# Executable scripts to be installed +SALOME_INSTALL_SCRIPTS(TestSALOMETraceCollector.py ${KERNEL_salomescript_PYTHON}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.cxx b/src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.cxx index 61c0ee91b..4a448f8ba 100644 --- a/src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.cxx +++ b/src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.cxx @@ -28,7 +28,11 @@ #include #include "LocalTraceBufferPool.hxx" #include "utilities.h" +#include "Basics_Utils.hxx" +#ifdef WIN32 +#define setenv Kernel_Utils::setenv +#endif // ============================================================================ /*! @@ -109,4 +113,7 @@ void *PrintHello(void *threadid) << " - iter " << i); #endif pthread_exit(NULL); + #ifdef WIN32 + return NULL; + #endif } diff --git a/src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.hxx b/src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.hxx index 78009a065..ebfedb099 100644 --- a/src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.hxx +++ b/src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.hxx @@ -25,7 +25,17 @@ #include -class SALOMETraceCollectorTest : public CppUnit::TestFixture +#ifdef WIN32 +# if defined SALOMETRACECOLLECTORTEST_EXPORTS || defined SALOMETraceCollectorTest_EXPORTS +# define SALOMETRACECOLLECTORTEST_EXPORT __declspec( dllexport ) +# else +# define SALOMETRACECOLLECTORTEST_EXPORT __declspec( dllimport ) +# endif +#else +# define SALOMETRACECOLLECTORTEST_EXPORT +#endif + +class SALOMETRACECOLLECTORTEST_EXPORT SALOMETraceCollectorTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE( SALOMETraceCollectorTest ); CPPUNIT_TEST( testLoadBufferPoolCORBA ); diff --git a/src/TOOLSDS/CMakeLists.txt b/src/TOOLSDS/CMakeLists.txt new file mode 100755 index 000000000..a56319d18 --- /dev/null +++ b/src/TOOLSDS/CMakeLists.txt @@ -0,0 +1,38 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIRS} + ${HDF5_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../Utils + ${CMAKE_BINARY_DIR}/idl +) + +ADD_LIBRARY(TOOLSDS SHARED SALOMEDS_Tool.cxx) +SET_TARGET_PROPERTIES(TOOLSDS PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(TOOLSDS OpUtil SalomeIDLKernel ${OMNIORB_LIBS}) +INSTALL(TARGETS TOOLSDS DESTINATION ${KERNEL_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/TestContainer/CMakeLists.txt b/src/TestContainer/CMakeLists.txt new file mode 100755 index 000000000..193e53071 --- /dev/null +++ b/src/TestContainer/CMakeLists.txt @@ -0,0 +1,74 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService + ${CMAKE_CURRENT_SOURCE_DIR}/../Utils + ${CMAKE_CURRENT_SOURCE_DIR}/../Registry + ${CMAKE_CURRENT_SOURCE_DIR}/../Notification + ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager + ${CMAKE_CURRENT_SOURCE_DIR}/../Container + ${CMAKE_CURRENT_SOURCE_DIR}/../GenericObj + ${CMAKE_BINARY_DIR}/idl +) + +SET(SalomeTestComponentEngine_SOURCES + SALOME_TestComponent.hxx + SALOME_TestComponent_i.cxx + SALOME_TestComponent_i.hxx +) + +SET(COMMON_LIBS + SalomeContainer + Registry + SalomeNotification + SalomeResourcesManager + SalomeNS + SALOMELocalTrace + SALOMEBasics + SalomeGenericObj + SalomeIDLKernel +) + +ADD_LIBRARY(SalomeTestComponentEngine SHARED ${SalomeTestComponentEngine_SOURCES}) +SET_TARGET_PROPERTIES(SalomeTestComponentEngine PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeTestComponentEngine ${COMMON_LIBS}) +INSTALL(TARGETS SalomeTestComponentEngine DESTINATION ${KERNEL_salomelib_LIBS}) + +ADD_EXECUTABLE(TestLogger TestLogger.cxx) +SET_TARGET_PROPERTIES(TestLogger PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(TestLogger SalomeTestComponentEngine SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBS}) + +ADD_EXECUTABLE(TestContainer TestContainer.cxx) +SET_TARGET_PROPERTIES(TestContainer PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(TestContainer SalomeTestComponentEngine SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBS}) +INSTALL(TARGETS TestLogger TestContainer DESTINATION ${KERNEL_salomebin_BINS}) + +# Executable scripts to be installed +SET(SCRIPTS + SALOME_TestComponentPy.py + TestComponentPy.py + TestLogger.py +) +SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${KERNEL_salomescript_PYTHON}) diff --git a/src/TestMPIContainer/CMakeLists.txt b/src/TestMPIContainer/CMakeLists.txt new file mode 100755 index 000000000..8ca5c698a --- /dev/null +++ b/src/TestMPIContainer/CMakeLists.txt @@ -0,0 +1,65 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${MPI_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService + ${CMAKE_CURRENT_SOURCE_DIR}/../Utils + ${CMAKE_CURRENT_SOURCE_DIR}/../Registry + ${CMAKE_CURRENT_SOURCE_DIR}/../Notification + ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager + ${CMAKE_CURRENT_SOURCE_DIR}/../Container + ${CMAKE_CURRENT_SOURCE_DIR}/../MPIContainer + ${CMAKE_CURRENT_SOURCE_DIR}/../GenericObj + ${CMAKE_BINARY_DIR}/idl +) + +SET(COMMON_FLAGS "${OMNIORB_DEFINITIONS} ${MPI_DEFINITIONS}") + +SET(COMMON_LIBS + Registry + SalomeNotification + SalomeResourcesManager + SalomeNS + OpUtil + SALOMELocalTrace + SALOMEBasics + SalomeContainer + SalomeMPIContainer + SalomeGenericObj + SalomeIDLKernel + ${OMNIORB_LIBS} +) + +ADD_LIBRARY(SalomeTestMPIComponentEngine SHARED TestMPIComponentEngine.cxx) +SET_TARGET_PROPERTIES(SalomeTestMPIComponentEngine PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SalomeTestMPIComponentEngine ${COMMON_LIBS}) +INSTALL(TARGETS SalomeTestMPIComponentEngine DESTINATION ${KERNEL_salomelib_LIBS}) + +ADD_EXECUTABLE(TestMPIContainer TestMPIContainer.cxx) +SET_TARGET_PROPERTIES(TestMPIContainer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(TestMPIContainer SalomeTestMPIComponentEngine ${COMMON_LIBS} ${MPI_LIBS}) +INSTALL(TARGETS TestMPIContainer DESTINATION ${KERNEL_salomebin_BINS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/UnitTests/CMakeLists.txt b/src/UnitTests/CMakeLists.txt new file mode 100755 index 000000000..a9de09ecd --- /dev/null +++ b/src/UnitTests/CMakeLists.txt @@ -0,0 +1,96 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} + ${CPPUNIT_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace/Test +) + +# =============================================================== +# Files to be installed +# =============================================================== + +# Executable scripts to be installed +SALOME_INSTALL_SCRIPTS(UnitTests.py ${KERNEL_salomescript_SCRIPTS}) + +# =============================================================== +# Executables targets +# =============================================================== + +SET(COMMON_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS + ${CPPUNIT_LIBS} + SALOMEBasics + SALOMELocalTrace + SALOMELocalTraceTest +) + +IF(CORBA_GEN) + INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMETraceCollector + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMETraceCollector/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService + ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../Utils + ${CMAKE_CURRENT_SOURCE_DIR}/../Utils/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../LifeCycleCORBA + ${CMAKE_CURRENT_SOURCE_DIR}/../LifeCycleCORBA/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMDESImpl + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMEDSImpl/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMDES + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMEDS/Test + ${CMAKE_BINARY_DIR}/idl + ${CMAKE_CURRENT_SOURCE_DIR}/../Registry + ${CMAKE_CURRENT_SOURCE_DIR}/../Notification + ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager + ) + SET(COMMON_FLAGS "${COMMON_FLAGS} -DWITH_CORBA ${OMNIORB_DEFINITIONS}") + + SET(COMMON_LIBS + ${COMMON_LIBS} + Registry + SalomeNotification + SalomeResourcesManager + SalomeNS + NamingServiceTest + SalomeContainer + SALOMETraceCollectorTest + OpUtil + UtilsTest + SalomeLifeCycleCORBA + LifeCycleCORBATest + SalomeDSImpl + SALOMEDSImplTest + SalomeDS + SALOMEDSTest + SalomeIDLKernel + ${OMNIORB_LIBS} + ) +ENDIF(CORBA_GEN) + +ADD_EXECUTABLE(UnitTests UnitTests.cxx) +SET_TARGET_PROPERTIES(UnitTests PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(UnitTests ${COMMON_LIBS}) +INSTALL(TARGETS UnitTests DESTINATION ${KERNEL_salomebin_BINS}) diff --git a/src/Utils/CMakeLists.txt b/src/Utils/CMakeLists.txt new file mode 100755 index 000000000..ca3adcd93 --- /dev/null +++ b/src/Utils/CMakeLists.txt @@ -0,0 +1,53 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/salome_adm/unix + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace + ${CMAKE_BINARY_DIR}/idl +) +SET(OpUtil_SOURCES + Utils_Timer.cxx + duplicate.cxx + Utils_CommException.cxx + Utils_SALOME_Exception.cxx + Utils_Identity.cxx + Utils_ORB_INIT.cxx + Utils_DESTRUCTEUR_GENERIQUE.cxx + Utils_ExceptHandlers.cxx + Utils_Mutex.cxx +) + +ADD_LIBRARY(OpUtil SHARED ${OpUtil_SOURCES}) +SET_TARGET_PROPERTIES(OpUtil PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PTHREAD_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(OpUtil SALOMELocalTrace SalomeIDLKernel ${OMNIORB_LIBS} ${PTHREAD_LIBS}) +INSTALL(TARGETS OpUtil DESTINATION ${KERNEL_salomelib_LIBS}) + +SET(COMMON_SCRIPTS + Utils_Identity.py + SALOME_utilities.py +) +SALOME_INSTALL_SCRIPTS("${COMMON_SCRIPTS}" ${KERNEL_salomescript_PYTHON}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/Utils/Test/CMakeLists.txt b/src/Utils/Test/CMakeLists.txt new file mode 100755 index 000000000..73f5f6bfe --- /dev/null +++ b/src/Utils/Test/CMakeLists.txt @@ -0,0 +1,55 @@ +# Copyright (C) 2012 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 +# + +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} + ${CPPUNIT_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics + ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector + ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector/Test + ${CMAKE_CURRENT_SOURCE_DIR}/../../Utils + ${CMAKE_CURRENT_SOURCE_DIR}/../../Utils/Test +) + +SET(COMMON_LIBS + ${CPPUNIT_LIBS} + OpUtil + SALOMELocalTraceTest + SALOMELocalTrace + SALOMETraceCollectorTest + SALOMEBasics +) + +ADD_LIBRARY(UtilsTest SHARED UtilsTest.cxx) +SET_TARGET_PROPERTIES(UtilsTest PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(UtilsTest ${COMMON_LIBS} ${PLATFORM_LIBS}) +INSTALL(TARGETS UtilsTest DESTINATION ${KERNEL_salomelib_LIBS}) + +ADD_EXECUTABLE(TestUtils TestUtils.cxx) +SET_TARGET_PROPERTIES(TestUtils PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(TestUtils ${COMMON_LIBS} UtilsTest ${OMNIORB_LIBS} ${PLATFORM_LIBS}) +INSTALL(TARGETS TestUtils DESTINATION ${KERNEL_salomebin_BINS}) + +SALOME_INSTALL_SCRIPTS(TestUtils.py ${KERNEL_salomescript_PYTHON}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS}) diff --git a/src/Utils/Test/UtilsTest.cxx b/src/Utils/Test/UtilsTest.cxx index b5d8fb506..de2a9b78d 100644 --- a/src/Utils/Test/UtilsTest.cxx +++ b/src/Utils/Test/UtilsTest.cxx @@ -27,8 +27,12 @@ #include #include #include "Utils_SALOME_Exception.hxx" +#include "Basics_Utils.hxx" #include "utilities.h" +#ifdef WIN32 +#define setenv Kernel_Utils::setenv +#endif #define TRACEFILE "/tmp/traceUnitTest.log" diff --git a/src/Utils/Test/UtilsTest.hxx b/src/Utils/Test/UtilsTest.hxx index 9724e2609..5c320c432 100644 --- a/src/Utils/Test/UtilsTest.hxx +++ b/src/Utils/Test/UtilsTest.hxx @@ -25,7 +25,17 @@ #include -class UtilsTest : public CppUnit::TestFixture +#ifdef WIN32 +# if defined UTILSTEST_EXPORTS || defined UtilsTest_EXPORTS +# define UTILSTEST_EXPORT __declspec( dllexport ) +# else +# define UTILSTEST_EXPORT __declspec( dllimport ) +# endif +#else +# define UTILSTEST_EXPORT +#endif + +class UTILSTEST_EXPORT UtilsTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE( UtilsTest ); CPPUNIT_TEST( testSALOME_ExceptionThrow );