From 991804e5e6def86ec8f17019e3dab9f3785431ba Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 8 Oct 2012 10:26:14 +0000 Subject: [PATCH] Merge from V6_main (04/10/2012) --- CMakeLists.txt | 108 +++++++ bin/CMakeLists.txt | 68 +++++ bin/appliskel/CMakeLists.txt | 39 +++ bin/launchConfigureParser.py | 41 ++- configure.ac | 2 +- doc/CMakeLists.txt | 21 ++ doc/salome/CMakeLists.txt | 21 ++ doc/salome/gui/CMakeLists.txt | 35 +++ doc/salome/kernel_salome.dox | 21 +- doc/salome/main.dox | 5 +- doc/salome/running_salome.dox | 115 ++++++++ doc/salome/tui/CMakeLists.txt | 36 +++ idl/CMakeLists.txt | 95 +++++++ resources/CMakeLists.txt | 40 +++ salome_adm/CMakeLists.txt | 28 ++ salome_adm/Makefile.am | 23 ++ salome_adm/{unix => }/SALOMEconfig.ref.in | 0 salome_adm/cmake_files/CMakeLists.txt | 50 ++++ salome_adm/cmake_files/FindCPPUNIT.cmake | 10 +- salome_adm/cmake_files/FindLIBBATCH.cmake | 3 +- salome_adm/cmake_files/FindMPI.cmake | 12 +- salome_adm/cmake_files/FindPLATFORM.cmake | 45 ++- salome_adm/cmake_files/FindPTHREADS.cmake | 3 +- salome_adm/cmake_files/FindSPHINX.cmake | 9 +- salome_adm/cmake_files/SalomeMacros.cmake | 159 +++++++++++ salome_adm/cmake_files/UseOMNIORB.cmake | 15 +- salome_adm/cmake_files/am2cmake.py | 13 +- salome_adm/unix/Makefile.am | 22 -- salome_adm/unix/make_common_starter.am | 4 +- src/Basics/Basics_Utils.cxx | 12 + src/Basics/Basics_Utils.hxx | 4 + src/Basics/CMakeLists.txt | 41 +++ src/Basics/Test/CMakeLists.txt | 20 ++ src/CMakeLists.txt | 119 ++++++++ src/Communication/CMakeLists.txt | 71 +++++ src/Communication_SWIG/CMakeLists.txt | 62 ++++ src/Container/CMakeLists.txt | 121 ++++++++ src/DF/CMakeLists.txt | 50 ++++ src/DSC/CMakeLists.txt | 45 +++ src/DSC/DSC_Basic/CMakeLists.txt | 64 +++++ src/DSC/DSC_Python/CMakeLists.txt | 67 +++++ src/DSC/DSC_User/Basic/CMakeLists.txt | 45 +++ src/DSC/DSC_User/CMakeLists.txt | 58 ++++ src/DSC/DSC_User/Datastream/CMakeLists.txt | 54 ++++ .../Datastream/Calcium/CMakeLists.txt | 89 ++++++ .../DSC_User/Datastream/Palm/CMakeLists.txt | 44 +++ src/DSC/ParallelDSC/CMakeLists.txt | 54 ++++ src/GenericObj/CMakeLists.txt | 35 +++ src/HDFPersist/CMakeLists.txt | 84 ++++++ src/HDFPersist/HDFascii.cc | 2 +- src/KERNEL_PY/CMakeLists.txt | 49 ++++ src/KERNEL_PY/kernel/CMakeLists.txt | 49 ++++ .../kernel/parametric/CMakeLists.txt | 28 ++ src/KernelHelpers/CMakeLists.txt | 65 +++++ src/KernelHelpers/Test/CMakeLists.txt | 68 +++++ .../Test/KernelHelpersUnitTests.hxx | 12 +- src/Launcher/CMakeLists.txt | 122 ++++++++ src/LifeCycleCORBA/CMakeLists.txt | 67 +++++ src/LifeCycleCORBA/Test/CMakeLists.txt | 72 +++++ .../Test/LifeCycleCORBATest.cxx | 3 + .../Test/LifeCycleCORBATest.hxx | 12 +- src/LifeCycleCORBA_SWIG/CMakeLists.txt | 57 ++++ src/LifeCycleCORBA_SWIG/Test/CMakeLists.txt | 27 ++ src/Logger/CMakeLists.txt | 53 ++++ src/Logger/Test/CMakeLists.txt | 21 ++ src/MPIContainer/CMakeLists.txt | 69 +++++ src/MPIContainer/MPIContainer_i.cxx | 5 + src/ModuleCatalog/CMakeLists.txt | 68 +++++ src/ModuleGenerator/CMakeLists.txt | 25 ++ src/NOTIFICATION_SWIG/CMakeLists.txt | 50 ++++ src/NamingService/CMakeLists.txt | 45 +++ src/NamingService/Test/CMakeLists.txt | 70 +++++ src/NamingService/Test/NamingServiceTest.cxx | 5 + src/NamingService/Test/NamingServiceTest.hxx | 14 +- src/Notification/CMakeLists.txt | 49 ++++ src/ParallelContainer/CMakeLists.txt | 106 +++++++ src/Registry/CMakeLists.txt | 53 ++++ src/ResourcesManager/CMakeLists.txt | 64 +++++ src/SALOMEDS/CMakeLists.txt | 269 ++++++++++++++++++ src/SALOMEDS/Test/CMakeLists.txt | 87 ++++++ src/SALOMEDS/Test/SALOMEDSTest.hxx | 14 +- src/SALOMEDS/Test/TestSALOMEDS.cxx | 12 +- src/SALOMEDSClient/CMakeLists.txt | 33 +++ src/SALOMEDSImpl/CMakeLists.txt | 169 +++++++++++ .../SALOMEDSImpl_UseCaseBuilder.cxx | 2 +- src/SALOMEDSImpl/Test/CMakeLists.txt | 79 +++++ src/SALOMEDSImpl/Test/SALOMEDSImplTest.hxx | 12 +- src/SALOMELocalTrace/CMakeLists.txt | 49 ++++ src/SALOMELocalTrace/Test/CMakeLists.txt | 42 +++ .../Test/SALOMELocalTraceTest.cxx | 16 +- .../Test/SALOMELocalTraceTest.hxx | 12 +- src/SALOMETraceCollector/CMakeLists.txt | 36 +++ src/SALOMETraceCollector/Test/CMakeLists.txt | 52 ++++ .../Test/SALOMETraceCollectorTest.cxx | 7 + .../Test/SALOMETraceCollectorTest.hxx | 12 +- src/TOOLSDS/CMakeLists.txt | 38 +++ src/TestContainer/CMakeLists.txt | 74 +++++ src/TestMPIContainer/CMakeLists.txt | 65 +++++ src/UnitTests/CMakeLists.txt | 96 +++++++ src/Utils/CMakeLists.txt | 53 ++++ src/Utils/Test/CMakeLists.txt | 55 ++++ src/Utils/Test/UtilsTest.cxx | 4 + src/Utils/Test/UtilsTest.hxx | 12 +- 103 files changed, 4711 insertions(+), 101 deletions(-) create mode 100755 CMakeLists.txt create mode 100755 bin/CMakeLists.txt create mode 100755 bin/appliskel/CMakeLists.txt create mode 100755 doc/CMakeLists.txt create mode 100755 doc/salome/CMakeLists.txt create mode 100755 doc/salome/gui/CMakeLists.txt create mode 100644 doc/salome/running_salome.dox create mode 100755 doc/salome/tui/CMakeLists.txt create mode 100755 idl/CMakeLists.txt create mode 100755 resources/CMakeLists.txt create mode 100755 salome_adm/CMakeLists.txt rename salome_adm/{unix => }/SALOMEconfig.ref.in (100%) mode change 100644 => 100755 create mode 100755 salome_adm/cmake_files/CMakeLists.txt create mode 100755 salome_adm/cmake_files/SalomeMacros.cmake create mode 100755 src/Basics/CMakeLists.txt create mode 100755 src/Basics/Test/CMakeLists.txt create mode 100755 src/CMakeLists.txt create mode 100755 src/Communication/CMakeLists.txt create mode 100755 src/Communication_SWIG/CMakeLists.txt create mode 100755 src/Container/CMakeLists.txt create mode 100755 src/DF/CMakeLists.txt create mode 100755 src/DSC/CMakeLists.txt create mode 100755 src/DSC/DSC_Basic/CMakeLists.txt create mode 100755 src/DSC/DSC_Python/CMakeLists.txt create mode 100755 src/DSC/DSC_User/Basic/CMakeLists.txt create mode 100755 src/DSC/DSC_User/CMakeLists.txt create mode 100755 src/DSC/DSC_User/Datastream/CMakeLists.txt create mode 100755 src/DSC/DSC_User/Datastream/Calcium/CMakeLists.txt create mode 100755 src/DSC/DSC_User/Datastream/Palm/CMakeLists.txt create mode 100755 src/DSC/ParallelDSC/CMakeLists.txt create mode 100755 src/GenericObj/CMakeLists.txt create mode 100755 src/HDFPersist/CMakeLists.txt create mode 100755 src/KERNEL_PY/CMakeLists.txt create mode 100755 src/KERNEL_PY/kernel/CMakeLists.txt create mode 100755 src/KERNEL_PY/kernel/parametric/CMakeLists.txt create mode 100755 src/KernelHelpers/CMakeLists.txt create mode 100755 src/KernelHelpers/Test/CMakeLists.txt create mode 100755 src/Launcher/CMakeLists.txt create mode 100755 src/LifeCycleCORBA/CMakeLists.txt create mode 100755 src/LifeCycleCORBA/Test/CMakeLists.txt create mode 100755 src/LifeCycleCORBA_SWIG/CMakeLists.txt create mode 100755 src/LifeCycleCORBA_SWIG/Test/CMakeLists.txt create mode 100755 src/Logger/CMakeLists.txt create mode 100755 src/Logger/Test/CMakeLists.txt create mode 100755 src/MPIContainer/CMakeLists.txt create mode 100755 src/ModuleCatalog/CMakeLists.txt create mode 100755 src/ModuleGenerator/CMakeLists.txt create mode 100755 src/NOTIFICATION_SWIG/CMakeLists.txt create mode 100755 src/NamingService/CMakeLists.txt create mode 100755 src/NamingService/Test/CMakeLists.txt create mode 100755 src/Notification/CMakeLists.txt create mode 100755 src/ParallelContainer/CMakeLists.txt create mode 100755 src/Registry/CMakeLists.txt create mode 100755 src/ResourcesManager/CMakeLists.txt create mode 100755 src/SALOMEDS/CMakeLists.txt create mode 100755 src/SALOMEDS/Test/CMakeLists.txt create mode 100755 src/SALOMEDSClient/CMakeLists.txt create mode 100755 src/SALOMEDSImpl/CMakeLists.txt create mode 100755 src/SALOMEDSImpl/Test/CMakeLists.txt create mode 100755 src/SALOMELocalTrace/CMakeLists.txt create mode 100755 src/SALOMELocalTrace/Test/CMakeLists.txt create mode 100755 src/SALOMETraceCollector/CMakeLists.txt create mode 100755 src/SALOMETraceCollector/Test/CMakeLists.txt create mode 100755 src/TOOLSDS/CMakeLists.txt create mode 100755 src/TestContainer/CMakeLists.txt create mode 100755 src/TestMPIContainer/CMakeLists.txt create mode 100755 src/UnitTests/CMakeLists.txt create mode 100755 src/Utils/CMakeLists.txt create mode 100755 src/Utils/Test/CMakeLists.txt 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/bin/launchConfigureParser.py b/bin/launchConfigureParser.py index 5ffb99b98..1bb30d33a 100755 --- a/bin/launchConfigureParser.py +++ b/bin/launchConfigureParser.py @@ -122,11 +122,18 @@ def version_id(fname): if len(vers) > 0: major = int(vers[0]) if len(vers) > 1: minor = int(vers[1]) if len(vers) > 2: - mr = re.search(r'^([0-9]+)([A-Za-z]?)([0-9]*)',vers[2]) + mr = re.search(r'^([0-9]+)([A-Z]|RC)?([0-9]*)',vers[2], re.I) if mr: release = int(mr.group(1)) - if mr.group(2).strip(): dev1 = ord(mr.group(2).strip()) - if mr.group(3).strip(): dev2 = int(mr.group(3).strip()) + if mr.group(2): + tag = mr.group(2).strip().lower() + if tag == "rc": + dev1 = 49 # release candidate + elif tag: + dev1 = ord(tag)-ord('a')+1 + pass + if mr.group(3): + dev2 = int(mr.group(3).strip()) pass pass dev = dev1 * 100 + dev2 @@ -134,15 +141,15 @@ def version_id(fname): ver = ver * 100 + minor ver = ver * 100 + release ver = ver * 10000 - if dev > 0: ver = ver - 10000 + dev + if dev > 0: ver = ver - dev return ver ### # Get default user configuration file name # For SALOME, it is: -# - on Linux: ~/.config/salome/.SalomeApprc.[version] -# - on Windows: ~/SalomeApp.xml.[version] -# where [version] is a version number +# - on Linux: ~/.config/salome/SalomeApprc[.] +# - on Windows: ~/SalomeApp.xml[.] +# where is an optional version number ### def defaultUserFile(appname=salomeappname, cfgname=salomecfgname): v = version() @@ -151,7 +158,7 @@ def defaultUserFile(appname=salomeappname, cfgname=salomecfgname): filename = os.path.join(getHomeDir(), "%s.xml%s" % (appname, v)) else: if cfgname: - filename = os.path.join(getHomeDir(), ".config", cfgname, ".%src%s" % (appname, v)) + filename = os.path.join(getHomeDir(), ".config", cfgname, "%src%s" % (appname, v)) pass else: filename = os.path.join(getHomeDir(), ".%src%s" % (appname, v)) @@ -185,18 +192,25 @@ def userFile(appname, cfgname): files = glob.glob(os.path.join(getHomeDir(), "%s.xml.*" % appname)) else: files = [] - if cfgname: files += glob.glob(os.path.join(getHomeDir(), ".config", cfgname, ".%src.*" % appname)) - files += glob.glob(os.path.join(getHomeDir(), ".%src.*" % appname)) + if cfgname: + # Since v6.6.0 - in ~/.config/salome directory, without dot prefix + files += glob.glob(os.path.join(getHomeDir(), ".config", cfgname, "%src.*" % appname)) + # Since v6.5.0 - in ~/.config/salome directory, dot-prefixed (backward compatibility) + files += glob.glob(os.path.join(getHomeDir(), ".config", cfgname, ".%src.*" % appname)) + pass + # old style (before v6.5.0) - in ~ directory, dot-prefixed + files += glob.glob(os.path.join(getHomeDir(), ".%src.*" % appname)) pass # ... loop through all files and find most appopriate file (with closest id) appr_id = -1 appr_file = "" for f in files: + ff = os.path.basename( f ) if sys.platform == "win32": - match = re.search( r'%s\.xml\.([a-zA-Z0-9.]+)$'%appname, f ) + match = re.search( r'^%s\.xml\.([a-zA-Z0-9.]+)$'%appname, ff ) else: - match = re.search( r'\.%src\.([a-zA-Z0-9.]+)$'%appname, f ) + match = re.search( r'^\.?%src\.([a-zA-Z0-9.]+)$'%appname, ff ) if match: ver = version_id(match.group(1)) if not ver: continue # bad version id -> skip file @@ -204,6 +218,9 @@ def userFile(appname, cfgname): appr_id = ver appr_file = f pass + elif abs(appr_id-id0) == abs(ver-id0): + if not os.path.basename(f).startswith("."): appr_file = f + pass pass pass return appr_file diff --git a/configure.ac b/configure.ac index 909d845a6..d3200df43 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/kernel_salome.dox b/doc/salome/kernel_salome.dox index 20acf889c..d36db176a 100644 --- a/doc/salome/kernel_salome.dox +++ b/doc/salome/kernel_salome.dox @@ -3,6 +3,18 @@ \page kernel_salome Using salome.py module +The Python module salome.py provides a functionality to access main +SALOME features from the Python console (either embedded in GUI +desktop or external one). + +To use salome.py module, import it into the Python interpreter and +initialize it by calling \c salome_init() function: + +\code +import salome +salome.salome_init() +\endcode + The salome.py Python module provides a set of variables and functions allowing access to different elements of the current SALOME session. @@ -284,13 +296,4 @@ name_1 = salome.generateName() # name_1 is something like "Study682" name_1 = salome.generateName("Obj") # name_1 is something like "Obj32" \endcode -\li \b sg SWIG interface to the SALOME GUI - -This variable provides an access to some GUI functions. - -\b Note, that this variable is only available if you use salome.py -Python module within the GUI desktop (since SWIG library is linked directly to the GUI library). -See GUI documentation for more information. - - */ diff --git a/doc/salome/main.dox b/doc/salome/main.dox index 20bbff443..eea5b33e9 100644 --- a/doc/salome/main.dox +++ b/doc/salome/main.dox @@ -15,8 +15,9 @@ introductory documentation, listed below. application on several computers. See \subpage SALOME_Application to define your own configuration of %SALOME and run it on one or several computers. This is the recommended way of configuration. --# How to launch %SALOME in a %SALOME application\n - See \ref SALOME_Application. +-# How to launch %SALOME: + - In a %SALOME application, see \ref SALOME_Application. + - Using \c runSalome script, see \subpage running_salome_page -# How to use KERNEL services in Python scripts\n The %SALOME KERNEL offers a list of services available in Python. See \subpage KERNEL_Services. -# How to use KERNEL services from a C++ context\n diff --git a/doc/salome/running_salome.dox b/doc/salome/running_salome.dox new file mode 100644 index 000000000..d6713a336 --- /dev/null +++ b/doc/salome/running_salome.dox @@ -0,0 +1,115 @@ +/*! + +\page running_salome_page Running Salome + +There are two ways to run %SALOME: + +1) Using Salome Application Concept approach. + +For more details see \ref SALOME_Application. + +2) Using \c %runSalome script supplied with %SALOME KERNEL module distribution. + +To launch %SALOME using \c %runSalome script, you have first to +set-up proper environment for %SALOME. If you installed %SALOME using +%SALOME Installation Wizard (Linux), you can use \c salome.sh or +\c salome.csh script (that is located in the \c KERNEL_<version> +directory of your %SALOME installation), for example: + +\code +cd /home/user/salome_6.5.0/KERNEL_6.5.0 +source salome.csh +\endcode + +Launch %SALOME session using the \c %runSalome script located +in the \c SALOME/KERNEL/bin/salome directory: + +\code +runSalome [options] [STUDY_FILE] [PYTHON_FILE [PYTHON_FILE ...]] +\endcode + +Optionally, you can specify in the command line: +- Study (document) file to be opened in %SALOME session passing; +- One or more Python scripts to be executed after %SALOME + start-up. Python scripts will be executed in the new or opened study + in the order they appear in the command line. + +The \c %runSalome script supports large set of options that allow +specifying the way to launch %SALOME session. Complete description of +all options can be obtained using \c --help or -h option: + +\code +runSalome --help +\endcode + +Here below is a description of most important options: + +- \c --help or \c -h + +Print detail help information on the \c %runSalome script. + +- \c --version + +Print version of %SALOME platform. + +- \c --gui or \c -g + +Launch %SALOME sesssion in GUI mode (with GUI desktop). + +- \c --terminal or \c -t + +Launch %SALOME session in terminal mode (without GUI). + +- \c --resources=<file> or \c -r \c <file> + +Parse application settings from the <file> instead of default resource +file. Default resource file is situated in user's home directory; for +example, for %SALOME version 6.5.0, the file is ${HOME}/.config/salome/.SalomeApprc.6.5.0 + +- \c --modules=module1,module2,... or \c -m=module1,module2,... + +Specify the list of modules which will be used in the %SALOME session +being launched. Note, that list of modules is separated be comma +symbols, with no any spaces. + +- \c --xterm or \c -x + +The servers open in separate terminal window and log messages are displayed in this window. + +- --embedded=registry,study,moduleCatalog,cppContainer/ or + -e=registry,study,moduleCatalog,cppContainer + +Run listed %SALOME servers in the GUI embedded mode (default value is +registry,study,moduleCatalog,cppContainer). Note that logger, +pyContainer, and supervContainer servers cannot be embedded to +GUI. Note, that this option implies running %SALOME in GUI mode (\c -g +option); in terminal mode all servers are running in standalone mode. + +- --standalone=registry,study,moduleCatalog,cppContainer,pyContainer,supervContainer or + -s=registry,study,moduleCatalog,cppContainer,pyContainer,supervContainer + +Standalone CORBA servers (default: pyContainer,supervContainer). + +- \c --portkill or \c -p + +Kill %SALOME session launched with the current port. + +- \c --killall or \c -k + +Kill (stop) all running %SALOME sessions before launching new session. + +- \c --splash=<1/0> or \c -z <1/0> + +Use 1 to display splash screen [default] at start-up, 0 to disable +splash screen. This option is ignored in the terminal mode. + +- \c --pinter + +Launch with interactive Python console. + +- --interp=n or -i=n + +Number of additional Python interpreters to open, with session +environment propely set-up. + +*/ 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/unix/SALOMEconfig.ref.in b/salome_adm/SALOMEconfig.ref.in old mode 100644 new mode 100755 similarity index 100% rename from salome_adm/unix/SALOMEconfig.ref.in rename to salome_adm/SALOMEconfig.ref.in 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/FindCPPUNIT.cmake b/salome_adm/cmake_files/FindCPPUNIT.cmake index 4193644cd..91594a7f8 100644 --- a/salome_adm/cmake_files/FindCPPUNIT.cmake +++ b/salome_adm/cmake_files/FindCPPUNIT.cmake @@ -52,9 +52,13 @@ ENDIF(WITHOUT_CPPUNIT OR WITH_CPPUNIT STREQUAL 0) IF(CPPUNIT_STATUS) IF(WITH_CPPUNIT) SET(CPPUNIT_ROOT_USER ${WITH_CPPUNIT}) - ELSE(WITH_CPPUNIT) - SET(CPPUNIT_ROOT_USER $ENV{CPPUNIT_ROOT}) ENDIF(WITH_CPPUNIT) + IF(NOT CPPUNIT_ROOT_USER) + SET(CPPUNIT_ROOT_USER $ENV{CPPUNIT_ROOT}) + ENDIF(NOT CPPUNIT_ROOT_USER) + IF(NOT CPPUNIT_ROOT_USER) + SET(CPPUNIT_ROOT_USER $ENV{CPPUNITHOME}) + ENDIF(NOT CPPUNIT_ROOT_USER) ENDIF(CPPUNIT_STATUS) # ----- @@ -92,7 +96,7 @@ IF(CPPUNIT_STATUS) IF(CPPUNIT_ROOT_USER) MESSAGE(STATUS "${CPPUNIT_INCLUDE_TO_FIND} not found in ${CPPUNIT_INCLUDE_PATHS}, check your CPPUNIT installation.") ELSE(CPPUNIT_ROOT_USER) - MESSAGE(STATUS "${CPPUNIT_INCLUDE_TO_FIND} not found on system, try to use WITH_CPPUNIT option or CPPUNIT_ROOT environment variable.") + MESSAGE(STATUS "${CPPUNIT_INCLUDE_TO_FIND} not found on system, try to use WITH_CPPUNIT option or CPPUNIT_ROOT (or CPPUNITHOME) environment variable.") ENDIF(CPPUNIT_ROOT_USER) ENDIF(CPPUNIT_INCLUDE_DIR) ENDIF(CPPUNIT_STATUS) diff --git a/salome_adm/cmake_files/FindLIBBATCH.cmake b/salome_adm/cmake_files/FindLIBBATCH.cmake index 6ebfb6891..aee305de4 100644 --- a/salome_adm/cmake_files/FindLIBBATCH.cmake +++ b/salome_adm/cmake_files/FindLIBBATCH.cmake @@ -79,7 +79,8 @@ IF(LIBBATCH_STATUS) FIND_PATH(LIBBATCH_INCLUDE_DIR ${LIBBATCH_INCLUDE_TO_FIND} PATHS ${LIBBATCH_INCLUDE_PATHS} ${LIBBATCH_FIND_PATHS_OPTION}) IF(LIBBATCH_INCLUDE_DIR) IF(LIBBATCH_ROOT_USER) - SET(LIBBATCH_INCLUDES -I${LIBBATCH_INCLUDE_DIR}) + SET(LIBBATCH_INCLUDES -I${LIBBATCH_INCLUDE_DIR}) # to be removed + SET(LIBBATCH_INCLUDE_DIRS ${LIBBATCH_INCLUDE_DIR}) ENDIF(LIBBATCH_ROOT_USER) MESSAGE(STATUS "${LIBBATCH_INCLUDE_TO_FIND} found in ${LIBBATCH_INCLUDE_DIR}") ELSE(LIBBATCH_INCLUDE_DIR) diff --git a/salome_adm/cmake_files/FindMPI.cmake b/salome_adm/cmake_files/FindMPI.cmake index 8818c5fac..a0b4af227 100644 --- a/salome_adm/cmake_files/FindMPI.cmake +++ b/salome_adm/cmake_files/FindMPI.cmake @@ -81,12 +81,14 @@ IF(MPI_STATUS) ENDIF(NOT MPI_INCLUDES) GET_FILENAME_COMPONENT(MPI_ROOT ${MPI_INCLUDES} PATH) ENDIF(MPI_ROOT_USER) - - MESSAGE(STATUS "MPI include ${MPI_INCLUDE_TO_FIND} found in ${MPI_INCLUDES}") - SET(MPI_INCLUDE_DIR ${MPI_INCLUDES}) - SET(MPI_INCLUDE_DIRS ${MPI_INCLUDES}) - SET(MPI_INCLUDES -I${MPI_INCLUDES})# to remove + IF(MPI_INCLUDES) + MESSAGE(STATUS "MPI include ${MPI_INCLUDE_TO_FIND} found in ${MPI_INCLUDES}") + + SET(MPI_INCLUDE_DIR ${MPI_INCLUDES}) + SET(MPI_INCLUDE_DIRS ${MPI_INCLUDES}) + SET(MPI_INCLUDES -I${MPI_INCLUDES})# to remove + ENDIF(MPI_INCLUDES) # ------ diff --git a/salome_adm/cmake_files/FindPLATFORM.cmake b/salome_adm/cmake_files/FindPLATFORM.cmake index b6a36caca..9266320ac 100644 --- a/salome_adm/cmake_files/FindPLATFORM.cmake +++ b/salome_adm/cmake_files/FindPLATFORM.cmake @@ -79,29 +79,46 @@ IF(CMAKE_BUILD_TYPE) ENDIF(WINDOWS) ENDIF(CMAKE_BUILD_TYPE) -SET(PLATFORM_CPPFLAGS) -SET(PLATFORM_LDFLAGS) -SET(PLATFORM_LIBADD) +SET(PLATFORM_CPPFLAGS) # to be removed +SET(PLATFORM_LDFLAGS) # to be removed +SET(PLATFORM_LIBADD) # to be removed + +SET(PLATFORM_LIBS) +SET(PLATFORM_DEFINITIONS) + IF(WINDOWS) - SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} /W0) - SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_CRT_SECURE_NO_WARNINGS) # To disable windows warnings for strcpy, fopen, ... - SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_SCL_SECURE_NO_WARNINGS) # To disable windows warnings std::copy, std::transform, ... - SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DWNT) - SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DPPRO_NT) # For medfile - SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_USE_MATH_DEFINES) # At least for MEDMEM - SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_WIN32_WINNT=0x0500) # Windows 2000 or later API is required - SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} Ws2_32.lib) - SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} Userenv.lib) # At least for GEOM suit + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} /W0) # to be removed + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_CRT_SECURE_NO_WARNINGS) # To disable windows warnings for strcpy, fopen, ... # to be removed + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_SCL_SECURE_NO_WARNINGS) # To disable windows warnings std::copy, std::transform, ... # to be removed + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DWNT) # to be removed + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DPPRO_NT) # For medfile # to be removed + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_USE_MATH_DEFINES) # At least for MEDMEM # to be removed + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_WIN32_WINNT=0x0500) # Windows 2000 or later API is required # to be removed + SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} Ws2_32.lib) # to be removed + SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} Userenv.lib) # At least for GEOM suit # to be removed + + SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} /W0") + SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_CRT_SECURE_NO_WARNINGS") # To disable windows warnings for strcpy, fopen, ... + SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_SCL_SECURE_NO_WARNINGS") # To disable windows warnings std::copy, std::transform, ... + SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -DWNT") + SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -DPPRO_NT") # For medfile + SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_USE_MATH_DEFINES") # At least for MEDMEM + SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_WIN32_WINNT=0x0500") # Windows 2000 or later API is required + SET(PLATFORM_LIBS ${PLATFORM_LIBS} Ws2_32.lib) + SET(PLATFORM_LIBS ${PLATFORM_LIBS} Userenv.lib) # At least for GEOM suit + ELSE(WINDOWS) # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wparentheses) # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wreturn-type) # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wmissing-declarations) # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wunused) # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wall) - SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} -ldl) + SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} -ldl) # to be removed + SET(PLATFORM_LIBS ${PLATFORM_LIBS} -ldl) ENDIF(WINDOWS) -SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_LONG=${CMAKE_SIZEOF_VOID_P} -DSIZEOF_INT=4) +SET(PLATFORM_CPPFLAGS "${PLATFORM_CPPFLAGS} -DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_LONG=${CMAKE_SIZEOF_VOID_P} -DSIZEOF_INT=4") # to be removed +SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_LONG=${CMAKE_SIZEOF_VOID_P} -DSIZEOF_INT=4") SET(COMPILATION_WITH_CMAKE ON) diff --git a/salome_adm/cmake_files/FindPTHREADS.cmake b/salome_adm/cmake_files/FindPTHREADS.cmake index f9ba97e55..ce8231e4a 100644 --- a/salome_adm/cmake_files/FindPTHREADS.cmake +++ b/salome_adm/cmake_files/FindPTHREADS.cmake @@ -79,7 +79,8 @@ IF(PTHREADS_STATUS) FIND_PATH(PTHREADS_INCLUDE_DIR ${PTHREADS_INCLUDE_TO_FIND} PATHS ${PTHREADS_INCLUDE_PATHS} ${PTHREADS_FIND_PATHS_OPTION}) IF(PTHREADS_INCLUDE_DIR) IF(PTHREADS_ROOT_USER) - SET(PTHREAD_CFLAGS -I${PTHREADS_INCLUDE_DIR}) + SET(PTHREAD_CFLAGS -I${PTHREADS_INCLUDE_DIR}) # to remove + SET(PTHREAD_INCLUDE_DIRS ${PTHREADS_INCLUDE_DIR}) ENDIF(PTHREADS_ROOT_USER) MESSAGE(STATUS "${PTHREADS_INCLUDE_TO_FIND} found in ${PTHREADS_INCLUDE_DIR}") ELSE(PTHREADS_INCLUDE_DIR) diff --git a/salome_adm/cmake_files/FindSPHINX.cmake b/salome_adm/cmake_files/FindSPHINX.cmake index 354b8194d..b8f972b17 100755 --- a/salome_adm/cmake_files/FindSPHINX.cmake +++ b/salome_adm/cmake_files/FindSPHINX.cmake @@ -75,7 +75,14 @@ IF(SPHINX_STATUS) FIND_PROGRAM(SPHINX_EXECUTABLE ${SPHINX_EXECUTABLE_TO_FIND}) ENDIF(SPHINX_ROOT_USER) IF(SPHINX_EXECUTABLE) - MESSAGE(STATUS "${SPHINX_EXECUTABLE_TO_FIND} found: ${SPHINX_EXECUTABLE}") + EXECUTE_PROCESS(COMMAND ${SPHINX_EXECUTABLE} -v ERROR_VARIABLE STATUS_CHECK_SPHINX) + STRING(REGEX MATCH "^Sphinx v[0-9]+\\.[0-9]+\\.[0-9]+" IS_SPHINX_USABLE ${STATUS_CHECK_SPHINX}) + IF(IS_SPHINX_USABLE) + MESSAGE(STATUS "${SPHINX_EXECUTABLE_TO_FIND} found: ${SPHINX_EXECUTABLE}") + ELSE(IS_SPHINX_USABLE) + MESSAGE(STATUS "${SPHINX_EXECUTABLE_TO_FIND} found but NOT usable ! Check coherency between your python and Sphinx ! Sphinx DISABLED !") + SET(SPHINX_STATUS 0) + ENDIF(IS_SPHINX_USABLE) ELSE(SPHINX_EXECUTABLE) MESSAGE(STATUS "${SPHINX_EXECUTABLE_TO_FIND} not found, try to use WITH_SPHINX option or SPHINX_ROOT (or SPHINXHOME) environment variable") SET(SPHINX_STATUS 0) diff --git a/salome_adm/cmake_files/SalomeMacros.cmake b/salome_adm/cmake_files/SalomeMacros.cmake new file mode 100755 index 000000000..b10f468db --- /dev/null +++ b/salome_adm/cmake_files/SalomeMacros.cmake @@ -0,0 +1,159 @@ +# 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 +# + +#---------------------------------------------------------------------------- +# LIST_CONTAINS is a macro useful for determining whether a list has a +# particular entry +#---------------------------------------------------------------------------- +MACRO(LIST_CONTAINS var value) + SET(${var}) + FOREACH(value2 ${ARGN}) + IF(${value} STREQUAL "${value2}") + SET(${var} TRUE) + ENDIF (${value} STREQUAL "${value2}") + ENDFOREACH (value2) +ENDMACRO(LIST_CONTAINS) + +#---------------------------------------------------------------------------- +# The PARSE_ARGUMENTS macro will take the arguments of another macro and +# define several variables. +# +# USAGE: PARSE_ARGUMENTS(prefix arg_names options arg1 arg2...) +# +# ARGUMENTS: +# +# prefix: IN: a prefix to put on all variables it creates. +# +# arg_names: IN: a list of names. +# For each item in arg_names, PARSE_ARGUMENTS will create a +# variable with that name, prefixed with prefix_. Each variable will be filled +# with the arguments that occur after the given arg_name is encountered +# up to the next arg_name or the end of the arguments. All options are +# removed from these lists. PARSE_ARGUMENTS also creates a +# prefix_DEFAULT_ARGS variable containing the list of all arguments up +# to the first arg_name encountered. +# +# options: IN: a list of options. +# For each item in options, PARSE_ARGUMENTS will create a +# variable with that name, prefixed with prefix_. So, for example, if prefix is +# MY_MACRO and options is OPTION1;OPTION2, then PARSE_ARGUMENTS will +# create the variables MY_MACRO_OPTION1 and MY_MACRO_OPTION2. These +# variables will be set to true if the option exists in the command line +# or false otherwise. +# arg_names and options lists should be quoted. +# +# The rest of PARSE_ARGUMENTS are arguments from another macro to be parsed. +#---------------------------------------------------------------------------- +MACRO(PARSE_ARGUMENTS prefix arg_names option_names) + SET(DEFAULT_ARGS) + FOREACH(arg_name ${arg_names}) + SET(${prefix}_${arg_name}) + ENDFOREACH(arg_name) + FOREACH(option ${option_names}) + SET(${prefix}_${option} FALSE) + ENDFOREACH(option) + SET(current_arg_name DEFAULT_ARGS) + SET(current_arg_list) + FOREACH(arg ${ARGN}) + LIST_CONTAINS(is_arg_name ${arg} ${arg_names}) + IF (is_arg_name) + SET(${prefix}_${current_arg_name} ${current_arg_list}) + SET(current_arg_name ${arg}) + SET(current_arg_list) + ELSE (is_arg_name) + LIST_CONTAINS(is_option ${arg} ${option_names}) + IF (is_option) + SET(${prefix}_${arg} TRUE) + ELSE (is_option) + SET(current_arg_list ${current_arg_list} ${arg}) + ENDIF (is_option) + ENDIF (is_arg_name) + ENDFOREACH(arg) + SET(${prefix}_${current_arg_name} ${current_arg_list}) +ENDMACRO(PARSE_ARGUMENTS) + +#---------------------------------------------------------------------------- +# SALOME_INSTALL_SCRIPTS is a macro useful for installing scripts. +# +# USAGE: SALOME_INSTALL_SCRIPTS(file_list path [DEF_PERMS]) +# +# ARGUMENTS: +# file_list: IN : list of files to be installed. This list should be quoted. +# path: IN : full pathname for installing. +# +# By default files to be installed as executable scripts. +# If DEF_PERMS option is provided, than permissions for installed files are +# only OWNER_WRITE, OWNER_READ, GROUP_READ, and WORLD_READ. +#---------------------------------------------------------------------------- +MACRO(SALOME_INSTALL_SCRIPTS file_list path) + PARSE_ARGUMENTS(SALOME_INSTALL_SCRIPTS "" "DEF_PERMS" ${ARGN}) + SET(PERMS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) + IF(NOT SALOME_INSTALL_SCRIPTS_DEF_PERMS) + SET(PERMS ${PERMS} OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE) + ENDIF(NOT SALOME_INSTALL_SCRIPTS_DEF_PERMS) + 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) + +#---------------------------------------------------------------------------- +# SALOME_INSTALL_SCRIPTS is a macro useful for installing executable scripts. +# ARGUMENTS: +# PYFILE2COMPINST: IN : list of python files to be installed. +# PYFILELOC: IN : full pathname for installing. +# Permissions of installed files: OWNER_WRITE, OWNER_READ, GROUP_READ, and WORLD_READ +#---------------------------------------------------------------------------- +MACRO(INSTALL_AND_COMPILE_PYTHON_FILE PYFILE2COMPINST PYFILELOC) + INSTALL(CODE "SET(PYTHON_FILE ${f})") + FOREACH(input ${PYFILE2COMPINST}) + GET_FILENAME_COMPONENT(inputname ${input} NAME) + INSTALL(FILES ${input} DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYFILELOC}) + INSTALL(CODE "MESSAGE(STATUS \"py compiling ${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}\")") + INSTALL(CODE "SET(CMD \"import py_compile ; py_compile.compile('${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}')\")") + INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"\${CMD}\")") + INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -O -c \"\${CMD}\")") + ENDFOREACH(input ${PYFILE2COMPINST}) +ENDMACRO(INSTALL_AND_COMPILE_PYTHON_FILE PYFILE2COMPINST PYFILELOC) + +#---------------------------------------------------------------------------- +# SALOME_CONFIGURE_FILE is a macro useful for copying a file to another location +# and modify its contents. +# +# USAGE: SALOME_CONFIGURE_FILE(in_file out_file [INSTALL dir]) +# +# ARGUMENTS: +# in_file: IN : input file with full paths. +# out_file: IN : output file with full paths. +# If INSTALL is specified, then 'out_file' will be installed to the 'dir' directory. +#---------------------------------------------------------------------------- +MACRO(SALOME_CONFIGURE_FILE IN_FILE OUT_FILE) + MESSAGE(STATUS "Creation of ${OUT_FILE}") + CONFIGURE_FILE(${IN_FILE} ${OUT_FILE} @ONLY) + PARSE_ARGUMENTS(SALOME_CONFIGURE_FILE "INSTALL" "" ${ARGN}) + IF(SALOME_CONFIGURE_FILE_INSTALL) + INSTALL(FILES ${OUT_FILE} DESTINATION ${SALOME_CONFIGURE_FILE_INSTALL}) + ENDIF(SALOME_CONFIGURE_FILE_INSTALL) +ENDMACRO(SALOME_CONFIGURE_FILE) \ No newline at end of file diff --git a/salome_adm/cmake_files/UseOMNIORB.cmake b/salome_adm/cmake_files/UseOMNIORB.cmake index 9cfcbb35b..d6f8e6f9c 100644 --- a/salome_adm/cmake_files/UseOMNIORB.cmake +++ b/salome_adm/cmake_files/UseOMNIORB.cmake @@ -36,19 +36,25 @@ ENDMACRO(OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL)") # MYMODULE is a string that will be used to create a target with sources containing *.cc coming from the compilation of ${MYIDLFILES} # MYIDLFILES containing all idl files to be compiled. # MYIDLCXXFLAGS containing all directories (only directories) where to find *.idl which depend ${MYIDLFILES}. -MACRO(OMNIORB_ADD_MODULE MYMODULE MYIDLFILES MYIDLCXXFLAGS) +# TYPE contains type of the library +MACRO(OMNIORB_ADD_MODULE MYMODULE MYIDLFILES MYIDLCXXFLAGS TYPE) SET(MYSOURCES) FOREACH(input ${MYIDLFILES}) - STRING(REGEX REPLACE ".idl" "" base ${input}) + GET_FILENAME_COMPONENT(base ${input} NAME_WE) +# STRING(REGEX REPLACE ".idl" "" base ${input}) SET(OMNIORB_IDLCXXFLAGS2 "${OMNIORB_IDLCXXFLAGS}") SET(src ${CMAKE_CURRENT_BINARY_DIR}/${base}SK.cc) SET(MYSOURCES ${MYSOURCES} ${src}) SET(outputs ${src}) SET(dynsrc ${CMAKE_CURRENT_BINARY_DIR}/${base}DynSK.cc) + SET(MYSOURCES ${MYSOURCES} ${dynsrc}) SET(outputs ${outputs} ${dynsrc}) SET(inc ${CMAKE_CURRENT_BINARY_DIR}/${base}.hh) SET(outputs ${outputs} ${inc}) - SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input}) + GET_FILENAME_COMPONENT(path ${input} PATH) + IF(NOT path) + SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input}) + ENDIF(NOT path) SET(flags ${OMNIORB_IDLCXXFLAGS2}) STRING(REGEX MATCH "-bcxx" ISBCXX ${flags}) IF(NOT ISBCXX) @@ -76,5 +82,6 @@ MACRO(OMNIORB_ADD_MODULE MYMODULE MYIDLFILES MYIDLCXXFLAGS) STRING(REPLACE "\\" "/" IDLPYFLAGS ${IDLPYFLAGS}) INSTALL(CODE "OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL( \"${OMNIORB_IDL_PYTHON}\" \"${IDLPYFLAGS}\" \"${input}\" \"${CMAKE_INSTALL_PREFIX}/\${INSTALL_PYIDL_DIR}\" )") ENDFOREACH(input ${MYIDLFILES}) - ADD_LIBRARY(${MYMODULE} SHARED ${MYSOURCES}) + ADD_LIBRARY(${MYMODULE} ${TYPE} ${MYSOURCES}) + ENDMACRO(OMNIORB_ADD_MODULE) diff --git a/salome_adm/cmake_files/am2cmake.py b/salome_adm/cmake_files/am2cmake.py index 20f0e9c7b..69d723fbc 100644 --- a/salome_adm/cmake_files/am2cmake.py +++ b/salome_adm/cmake_files/am2cmake.py @@ -370,6 +370,7 @@ class CMakeFile(object): "MEFISTO2D", "MeshDriverDAT", "MeshDriverMED", + "MeshDriverGMF", "MeshDriver", "MeshDriverSTL", "MeshDriverUNV", @@ -826,8 +827,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"]: @@ -1922,7 +1923,7 @@ class CMakeFile(object): ENDIF(WINDOWS) ''') # -- - if self.module in ["geom", "med"]: + if self.module in ["geom", "med", "hexoticplugin"]: newlines.append(r''' SET(var ${var} -I${CMAKE_CURRENT_SOURCE_DIR}) SET(var ${var} -I${CMAKE_CURRENT_BINARY_DIR}) @@ -2563,8 +2564,10 @@ if __name__ == "__main__": # -- for f in files: if f in ["Makefile.am", "Makefile.am.cmake"]: - convert = True - if getenv("AM2CMAKE_FORCE_GENERATION", "0")=="0": + convert = True # convert files by default + forced = getenv("AM2CMAKE_FORCE_GENERATION", "0")=="1" or \ + getenv("AM2CMAKE_FORCE_%s_GENERATION"%module.upper(), "0")=="1" + if not forced: # detect if conversion should be done if "CMakeLists.txt" in files: from os.path import join 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/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..4d1b1de03 --- /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 + ${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..8683fa5bd --- /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 + ${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..541775c36 --- /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 + ${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..2889e0613 --- /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 + ${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..2b83e1961 --- /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 + ${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..3a2808cbb --- /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 + ${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..779f14330 --- /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 + ${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..eaca62a3c --- /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 + ${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..ef281ec42 --- /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 + ${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..4976d94df --- /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 + ${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..203be8e04 --- /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 + ${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/HDFPersist/HDFascii.cc b/src/HDFPersist/HDFascii.cc index cc08ea933..c8fd3acfd 100644 --- a/src/HDFPersist/HDFascii.cc +++ b/src/HDFPersist/HDFascii.cc @@ -408,7 +408,7 @@ char* HDFascii::ConvertFromASCIIToHDF(const char* thePath, fscanf(fp, "%s", id_of_end); if(strcmp(id_of_end, ASCIIHDF_ID_END) != 0) { std::cout << "ConvertFromASCIIToHDF : Can not find the end ASCII token " << std::endl; - return false; + return NULL; } hdf_file->CloseOnDisk(); 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..09e211bb3 --- /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 + ${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..f0291aaf5 --- /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 + ${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..b314fdcc1 --- /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 + ${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} ${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..a635b4061 --- /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 + ${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..47c04bd74 --- /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 + ${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..57da32c34 --- /dev/null +++ b/src/LifeCycleCORBA_SWIG/CMakeLists.txt @@ -0,0 +1,57 @@ +# 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 + ${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}") +SET_TARGET_PROPERTIES(_libSALOME_LifeCycleCORBA PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}") + +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..6b7c86d3c --- /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 + ${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..890118060 --- /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 + ${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..3e8f048ef --- /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 + ${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..8d22ebc63 --- /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 + ${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..b2542217b --- /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 + ${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..6f675c91d --- /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 + ${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..571ff7814 --- /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 + ${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..bbaad6bfc --- /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 + ${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..154880672 --- /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 + ${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..10cb294ad --- /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 + ${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..e1d4820db --- /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 + ${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..069385256 --- /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 + ${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..84df7a383 --- /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 + ${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..d3daf020f --- /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 + ${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/SALOMEDSImpl_UseCaseBuilder.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx index 1d86d349a..a7ab40d02 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx @@ -160,7 +160,7 @@ bool SALOMEDSImpl_UseCaseBuilder::AppendTo(const SALOMEDSImpl_SObject& theFather DF_Label aFatherLabel = theFather.GetLabel(), aLabel = theObject.GetLabel(); if(aFatherLabel == aLabel) return false; - SALOMEDSImpl_AttributeTreeNode *aFather = false, *aNode = false; + SALOMEDSImpl_AttributeTreeNode *aFather = NULL, *aNode = NULL; if(aFatherLabel.IsNull()) return false; if(!(aFather=(SALOMEDSImpl_AttributeTreeNode*)aFatherLabel.FindAttribute(_root->ID()))) return false; 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..6e9ea5bfe --- /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 + ${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..496d9a42d --- /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 + ${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..d881e5e94 --- /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 + ${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..65038b42f --- /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 + ${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..11545cfff --- /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 + ${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..269d62c59 --- /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 + ${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 ); -- 2.39.2