#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
INCLUDE(CMakeDependentOption)
SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS})
# For salome test
-SET(KERNEL_TEST_DIR ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test)
-SET(KERNEL_TEST_LIB ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/lib)
-CONFIGURE_FILE(CTestTestfileInstall.cmake.in CTestTestfileInstall.cmake @ONLY)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/CTestTestfileInstall.cmake
- DESTINATION ${KERNEL_TEST_DIR}
- RENAME CTestTestfile.cmake)
-
-# Sources
-# ========
+IF(SALOME_BUILD_TESTS)
+ SET(KERNEL_TEST_DIR ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test)
+ SET(KERNEL_TEST_LIB ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/lib)
+ CONFIGURE_FILE(CTestTestfileInstall.cmake.in CTestTestfileInstall.cmake @ONLY)
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/CTestTestfileInstall.cmake
+ DESTINATION ${KERNEL_TEST_DIR}
+ RENAME CTestTestfile.cmake)
+ENDIF()
+
+# Process subdirs
+# ===============
IF(NOT SALOME_LIGHT_ONLY)
ADD_SUBDIRECTORY(idl)
ENDIF()
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(resources)
-ADD_SUBDIRECTORY(bin)
+IF(NOT SALOME_LIGHT_ONLY)
+ ADD_SUBDIRECTORY(bin)
+ENDIF()
ADD_SUBDIRECTORY(salome_adm)
IF(SALOME_BUILD_DOC)
ADD_SUBDIRECTORY(doc)
ENDIF()
-# Header configuration
-# ====================
+# Configure and install version header file
+# =========================================
SALOME_XVERSION(${PROJECT_NAME})
SALOME_CONFIGURE_FILE(KERNEL_version.h.in KERNEL_version.h INSTALL ${SALOME_INSTALL_HEADERS})
# ====================
INCLUDE(CMakePackageConfigHelpers)
-# List of targets in this project we want to make visible to the rest of the world.
-# They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup"
-
-SET(_${PROJECT_NAME}_exposed_targets
- SALOMEBasics SALOMELocalTrace SalomeHDFPersist OpUtil)
-
-# CORBA specific targets:
-IF(NOT SALOME_LIGHT_ONLY)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets
- DF SalomeLoggerServer with_loggerTraceCollector SalomeNS SalomeGenericObj
- Registry SalomeCatalog ResourcesManager SalomeResourcesManager
- SalomeNotification SalomeContainer SalomeSDS Launcher SalomeLauncher
- SalomeLifeCycleCORBA SalomeDSClient TOOLSDS SalomeKernelHelpers
- SalomeDSImpl SalomeDS SalomeCommunication SalomeDSCContainer)
- # Temporary solution for package src\DSC on windows
- IF(NOT WIN32)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets
- CalciumC SalomeCalcium SalomeDatastream SalomePalm SalomeDSCSupervBasic
- SalomeDSCSuperv)
- IF(SALOME_PACO_PARALLEL)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomeParallelDSCContainer)
- ENDIF()
- ENDIF()
-ENDIF()
-
-# MPI specific targets:
-IF(SALOME_USE_MPI)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets
- SalomeMPIContainer SalomeTestMPIComponentEngine)
-ENDIF()
-
-# Test targets:
-IF(SALOME_BUILD_TESTS)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets SALOMELocalTraceTest UnitTests)
- IF(NOT SALOME_LIGHT_ONLY)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets
- SALOMETraceCollectorTest UtilsTest NamingServiceTest SalomeTestComponentEngine
- LifeCycleCORBATest SalomeKernelHelpersTest SALOMEDSImplTest SALOMEDSTest)
- ENDIF()
-ENDIF()
-
-# PACO specific targets:
-IF(SALOME_PACO_PARALLEL)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomeParallelContainer)
-ENDIF()
-
-IF(NOT SALOME_LIGHT_ONLY)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomeIDLKernel)
- IF(SALOME_PACO_PARALLEL)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomeParallelIDLKernel)
- ENDIF()
-ENDIF()
-
-# Add all targets to the build-tree export set
-EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets}
- FILE ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake)
-
-# Create the configuration files:
-# - in the build tree:
+# Export targets to the build tree
+EXPORT(EXPORT ${PROJECT_NAME}TargetGroup FILE ${PROJECT_NAME}Targets.cmake)
-# Ensure the variables are always defined for the configure:
+# Ensure the variables are always defined for the configure:
SET(CPPUNIT_ROOT_DIR "${CPPUNIT_ROOT_DIR}")
SET(GRAPHVIZ_ROOT_DIR "${GRAPHVIZ_ROOT_DIR}")
SET(DOXYGEN_ROOT_DIR "${DOXYGEN_ROOT_DIR}")
SET(OMNIORBPY_ROOT_DIR "${OMNIORBPY_ROOT_DIR}")
SET(LIBBATCH_ROOT_DIR "${LIBBATCH_ROOT_DIR}")
-SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include")
+SET(CONF_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/include" "${CMAKE_BINARY_DIR}/include")
# Build variables that will be expanded when configuring Salome<MODULE>Config.cmake:
SALOME_CONFIGURE_PREPARE(CppUnit Graphviz Doxygen Sphinx MPI omniORB LibBatch
PThread Boost HDF5 libXml2 Python)
+# Generate confifguration
CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in
- ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
+ ${CMAKE_BINARY_DIR}/${PROJECT_NAME}Config.cmake
INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE}"
PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE CMAKE_INSTALL_PREFIX
CPPUNIT_ROOT_DIR GRAPHVIZ_ROOT_DIR DOXYGEN_ROOT_DIR
PTHREAD_ROOT_DIR BOOST_ROOT_DIR HDF5_ROOT_DIR LIBXML2_ROOT_DIR
PYTHON_ROOT_DIR SWIG_ROOT_DIR)
-# - in the install tree (VSR 16/08/2013: TEMPORARILY COMMENT THIS - TO REMOVE?):
-# Get the relative path of the include directory so
-# we can register it in the generated configuration files:
-#SET(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}")
-#CONFIGURE_PACKAGE_CONFIG_FILE(salome_adm/cmake_files/${PROJECT_NAME}Config.cmake.in
-# ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake
-# INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE}"
-# PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE CMAKE_INSTALL_PREFIX
-# CPPUNIT_ROOT_DIR GRAPHVIZ_ROOT_DIR DOXYGEN_ROOT_DIR
-# SPHINX_ROOT_DIR MPI_ROOT_DIR OMNIORB_ROOT_DIR OMNIORBPY_ROOT_DIR LIBBATCH_ROOT_DIR
-# PTHREAD_ROOT_DIR BOOST_ROOT_DIR HDF5_ROOT_DIR LIBXML2_ROOT_DIR
-# PYTHON_ROOT_DIR SWIG_ROOT_DIR)
-
-WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
+# Generate project version file
+WRITE_BASIC_PACKAGE_VERSION_FILE(${CMAKE_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
VERSION ${${PROJECT_NAME_UC}_VERSION}
COMPATIBILITY AnyNewerVersion)
# Install the CMake configuration files:
INSTALL(FILES
- "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
- "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
+ "${CMAKE_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
+ "${CMAKE_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
DESTINATION "${SALOME_INSTALL_CMAKE}")
# Install the export set for use with the install-tree
SALOMEDSImpl
SALOMESDS
Utils
+ DF
UnitTests
salomeInstance
salomeCommand
SET(KERNEL_CalciumC CalciumC)
SET(KERNEL_DF DF)
SET(KERNEL_Launcher Launcher)
-SET(KERNEL_LifeCycleCORBATest LifeCycleCORBATest)
-SET(KERNEL_NamingServiceTest NamingServiceTest)
SET(KERNEL_OpUtil OpUtil)
SET(KERNEL_Registry Registry)
SET(KERNEL_ResourcesManager ResourcesManager)
SET(KERNEL_SalomeDSCSupervBasic SalomeDSCSupervBasic)
SET(KERNEL_SalomeDSCSuperv SalomeDSCSuperv)
SET(KERNEL_SalomeDSImpl SalomeDSImpl)
-SET(KERNEL_SALOMEDSImplTest SALOMEDSImplTest)
SET(KERNEL_SalomeDS SalomeDS)
-SET(KERNEL_SALOMEDSTest SALOMEDSTest)
SET(KERNEL_SalomeGenericObj SalomeGenericObj)
SET(KERNEL_SalomeHDFPersist SalomeHDFPersist)
SET(KERNEL_SalomeIDLKernel SalomeIDLKernel)
SET(KERNEL_SalomeLauncher SalomeLauncher)
SET(KERNEL_SalomeLifeCycleCORBA SalomeLifeCycleCORBA)
SET(KERNEL_SALOMELocalTrace SALOMELocalTrace)
-SET(KERNEL_SALOMELocalTraceTest SALOMELocalTraceTest)
SET(KERNEL_SalomeLoggerServer SalomeLoggerServer)
SET(KERNEL_SalomeMPIContainer SalomeMPIContainer)
SET(KERNEL_SalomeNotification SalomeNotification)
SET(KERNEL_SalomeNS SalomeNS)
SET(KERNEL_SalomeResourcesManager SalomeResourcesManager)
-SET(KERNEL_SalomeTestComponentEngine SalomeTestComponentEngine)
-SET(KERNEL_SalomeTestMPIComponentEngine SalomeTestMPIComponentEngine)
-SET(KERNEL_SALOMETraceCollectorTest SALOMETraceCollectorTest)
SET(KERNEL_TOOLSDS TOOLSDS)
-SET(KERNEL_UtilsTest UtilsTest)
SET(KERNEL_with_loggerTraceCollector with_loggerTraceCollector)
SET(KERNEL_SalomeKernelHelpers SalomeKernelHelpers)
#
ADD_SUBDIRECTORY(salome_tester)
-ADD_SUBDIRECTORY(tests)
+IF(SALOME_BUILD_TESTS)
+ ADD_SUBDIRECTORY(tests)
+ENDIF()
# ===============================================================
# Files to be installed
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
-INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target usr_docs)")
+INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${CMAKE_BINARY_DIR} --target usr_docs)")
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/KERNEL DESTINATION ${SALOME_INSTALL_DOC}/gui)
INSTALL(FILES images/head.png DESTINATION ${SALOME_INSTALL_DOC}/gui/KERNEL)
ALWAYS_DETAILED_SEC = YES
INLINE_INHERITED_MEMB = YES
FULL_PATH_NAMES = YES
-STRIP_FROM_PATH = @PROJECT_BINARY_DIR@ @PROJECT_SOURCE_DIR@
+STRIP_FROM_PATH = @CMAKE_BINARY_DIR@ @CMAKE_SOURCE_DIR@
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = YES
#---------------------------------------------------------------------------
INPUT = \
@CMAKE_CURRENT_BINARY_DIR@/tmp \
- @PROJECT_SOURCE_DIR@/doc/salome \
- @PROJECT_SOURCE_DIR@/bin \
- @PROJECT_SOURCE_DIR@/idl \
- @PROJECT_SOURCE_DIR@/src/Container \
- @PROJECT_SOURCE_DIR@/src/LifeCycleCORBA \
- @PROJECT_SOURCE_DIR@/src/NamingService \
- @PROJECT_SOURCE_DIR@/src/Notification \
- @PROJECT_SOURCE_DIR@/src/Utils \
- @PROJECT_SOURCE_DIR@/src/DSC
+ @CMAKE_SOURCE_DIR@/doc/salome \
+ @CMAKE_SOURCE_DIR@/bin \
+ @CMAKE_SOURCE_DIR@/idl \
+ @CMAKE_SOURCE_DIR@/src/Container \
+ @CMAKE_SOURCE_DIR@/src/LifeCycleCORBA \
+ @CMAKE_SOURCE_DIR@/src/NamingService \
+ @CMAKE_SOURCE_DIR@/src/Notification \
+ @CMAKE_SOURCE_DIR@/src/Utils \
+ @CMAKE_SOURCE_DIR@/src/DSC
FILE_PATTERNS = *.dox *.idl *.hxx *.cxx *.py
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
-EXAMPLE_PATH = @PROJECT_SOURCE_DIR@/doc/salome/examples
+EXAMPLE_PATH = @CMAKE_SOURCE_DIR@/doc/salome/examples
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH = @CMAKE_CURRENT_SOURCE_DIR@/images
ALWAYS_DETAILED_SEC = YES
INLINE_INHERITED_MEMB = YES
FULL_PATH_NAMES = YES
-STRIP_FROM_PATH = @PROJECT_BINARY_DIR@ @PROJECT_SOURCE_DIR@
+STRIP_FROM_PATH = @CMAKE_BINARY_DIR@ @CMAKE_SOURCE_DIR@
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = YES
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = @CMAKE_CURRENT_BINARY_DIR@/tmp \
- @PROJECT_SOURCE_DIR@/doc/salome \
- @PROJECT_SOURCE_DIR@/src \
- @PROJECT_SOURCE_DIR@/bin \
- @PROJECT_SOURCE_DIR@/idl \
- @PROJECT_BINARY_DIR@/bin \
+ @CMAKE_SOURCE_DIR@/doc/salome \
+ @CMAKE_SOURCE_DIR@/src \
+ @CMAKE_SOURCE_DIR@/bin \
+ @CMAKE_SOURCE_DIR@/idl \
+ @CMAKE_BINARY_DIR@/bin \
FILE_PATTERNS = *.idl *.hxx *.cxx *.h *.c *.hh *.cc @DOXYGEN_PYTHON_EXTENSION@ *.doc *.dox
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
-EXAMPLE_PATH = @PROJECT_SOURCE_DIR@/doc/salome/examples
+EXAMPLE_PATH = @CMAKE_SOURCE_DIR@/doc/salome/examples
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH = @CMAKE_CURRENT_SOURCE_DIR@/images
SALOME_GenericObj.idl
SALOME_Types.idl
SALOME_Session.idl
- nstest.idl
DSC_Engines.idl
SALOME_Ports.idl
SALOME_PyNode.idl
SALOME_ParamPorts.idl
SALOME_Parametric.idl
SALOME_MPIObject.idl
- SALOME_TestComponent.idl
- SALOME_TestModuleCatalog.idl
SALOME_CommonTypes.idl
SALOME_ExternalServerLauncher.idl
${CMAKE_CURRENT_BINARY_DIR}/Calcium_Ports.idl
)
+IF(SALOME_BUILD_TESTS)
+ LIST(APPEND SalomeIDLKernel_IDLSOURCES
+ nstest.idl
+ SALOME_TestModuleCatalog.idl
+ SALOME_TestComponent.idl
+ )
+ENDIF()
+
IF(SALOME_USE_MPI)
- SET(SalomeIDLKernel_IDLSOURCES ${SalomeIDLKernel_IDLSOURCES} SALOME_MPIContainer.idl SALOME_TestMPIComponent.idl)
+ LIST(APPEND SalomeIDLKernel_IDLSOURCES
+ SALOME_MPIContainer.idl
+ )
+ IF(SALOME_BUILD_TESTS)
+ LIST(APPEND SalomeIDLKernel_IDLSOURCES
+ SALOME_TestMPIComponent.idl
+ )
+ ENDIF()
ENDIF(SALOME_USE_MPI)
SET(IDL_INCLUDE_DIRS
# Files to be installed
# ===============================================================
-# These files are data, module or lib files
-INSTALL(FILES CatalogModulePersonnel.xml_skel DESTINATION ${SALOME_KERNEL_INSTALL_RES_DATA})
-
-SALOME_CONFIGURE_FILE(CatalogResources.xml.in CatalogResources.xml INSTALL ${SALOME_KERNEL_INSTALL_RES_DATA})
-
-INSTALL(FILES channel.cfg SALOMEDS_Resources DESTINATION ${SALOME_KERNEL_INSTALL_RES_DATA})
-SALOME_CONFIGURE_FILE(KERNELCatalog.xml.in KERNELCatalog.xml INSTALL ${SALOME_KERNEL_INSTALL_RES_DATA})
-
-
-
-
+IF(NOT SALOME_LIGHT_ONLY)
+ CONFIGURE_FILE(CatalogResources.xml.in CatalogResources.xml @ONLY)
+ CONFIGURE_FILE(KERNELCatalog.xml.in KERNELCatalog.xml @ONLY)
+
+ SET(_resources
+ CatalogModulePersonnel.xml_skel
+ SALOMEDS_Resources
+ channel.cfg
+ ${CMAKE_CURRENT_BINARY_DIR}/CatalogResources.xml
+ ${CMAKE_CURRENT_BINARY_DIR}/KERNELCatalog.xml
+ )
+ENDIF()
+
+INSTALL(FILES ${_resources} DESTINATION ${SALOME_KERNEL_INSTALL_RES_DATA})
+
+UNSET(_resources)
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-ADD_SUBDIRECTORY( ressources )
+ADD_SUBDIRECTORY(resources)
# ===============================================================
# Files to be installed
SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${SALOME_INSTALL_SCRIPT_SCRIPTS})
-INSTALL( DIRECTORY app-template DESTINATION ${SALOME_KERNEL_INSTALL_RES_DATA})
+INSTALL(DIRECTORY app-template DESTINATION ${SALOME_KERNEL_INSTALL_RES_DATA})
+
+UNSET(SCRIPTS)
--- /dev/null
+# Copyright (C) 2012-2020 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, or (at your option) any later version.
+#
+# 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(APPQUICKSTART_RESOURCES_FILES
+ "Anita semi square.ttf"
+ background.png
+)
+
+INSTALL( FILES ${APPQUICKSTART_RESOURCES_FILES} DESTINATION ${SALOME_KERNEL_INSTALL_RES_DATA} )
+
+UNSET(APPQUICKSTART_RESOURCES_FILES)
+++ /dev/null
-# Copyright (C) 2012-2020 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, or (at your option) any later version.
-#
-# 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(APPQUICKSTART_RESOURCES_FILES
- "Anita semi square.ttf"
- background.png
-)
-
-INSTALL( FILES ${APPQUICKSTART_RESOURCES_FILES} DESTINATION ${SALOME_KERNEL_INSTALL_RES_DATA} )
+++ /dev/null
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// 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
-//
-
-// SALOME Basics : general SALOME definitions and tools (C++ part - no CORBA)
-// File : BasicGenericDestructor.cxx
-// Author : Antoine YESSAYAN, Paul RASCLE, EDF
-// Module : SALOME
-// $Header$
-//
-#include <iostream>
-#include <list>
-#include <cstdlib>
-
-#include "BasicsGenericDestructor.hxx"
-
-void HouseKeeping();
-
-std::list<PROTECTED_DELETE*> PROTECTED_DELETE::_objList;
-#ifndef WIN32
-pthread_mutex_t PROTECTED_DELETE::_listMutex;
-#else
-pthread_mutex_t PROTECTED_DELETE::_listMutex =
- PTHREAD_MUTEX_INITIALIZER;
-#endif
-
-std::list<GENERIC_DESTRUCTOR*> *GENERIC_DESTRUCTOR::Destructors = 0;
-static bool atExitSingletonDone = false ;
-
-// ============================================================================
-/*!
- * deleteInstance deletes only once the object. Only object present on the
- * static list of PROTECTED_DELETE* are deleted, then removed of the list.
- * The operation is protected by a mutex.
- */
-// ============================================================================
-
-void PROTECTED_DELETE::deleteInstance(PROTECTED_DELETE *anObject)
- {
- if (std::find(_objList.begin(), _objList.end(),anObject) == _objList.end())
- return;
- else
- {
- int ret;
- ret = pthread_mutex_lock(&_listMutex); // acquire lock, an check again
- if (std::find(_objList.begin(), _objList.end(), anObject)
- != _objList.end())
- {
- DEVTRACE("PROTECTED_DELETE::deleteInstance1 " << anObject);
- delete anObject;
- DEVTRACE("PROTECTED_DELETE::deleteInstance2 " << &_objList);
- _objList.remove(anObject);
- }
- ret = pthread_mutex_unlock(&_listMutex); // release lock
- }
- }
-
-// ============================================================================
-/*!
- * To allow a further destruction of a PRTECTED_DELETE object, it must be added
- * to the static list of PROTECTED_DELETE*
- */
-// ============================================================================
-
-void PROTECTED_DELETE::addObj(PROTECTED_DELETE *anObject)
-{
- DEVTRACE("PROTECTED_DELETE::addObj " << anObject);
- _objList.push_back(anObject);
-}
-
-// ============================================================================
-/*!
- * Herited classes have there own destructors
- */
-// ============================================================================
-
-PROTECTED_DELETE::~PROTECTED_DELETE()
-{
- DEVTRACE("PROTECTED_DELETE::~PROTECTED_DELETE()");
-}
-
-// ============================================================================
-/*!
- * To execute only once GENERIC_DESTRUCTOR::HouseKeeping et the end of process,
- * a dedicated object is created, as a singleton: atExitSingleton.
- * When the singleton is created, the HouseKeeping() function is registered in
- * atExit().
- * Destructors is a list created on heap, and deleted by HouseKeeping(), with
- * the list content.
- */
-// ============================================================================
-
-class atExitSingleton
-{
-public:
- atExitSingleton(bool Make_ATEXIT)
- {
- if (Make_ATEXIT && !atExitSingletonDone)
- {
- DEVTRACE("atExitSingleton(" << Make_ATEXIT << ")");
- assert(GENERIC_DESTRUCTOR::Destructors == 0);
- GENERIC_DESTRUCTOR::Destructors = new std::list<GENERIC_DESTRUCTOR*>;
-#ifndef _DEBUG_
- atexit(HouseKeeping);
-#else
- int cr = atexit(HouseKeeping);
- assert(cr == 0);
-#endif
- atExitSingletonDone = true;
- }
- }
-
- ~atExitSingleton()
- {
- DEVTRACE("atExitSingleton::~atExitSingleton()");
- }
-};
-
-//! static singleton for atExitSingleton class
-
-static atExitSingleton HouseKeeper = atExitSingleton(false);
-
-// ============================================================================
-/*!
- * Executes all objects of type DESTRUCTOR_OF in the Destructors list.
- * Deletes all objects of type DESTRUCTOR_OF in the Destructors list.
- * Deletes the list.
- */
-// ============================================================================
-
-void HouseKeeping( void )
-{
- DEVTRACE("HouseKeeping()");
- assert(GENERIC_DESTRUCTOR::Destructors);
- if(GENERIC_DESTRUCTOR::Destructors->size())
- {
- std::list<GENERIC_DESTRUCTOR*>::iterator it =
- GENERIC_DESTRUCTOR::Destructors->end();
-
- do
- {
- it-- ;
- GENERIC_DESTRUCTOR* ptr = *it ;
- DEVTRACE("HouseKeeping() " << typeid(ptr).name());
- (*ptr)();
- delete ptr ;
- }
- while (it != GENERIC_DESTRUCTOR::Destructors->begin()) ;
-
- DEVTRACE("HouseKeeping() end list ");
- GENERIC_DESTRUCTOR::Destructors->clear() ;
- assert(GENERIC_DESTRUCTOR::Destructors->size() == 0);
- assert(GENERIC_DESTRUCTOR::Destructors->empty());
- DEVTRACE("HouseKeeping()after clear ");
- }
-
- delete GENERIC_DESTRUCTOR::Destructors;
- GENERIC_DESTRUCTOR::Destructors = 0;
- atExitSingletonDone = false ;
- DEVTRACE("HouseKeeping() very end ");
- return ;
-}
-
-// ============================================================================
-/*!
- * Adds a destruction object to the list of actions to be performed at the end
- * of the process
- */
-// ============================================================================
-
-const int GENERIC_DESTRUCTOR::Add(GENERIC_DESTRUCTOR &anObject)
-{
- DEVTRACE("GENERIC_DESTRUCTOR::Add("<<typeid(anObject).name()<<") "
- << &anObject);
- if (!atExitSingletonDone)
- {
- HouseKeeper = atExitSingleton(true);
- }
- assert(Destructors);
- Destructors->push_back(&anObject);
- return Destructors->size();
-}
+++ /dev/null
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// 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
-//
-
-// SALOME Basics : general SALOME definitions and tools (C++ part - no CORBA)
-// File : BasicGenericDestructor.hxx
-// Author : Antoine YESSAYAN, Paul RASCLE, EDF
-// Module : SALOME
-// $Header$
-//
-#ifndef _BASICGENERICDESTRUCTOR_HXX_
-#define _BASICGENERICDESTRUCTOR_HXX_
-
-#include "SALOME_Basics.hxx"
-
-#include <list>
-#include <algorithm>
-#include <cassert>
-#include <typeinfo>
-#include <iostream>
-#include <cstdlib>
-#include <pthread.h>
-
-//#define _DEVDEBUG_
-
-#ifdef _DEVDEBUG_
-#define MYDEVTRACE {std::cerr << __FILE__ << " [" << __LINE__ << "] : ";}
-#define DEVTRACE(msg) {MYDEVTRACE; std::cerr<<msg<<std::endl<<std::flush;}
-#else
-#define MYDEVTRACE
-#define DEVTRACE(msg)
-#endif
-
-#ifdef WIN32
-#pragma warning(disable:4251) // Warning DLL Interface ...
-#endif
-
-// ============================================================================
-/*!
- * The PROTECTED_DELETE base class provides a protected destructor.
- * The only way to use PROTECTED_DELETE is inheritance:
- * example: class LocalTraceBufferPool : public PROTECTED_DELETE
- * Herited class destructor must stay protected.
- * Normal use is:
- * - create an instance of herited class on the heap (new),
- * - use addObj(instance) to store the instance on the static list _objList,
- * - delete instance with deleteInstance(instance)
- *
- * This class is utilised with GENERIC_DESTRUCTOR and DESTRUCTOR_OF,
- * to program automatic deletion of objects at the end of the process, while
- * keeping the possibility of an early destruction, if required. This is used
- * for unit testing and trace mechanism.
- */
-// ============================================================================
-
-class BASICS_EXPORT PROTECTED_DELETE
-{
-public:
- static void deleteInstance(PROTECTED_DELETE *anObject);
- static void addObj(PROTECTED_DELETE *anObject);
-
-protected:
- virtual ~PROTECTED_DELETE();
- static std::list<PROTECTED_DELETE*> _objList;
-
-private:
- static pthread_mutex_t _listMutex;
-};
-
-// ============================================================================
-/*!
- * The GENERIC_DESTRUCTOR abstract class describes the comportement of any
- * destruction object. This type is used to create a list of miscellaneous
- * destruction objects.
- *
- * The only way to use the GENERIC_DESTRUCTOR class is inheritance:
- * class SPECIFIC_DESTRUCTOR : public GENERIC_DESTRUCTOR
- *
- * A generic destructor provides two methods:
- * -# a static method to add a destruction (object) to be performed:
- * GENERIC_DESTRUCTOR::Add(GENERIC_DESTRUCTOR &anObject);
- * The Destruction object is stored in a list of pointer to
- * GENERIC_DESTRUCTOR objects.
- * -# an object method to execute the destruction : operator()().
- */
-// ============================================================================
-
-class BASICS_EXPORT GENERIC_DESTRUCTOR
-{
-public :
- static std::list<GENERIC_DESTRUCTOR*> *Destructors;
-
- virtual ~GENERIC_DESTRUCTOR() {};
- static const int Add(GENERIC_DESTRUCTOR &anObject);
- virtual void operator()(void) = 0;
-};
-
-// ============================================================================
-/*!
- * The DESTRUCTOR_OF class allows the user to program - at any moment - the
- * destruction of an object at the end of the process.
- *
- * Example: the POINT ptrPoint will be destroyed at the end of the process
- * (atexit).
- *
- * POINT *ptrPoint = new POINT ;
- *
- * DESTRUCTOR_OF<POINT> *ptrDestruct = new DESTRUCTOR_OF<POINT>(*ptrPoint);
- *
- * Note that neither ptrPoint, nor ptrDestruct should be destroyed by the user.
- *
- * The destruction object must be created dynamically because it subscribes
- * itself in the list of destruction to be performed at the end of the process.
- */
-// ============================================================================
-
-template <class TYPE> class DESTRUCTOR_OF : public GENERIC_DESTRUCTOR
-{
-public:
- /*!
- Programs the destruction at the end of the process, of the object anObject.
- This method records in _objectPtr the address of an object to be destroyed
- at the end of the process
- */
- DESTRUCTOR_OF(TYPE &anObject):
- _objectPtr(&anObject)
- {
- DEVTRACE(" DESTRUCTOR_OF " << typeid(anObject).name()
- << " " << _objectPtr << " " << this );
- PROTECTED_DELETE::addObj(_objectPtr);
- assert(GENERIC_DESTRUCTOR::Add(*this) >= 0);
- }
-
- /*!
- Performs the destruction of the object.
- This method really destroys the object pointed by _objectPtr.
- It should be called at the end of the process (i.e. at exit).
- */
- virtual void operator()(void)
- {
- if (_objectPtr)
- {
- DEVTRACE("DESTRUCTOR_OF<>::operator() " << _objectPtr);
- if (_objectPtr) PROTECTED_DELETE::deleteInstance(_objectPtr);
- _objectPtr = NULL;
- }
- }
-
- virtual ~DESTRUCTOR_OF()
- {
- DEVTRACE("~DESTRUCTOR_OF() " << this);
- assert(!_objectPtr);
- }
-
-private:
- TYPE *_objectPtr;
-};
-
-# endif
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// SALOME Utils : general SALOME's definitions and tools
-// File : Basics_DirUtils.hxx
-// Author : Alexander A. BORODIN
-// Module : SALOME
-//
-#ifndef _Basics_DIRUTILS_HXX_
-#define _Basics_DIRUTILS_HXX_
+#ifndef BASICS_DIRUTILS_HXX
+#define BASICS_DIRUTILS_HXX
#include "SALOME_Basics.hxx"
BASICS_EXPORT std::string HomePath();
}
-#endif
+#endif // BASICS_DIRUTILS_HXX
--- /dev/null
+// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// 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
+//
+
+// SALOME Basics : general SALOME definitions and tools (C++ part - no CORBA)
+// File : BasicGenericDestructor.cxx
+// Author : Antoine YESSAYAN, Paul RASCLE, EDF
+// Module : SALOME
+// $Header$
+//
+#include <iostream>
+#include <list>
+#include <cstdlib>
+
+#include "Basics_GenericDestructor.hxx"
+
+void HouseKeeping();
+
+std::list<PROTECTED_DELETE*> PROTECTED_DELETE::_objList;
+#ifndef WIN32
+pthread_mutex_t PROTECTED_DELETE::_listMutex;
+#else
+pthread_mutex_t PROTECTED_DELETE::_listMutex =
+ PTHREAD_MUTEX_INITIALIZER;
+#endif
+
+std::list<GENERIC_DESTRUCTOR*> *GENERIC_DESTRUCTOR::Destructors = 0;
+static bool atExitSingletonDone = false ;
+
+// ============================================================================
+/*!
+ * deleteInstance deletes only once the object. Only object present on the
+ * static list of PROTECTED_DELETE* are deleted, then removed of the list.
+ * The operation is protected by a mutex.
+ */
+// ============================================================================
+
+void PROTECTED_DELETE::deleteInstance(PROTECTED_DELETE *anObject)
+ {
+ if (std::find(_objList.begin(), _objList.end(),anObject) == _objList.end())
+ return;
+ else
+ {
+ int ret;
+ ret = pthread_mutex_lock(&_listMutex); // acquire lock, an check again
+ if (std::find(_objList.begin(), _objList.end(), anObject)
+ != _objList.end())
+ {
+ DEVTRACE("PROTECTED_DELETE::deleteInstance1 " << anObject);
+ delete anObject;
+ DEVTRACE("PROTECTED_DELETE::deleteInstance2 " << &_objList);
+ _objList.remove(anObject);
+ }
+ ret = pthread_mutex_unlock(&_listMutex); // release lock
+ }
+ }
+
+// ============================================================================
+/*!
+ * To allow a further destruction of a PRTECTED_DELETE object, it must be added
+ * to the static list of PROTECTED_DELETE*
+ */
+// ============================================================================
+
+void PROTECTED_DELETE::addObj(PROTECTED_DELETE *anObject)
+{
+ DEVTRACE("PROTECTED_DELETE::addObj " << anObject);
+ _objList.push_back(anObject);
+}
+
+// ============================================================================
+/*!
+ * Herited classes have there own destructors
+ */
+// ============================================================================
+
+PROTECTED_DELETE::~PROTECTED_DELETE()
+{
+ DEVTRACE("PROTECTED_DELETE::~PROTECTED_DELETE()");
+}
+
+// ============================================================================
+/*!
+ * To execute only once GENERIC_DESTRUCTOR::HouseKeeping et the end of process,
+ * a dedicated object is created, as a singleton: atExitSingleton.
+ * When the singleton is created, the HouseKeeping() function is registered in
+ * atExit().
+ * Destructors is a list created on heap, and deleted by HouseKeeping(), with
+ * the list content.
+ */
+// ============================================================================
+
+class atExitSingleton
+{
+public:
+ atExitSingleton(bool Make_ATEXIT)
+ {
+ if (Make_ATEXIT && !atExitSingletonDone)
+ {
+ DEVTRACE("atExitSingleton(" << Make_ATEXIT << ")");
+ assert(GENERIC_DESTRUCTOR::Destructors == 0);
+ GENERIC_DESTRUCTOR::Destructors = new std::list<GENERIC_DESTRUCTOR*>;
+#ifndef _DEBUG_
+ atexit(HouseKeeping);
+#else
+ int cr = atexit(HouseKeeping);
+ assert(cr == 0);
+#endif
+ atExitSingletonDone = true;
+ }
+ }
+
+ ~atExitSingleton()
+ {
+ DEVTRACE("atExitSingleton::~atExitSingleton()");
+ }
+};
+
+//! static singleton for atExitSingleton class
+
+static atExitSingleton HouseKeeper = atExitSingleton(false);
+
+// ============================================================================
+/*!
+ * Executes all objects of type DESTRUCTOR_OF in the Destructors list.
+ * Deletes all objects of type DESTRUCTOR_OF in the Destructors list.
+ * Deletes the list.
+ */
+// ============================================================================
+
+void HouseKeeping( void )
+{
+ DEVTRACE("HouseKeeping()");
+ assert(GENERIC_DESTRUCTOR::Destructors);
+ if(GENERIC_DESTRUCTOR::Destructors->size())
+ {
+ std::list<GENERIC_DESTRUCTOR*>::iterator it =
+ GENERIC_DESTRUCTOR::Destructors->end();
+
+ do
+ {
+ it-- ;
+ GENERIC_DESTRUCTOR* ptr = *it ;
+ DEVTRACE("HouseKeeping() " << typeid(ptr).name());
+ (*ptr)();
+ delete ptr ;
+ }
+ while (it != GENERIC_DESTRUCTOR::Destructors->begin()) ;
+
+ DEVTRACE("HouseKeeping() end list ");
+ GENERIC_DESTRUCTOR::Destructors->clear() ;
+ assert(GENERIC_DESTRUCTOR::Destructors->size() == 0);
+ assert(GENERIC_DESTRUCTOR::Destructors->empty());
+ DEVTRACE("HouseKeeping()after clear ");
+ }
+
+ delete GENERIC_DESTRUCTOR::Destructors;
+ GENERIC_DESTRUCTOR::Destructors = 0;
+ atExitSingletonDone = false ;
+ DEVTRACE("HouseKeeping() very end ");
+ return ;
+}
+
+// ============================================================================
+/*!
+ * Adds a destruction object to the list of actions to be performed at the end
+ * of the process
+ */
+// ============================================================================
+
+const int GENERIC_DESTRUCTOR::Add(GENERIC_DESTRUCTOR &anObject)
+{
+ DEVTRACE("GENERIC_DESTRUCTOR::Add("<<typeid(anObject).name()<<") "
+ << &anObject);
+ if (!atExitSingletonDone)
+ {
+ HouseKeeper = atExitSingleton(true);
+ }
+ assert(Destructors);
+ Destructors->push_back(&anObject);
+ return Destructors->size();
+}
--- /dev/null
+// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// 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
+//
+
+#ifndef BASICS_GENERICDESTRUCTOR_HXX
+#define BASICS_GENERICDESTRUCTOR_HXX
+
+#include "SALOME_Basics.hxx"
+
+#include <list>
+#include <algorithm>
+#include <cassert>
+#include <typeinfo>
+#include <iostream>
+#include <cstdlib>
+#include <pthread.h>
+
+// Uncomment for extra debug trace
+// -------------------------------
+// #define _DEVDEBUG_
+
+#ifdef _DEVDEBUG_
+#define MYDEVTRACE {std::cerr << __FILE__ << " [" << __LINE__ << "] : ";}
+#define DEVTRACE(msg) {MYDEVTRACE; std::cerr<<msg<<std::endl<<std::flush;}
+#else
+#define MYDEVTRACE
+#define DEVTRACE(msg)
+#endif
+
+#ifdef WIN32
+#pragma warning(disable:4251) // Warning DLL Interface ...
+#endif
+
+// ============================================================================
+/*!
+ * The PROTECTED_DELETE base class provides a protected destructor.
+ * The only way to use PROTECTED_DELETE is inheritance:
+ * example: class LocalTraceBufferPool : public PROTECTED_DELETE
+ * Herited class destructor must stay protected.
+ * Normal use is:
+ * - create an instance of herited class on the heap (new),
+ * - use addObj(instance) to store the instance on the static list _objList,
+ * - delete instance with deleteInstance(instance)
+ *
+ * This class is utilised with GENERIC_DESTRUCTOR and DESTRUCTOR_OF,
+ * to program automatic deletion of objects at the end of the process, while
+ * keeping the possibility of an early destruction, if required. This is used
+ * for unit testing and trace mechanism.
+ */
+// ============================================================================
+
+class BASICS_EXPORT PROTECTED_DELETE
+{
+public:
+ static void deleteInstance(PROTECTED_DELETE *anObject);
+ static void addObj(PROTECTED_DELETE *anObject);
+
+protected:
+ virtual ~PROTECTED_DELETE();
+ static std::list<PROTECTED_DELETE*> _objList;
+
+private:
+ static pthread_mutex_t _listMutex;
+};
+
+// ============================================================================
+/*!
+ * The GENERIC_DESTRUCTOR abstract class describes the comportement of any
+ * destruction object. This type is used to create a list of miscellaneous
+ * destruction objects.
+ *
+ * The only way to use the GENERIC_DESTRUCTOR class is inheritance:
+ * class SPECIFIC_DESTRUCTOR : public GENERIC_DESTRUCTOR
+ *
+ * A generic destructor provides two methods:
+ * -# a static method to add a destruction (object) to be performed:
+ * GENERIC_DESTRUCTOR::Add(GENERIC_DESTRUCTOR &anObject);
+ * The Destruction object is stored in a list of pointer to
+ * GENERIC_DESTRUCTOR objects.
+ * -# an object method to execute the destruction : operator()().
+ */
+// ============================================================================
+
+class BASICS_EXPORT GENERIC_DESTRUCTOR
+{
+public :
+ static std::list<GENERIC_DESTRUCTOR*> *Destructors;
+
+ virtual ~GENERIC_DESTRUCTOR() {};
+ static const int Add(GENERIC_DESTRUCTOR &anObject);
+ virtual void operator()(void) = 0;
+};
+
+// ============================================================================
+/*!
+ * The DESTRUCTOR_OF class allows the user to program - at any moment - the
+ * destruction of an object at the end of the process.
+ *
+ * Example: the POINT ptrPoint will be destroyed at the end of the process
+ * (atexit).
+ *
+ * POINT *ptrPoint = new POINT ;
+ *
+ * DESTRUCTOR_OF<POINT> *ptrDestruct = new DESTRUCTOR_OF<POINT>(*ptrPoint);
+ *
+ * Note that neither ptrPoint, nor ptrDestruct should be destroyed by the user.
+ *
+ * The destruction object must be created dynamically because it subscribes
+ * itself in the list of destruction to be performed at the end of the process.
+ */
+// ============================================================================
+
+template <class TYPE> class DESTRUCTOR_OF : public GENERIC_DESTRUCTOR
+{
+public:
+ /*!
+ Programs the destruction at the end of the process, of the object anObject.
+ This method records in _objectPtr the address of an object to be destroyed
+ at the end of the process
+ */
+ DESTRUCTOR_OF(TYPE &anObject):
+ _objectPtr(&anObject)
+ {
+ DEVTRACE(" DESTRUCTOR_OF " << typeid(anObject).name()
+ << " " << _objectPtr << " " << this );
+ PROTECTED_DELETE::addObj(_objectPtr);
+ assert(GENERIC_DESTRUCTOR::Add(*this) >= 0);
+ }
+
+ /*!
+ Performs the destruction of the object.
+ This method really destroys the object pointed by _objectPtr.
+ It should be called at the end of the process (i.e. at exit).
+ */
+ virtual void operator()(void)
+ {
+ if (_objectPtr)
+ {
+ DEVTRACE("DESTRUCTOR_OF<>::operator() " << _objectPtr);
+ if (_objectPtr) PROTECTED_DELETE::deleteInstance(_objectPtr);
+ _objectPtr = NULL;
+ }
+ }
+
+ virtual ~DESTRUCTOR_OF()
+ {
+ DEVTRACE("~DESTRUCTOR_OF() " << this);
+ assert(!_objectPtr);
+ }
+
+private:
+ TYPE *_objectPtr;
+};
+
+# endif // BASICS_GENERICDESTRUCTOR_HXX
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File : Basics_OCCTVersion.hxx
-// Author : Julia DOROVSKIKH, Open CASCADE S.A.S (julia.dorovskikh@opencascade.com)
-
#ifndef BASICS_OCCTVERSION_HXX
#define BASICS_OCCTVERSION_HXX
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// SALOME Utils : general SALOME's definitions and tools
-// File : Basics_DirUtils.hxx
-// Author : Alexander A. BORODIN
-// Module : SALOME
-//
-#ifndef _Basics_UTILS_HXX_
-#define _Basics_UTILS_HXX_
+#ifndef BASICS_UTILS_HXX
+#define BASICS_UTILS_HXX
#include "SALOME_Basics.hxx"
#include <string>
#define LOG STDLOG
-#endif //_Basics_UTILS_HXX_
+#endif // BASICS_UTILS_HXX
${PTHREAD_INCLUDE_DIR}
)
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+)
+
SET(SALOMEBasics_SOURCES
- BasicsGenericDestructor.cxx
- Basics_Utils.cxx
Basics_DirUtils.cxx
- SALOME_Basics.hxx
- BasicsGenericDestructor.hxx
- Basics_Utils.hxx
+ Basics_GenericDestructor.cxx
+ Basics_Utils.cxx
+)
+
+SET(SALOMEBasics_HEADERS
Basics_DirUtils.hxx
+ Basics_GenericDestructor.hxx
+ Basics_OCCTVersion.hxx
+ Basics_Utils.hxx
+ SALOME_Basics.hxx
)
ADD_LIBRARY(SALOMEBasics ${SALOMEBasics_SOURCES})
+TARGET_LINK_LIBRARIES(SALOMEBasics ${_link_LIBRARIES})
INSTALL(TARGETS SALOMEBasics EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-TARGET_LINK_LIBRARIES(SALOMEBasics ${PLATFORM_LIBS} ${PTHREAD_LIBRARIES})
+INSTALL(FILES ${SALOMEBasics_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+UNSET(SALOMEBasics_SOURCES)
+UNSET(SALOMEBasics_HEADERS)
+UNSET(_link_LIBRARIES)
-FILE(GLOB SALOMEBasics_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${SALOMEBasics_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+ADD_SUBDIRECTORY(Test)
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// SALOME Basics : general SALOME definitions and tools (C++ part - no CORBA)
-// File : SALOME_Basics.hxx
-// Author : Alexander A. BORODIN
-// Module : SALOME
-// $Header$
-//
-#ifndef _SALOME_BASICS_HXX_
-#define _SALOME_BASICS_HXX_
-
+#ifndef SALOME_BASICS_HXX
+#define SALOME_BASICS_HXX
#ifdef WIN32
# if defined BASICS_EXPORTS || defined SALOMEBasics_EXPORTS
-# define BASICS_EXPORT __declspec( dllexport )
+# define BASICS_EXPORT __declspec(dllexport)
# else
-# define BASICS_EXPORT __declspec( dllimport )
+# define BASICS_EXPORT __declspec(dllimport)
# endif
#else
# define BASICS_EXPORT
#endif
-#endif //_SALOME_BASICS_HXX_
+#endif // SALOME_BASICS_HXX
# 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 ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES BasicMainTest.hxx DESTINATION ${SALOME_INSTALL_HEADERS})
--- /dev/null
+Write tests with cppunit
+========================
+
+BasicMainTest.hxx is the file containg main() function that configures and runs
+unitary tests.
+
+To use it, just include this header to the test program written with the cppunit.
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-SET(SUBDIR_BASE
- AppQuickStart
- Basics
- SALOMELocalTrace
- HDFPersist
- KERNEL_PY
- Utils
-)
+ADD_SUBDIRECTORY(Basics)
+ADD_SUBDIRECTORY(SALOMELocalTrace)
+ADD_SUBDIRECTORY(HDFPersist)
+ADD_SUBDIRECTORY(Utils)
-SET(SUBDIR_CORBA
- DF
- Logger
- SALOMETraceCollector
- NamingService
- GenericObj
- Registry
- ModuleCatalog
- ResourcesManager
- Notification
- NOTIFICATION_SWIG
- Container
- SALOMESDS
- TestContainer
- Launcher
- Launcher_SWIG
- LifeCycleCORBA
- LifeCycleCORBA_SWIG
- SALOMEDSClient
- TOOLSDS
- KernelHelpers
- SALOMEDSImpl
- SALOMEDS
- ModuleGenerator
- Communication
- Communication_SWIG
- DSC
-)
-
-SET(SUBDIR_MPI MPIContainer TestMPIContainer)
-SET(SUBDIR_PARALLEL ParallelContainer)
-
-# CppUnit directories:
-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(SUBDIRS ${SUBDIR_BASE})
IF(NOT SALOME_LIGHT_ONLY)
- LIST(APPEND SUBDIRS ${SUBDIR_CORBA})
-ENDIF()
+ ADD_SUBDIRECTORY(AppQuickStart)
+ ADD_SUBDIRECTORY(KERNEL_PY)
+ ADD_SUBDIRECTORY(DF)
+ ADD_SUBDIRECTORY(Logger)
+ ADD_SUBDIRECTORY(SALOMETraceCollector)
+ ADD_SUBDIRECTORY(NamingService)
+ ADD_SUBDIRECTORY(GenericObj)
+ ADD_SUBDIRECTORY(Registry)
+ ADD_SUBDIRECTORY(ModuleCatalog)
+ ADD_SUBDIRECTORY(ResourcesManager)
+ ADD_SUBDIRECTORY(Notification)
+ ADD_SUBDIRECTORY(NOTIFICATION_SWIG)
+ ADD_SUBDIRECTORY(Container)
+ ADD_SUBDIRECTORY(SALOMESDS)
+ ADD_SUBDIRECTORY(Launcher)
+ ADD_SUBDIRECTORY(Launcher_SWIG)
+ ADD_SUBDIRECTORY(LifeCycleCORBA)
+ ADD_SUBDIRECTORY(LifeCycleCORBA_SWIG)
+ ADD_SUBDIRECTORY(SALOMEDSClient)
+ ADD_SUBDIRECTORY(TOOLSDS)
+ ADD_SUBDIRECTORY(KernelHelpers)
+ ADD_SUBDIRECTORY(SALOMEDSImpl)
+ ADD_SUBDIRECTORY(SALOMEDS)
+ ADD_SUBDIRECTORY(ModuleGenerator)
+ ADD_SUBDIRECTORY(Communication)
+ ADD_SUBDIRECTORY(Communication_SWIG)
+ ADD_SUBDIRECTORY(DSC)
-IF(SALOME_USE_MPI)
- LIST(APPEND SUBDIRS ${SUBDIR_MPI})
-ENDIF(SALOME_USE_MPI)
+ IF(SALOME_BUILD_TESTS)
+ ADD_SUBDIRECTORY(TestContainer)
+ ENDIF()
-IF(SALOME_BUILD_TESTS)
- LIST(APPEND SUBDIRS ${SUBDIR_CPPUNIT_BASE} ${SUBDIR_CPPUNIT_GENERAL})
- IF(NOT SALOME_LIGHT_ONLY)
- LIST(APPEND SUBDIRS ${SUBDIR_CPPUNIT_CORBA})
+ IF(SALOME_USE_MPI)
+ ADD_SUBDIRECTORY(MPIContainer)
+ IF(SALOME_BUILD_TESTS)
+ ADD_SUBDIRECTORY(TestMPIContainer)
+ ENDIF()
ENDIF()
-ENDIF()
-IF(SALOME_PACO_PARALLEL)
- LIST(APPEND SUBDIRS ${SUBDIR_PARALLEL})
+ IF(SALOME_PACO_PARALLEL)
+ ADD_SUBDIRECTORY(ParallelContainer)
+ ENDIF()
ENDIF()
-FOREACH(_dir ${SUBDIRS})
- ADD_SUBDIRECTORY(${_dir})
-ENDFOREACH()
+ADD_SUBDIRECTORY(UnitTests)
${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
${MPI_CXX_INCLUDE_PATH}
- ${PYTHON_INCLUDE_DIRS}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/Utils
)
-SET(COMMON_LIBS
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${MPI_DEFINITIONS})
+
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ ${MPI_CXX_LIBRARIES}
+ SALOMEBasics
OpUtil
SALOMELocalTrace
SalomeIDLKernel
- ${PYTHON_LIBRARIES}
- ${MPI_CXX_LIBRARIES}
)
SET(SalomeCommunication_SOURCES
MatrixClient.cxx
)
-ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${MPI_DEFINITIONS})
-
ADD_LIBRARY(SalomeCommunication ${SalomeCommunication_SOURCES})
-TARGET_LINK_LIBRARIES(SalomeCommunication ${COMMON_LIBS})
+TARGET_LINK_LIBRARIES(SalomeCommunication ${_link_LIBRARIES})
INSTALL(TARGETS SalomeCommunication EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-SET(COMMON_HEADERS_HXX
+SET(SalomeCommunication_HEADERS
MatrixClient.hxx
MultiCommException.hxx
Receiver.hxx
SenderFactory.hxx
)
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${SalomeCommunication_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+UNSET(SalomeCommunication_SOURCES)
+UNSET(SalomeCommunication_HEADERS)
+UNSET(_link_LIBRARIES)
INCLUDE(${SWIG_USE_FILE})
-SET_SOURCE_FILES_PROPERTIES(libSALOME_Comm.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(libSALOME_Comm.i PROPERTIES SWIG_FLAGS "-py3")
-
INCLUDE_DIRECTORIES(
+ ${PTHREAD_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
+ ${MPI_CXX_INCLUDE_PATH}
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/../Communication
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/Communication
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/Utils
)
-ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
-SET(_libSALOME_Comm_LIBS
- SalomeCommunication
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${MPI_DEFINITIONS})
+
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
${PYTHON_LIBRARIES}
+ ${MPI_CXX_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ SalomeCommunication
+ SalomeIDLKernel
)
-IF(SALOME_USE_MPI)
- INCLUDE_DIRECTORIES(${MPI_CXX_INCLUDE_PATH})
+SET_SOURCE_FILES_PROPERTIES(libSALOME_Comm.i PROPERTIES CPLUSPLUS ON)
+SET_SOURCE_FILES_PROPERTIES(libSALOME_Comm.i PROPERTIES SWIG_FLAGS "-py3")
- ADD_DEFINITIONS(${MPI_DEFINITIONS})
- SET(_libSALOME_Comm_LIBS
- ${_libSALOME_Comm_LIBS}
- ${MPI_CXX_LIBRARIES}
- )
-ENDIF(SALOME_USE_MPI)
IF(${CMAKE_VERSION} VERSION_LESS "3.8.0")
SWIG_ADD_MODULE(libSALOME_Comm python libSALOME_Comm.i)
ELSE()
SWIG_ADD_LIBRARY(libSALOME_Comm LANGUAGE python SOURCES libSALOME_Comm.i)
ENDIF()
-SWIG_LINK_LIBRARIES(libSALOME_Comm ${_libSALOME_Comm_LIBS})
+SWIG_LINK_LIBRARIES(libSALOME_Comm ${_link_LIBRARIES})
-IF(${MACHINE} STREQUAL WINDOWS)
+IF(WIN32)
SET_TARGET_PROPERTIES(_libSALOME_Comm PROPERTIES DEBUG_OUTPUT_NAME _libSALOME_Comm_d)
-ENDIF(${MACHINE} STREQUAL WINDOWS)
-
-ADD_DEPENDENCIES(_libSALOME_Comm SalomeIDLKernel)
+ENDIF()
INSTALL(TARGETS _libSALOME_Comm DESTINATION ${SALOME_INSTALL_PYTHON})
+
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_Comm.py DESTINATION ${SALOME_INSTALL_PYTHON})
+
+UNSET(_link_LIBRARIES)
#
INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
+ ${OMNIORB_INCLUDE_DIR}
${HDF5_INCLUDE_DIRS}
+ ${MPI_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS}
- ${PROJECT_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_CURRENT_SOURCE_DIR}/../SALOMETraceCollector/Test
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/NamingService
+ ${CMAKE_SOURCE_DIR}/src/Utils
+ ${CMAKE_SOURCE_DIR}/src/Registry
+ ${CMAKE_SOURCE_DIR}/src/Notification
+ ${CMAKE_SOURCE_DIR}/src/ResourcesManager
+ ${CMAKE_SOURCE_DIR}/src/HDFPersist
+ ${CMAKE_SOURCE_DIR}/src/GenericObj
+ ${CMAKE_SOURCE_DIR}/src/SALOMETraceCollector/Test
)
-SET(SCRIPTS
- SALOME_ComponentPy.py
- SALOME_PyNode.py
- SALOME_Container.py
-)
+ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${MPI_DEFINITIONS} ${OMNIORB_DEFINITIONS})
-ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${OMNIORB_DEFINITIONS})
-SET(COMMON_LIBS
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${HDF5_LIBRARIES}
+ ${MPI_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ ${PYTHON_LIBRARIES}
Registry
SalomeNotification
SalomeResourcesManager
SalomeHDFPersist
SalomeGenericObj
SalomeIDLKernel
- ${OMNIORB_LIBRARIES}
- ${PYTHON_LIBRARIES}
)
-IF(WITH_MPI_SEQ_CONTAINER)
- ADD_DEFINITIONS(${MPI_DEFINITIONS})
- SET(COMMON_LIBS
- ${MPI_CXX_LIBRARIES}
- )
-ENDIF(WITH_MPI_SEQ_CONTAINER)
-
IF(SALOME_PACO_PARALLEL)
INCLUDE_DIRECTORIES(${PACO_INCLUDE_DIRS})
ADD_DEFINITIONS(-DWITH_PACO_PARALLEL)
- LIST(APPEND COMMON_LIBS ${PACO_LIBRARIES})
+ LIST(APPEND _link_LIBRARIES ${PACO_LIBRARIES})
ENDIF()
SET(SalomeContainer_SOURCES
)
ADD_LIBRARY(SalomeContainer ${SalomeContainer_SOURCES})
-TARGET_LINK_LIBRARIES(SalomeContainer ${COMMON_LIBS} ${PTHREAD_LIBRARIES})
+TARGET_LINK_LIBRARIES(SalomeContainer ${_link_LIBRARIES})
INSTALL(TARGETS SalomeContainer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-SET(SALOME_Container_LIBS
- SalomeContainer
- SALOMEBasics
- ${COMMON_LIBS}
- ${HDF5_LIBRARIES}
- ${MPI_LIBRARIES}
+SET(Container_SOURCES
+ SALOME_Container.cxx
+ SALOME_Container_SignalsHandler.cxx
)
-ADD_EXECUTABLE(SALOME_Container SALOME_Container.cxx SALOME_Container_SignalsHandler.cxx)
-TARGET_LINK_LIBRARIES(SALOME_Container ${SALOME_Container_LIBS})
+ADD_EXECUTABLE(SALOME_Container ${Container_SOURCES})
+TARGET_LINK_LIBRARIES(SALOME_Container ${_link_LIBRARIES} SalomeContainer)
+INSTALL(TARGETS SALOME_Container EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
IF(SALOME_BUILD_TESTS)
ADD_EXECUTABLE(TestSalome_file TestSalome_file.cxx)
- TARGET_LINK_LIBRARIES(TestSalome_file SALOMETraceCollectorTest ${SALOME_Container_LIBS})
+ TARGET_LINK_LIBRARIES(TestSalome_file ${_link_LIBRARIES} SalomeContainer)
ENDIF()
-INSTALL(TARGETS SALOME_Container DESTINATION ${SALOME_INSTALL_BINS})
-# Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+SET(Container_SCRIPTS
+ SALOME_ComponentPy.py
+ SALOME_PyNode.py
+ SALOME_Container.py
+)
+
+SALOME_INSTALL_SCRIPTS("${Container_SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON})
+
+SET(Container_HEADERS
+ Container_init_python.hxx
+ SALOME_Component_i.hxx
+ SALOME_Container.hxx
+ SALOME_Container_i.hxx
+ SALOME_ContainerManager.hxx
+ SALOME_CPythonHelper.hxx
+ Salome_file_i.hxx
+ SALOME_FileRef_i.hxx
+ SALOME_FileTransfer_i.hxx
+)
+
+INSTALL(FILES ${Container_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+UNSET(SalomeContainer_SOURCES)
+UNSET(Container_SOURCES)
+UNSET(Container_SCRIPTS)
+UNSET(Container_HEADERS)
+UNSET(_link_LIBRARIES)
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE_DIRECTORIES(
- ${Boost_INCLUDE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
-)
ADD_DEFINITIONS(${BOOST_DEFINITIONS})
SET(DF_SOURCES
DF_Container.cxx
)
+SET(DF_HEADERS
+ DF_Application.hxx
+ DF_Attribute.hxx
+ DF_ChildIterator.hxx
+ DF_Container.hxx
+ DF_Document.hxx
+ DF_Label.hxx
+ DF_definitions.hxx
+)
+
ADD_LIBRARY(DF ${DF_SOURCES})
INSTALL(TARGETS DF EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-ADD_EXECUTABLE(testDF testDF.cxx)
-TARGET_LINK_LIBRARIES(testDF DF SALOMEBasics)
-INSTALL(TARGETS testDF DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(FILES ${DF_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+IF(SALOME_BUILD_TESTS)
+ INCLUDE_DIRECTORIES(
+ ${CPPUNIT_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/src/Basics/Test
+ )
+ SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/DF)
+
+ ADD_EXECUTABLE(TestDF testDF.cxx)
+ TARGET_LINK_LIBRARIES(TestDF ${CPPUNIT_LIBRARIES} DF SALOMEBasics)
+ INSTALL(TARGETS TestDF DESTINATION ${LOCAL_TEST_DIR})
+
+ INSTALL(FILES TestDF.py DESTINATION ${LOCAL_TEST_DIR})
+
+ INSTALL(FILES CTestTestfileInstall.cmake
+ DESTINATION ${LOCAL_TEST_DIR}
+ RENAME CTestTestfile.cmake)
+ENDIF()
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+UNSET(DF_SOURCES)
+UNSET(DF_HEADERS)
+UNSET(LOCAL_TEST_DIR)
--- /dev/null
+# Copyright (C) 2015-2020 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, or (at your option) any later version.
+#
+# 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
+#
+
+IF(NOT WIN32)
+ SET(TEST_NAME ${COMPONENT_NAME}_DF)
+ ADD_TEST(${TEST_NAME} ${SALOME_TEST_DRIVER} ${TIMEOUT} TestDF.py)
+ SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
+ LABELS "${COMPONENT_NAME}"
+ ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+ )
+ENDIF()
--- /dev/null
+# -*- coding: iso-8859-1 -*-
+# Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# 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
+#
+
+import sys, signal,string,subprocess
+import subprocess
+import setenv
+
+# get SALOME environment :
+# here we need KERNEL_ROOT_DIR, PATH, LD_LIBRARY_PATH
+
+args, modules_list, modules_root_dir = setenv.get_config()
+setenv.set_env(args, modules_list, modules_root_dir)
+
+# execute Unit Test
+
+command = ['./TestDF']
+ret = subprocess.call(command)
+
+# no process to kill
+exit(ret)
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//File: testDF.cxx
-//Author: Sergey RUIN
-//
-#include <stdio.h>
-#include <iostream>
-#include <vector>
-#include <string>
-#include <string.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <sstream>
-#include "DF_definitions.hxx"
#include "DF_Application.hxx"
#include "DF_Document.hxx"
#include "DF_Attribute.hxx"
#include "DF_Label.hxx"
#include "DF_Container.hxx"
-#include "DF_ChildIterator.hxx"
-
-#include "Basics_Utils.hxx"
-#include "Basics_DirUtils.hxx"
-
-#ifndef WIN32
-#include <unistd.h>
-#include <sys/time.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <pwd.h>
-#else
-#include <time.h>
-#include <windows.h>
-#include <lmcons.h>
-#endif
-
-
-void printStr(const std::string& theValue)
-{
- std::cout << "printStr: " << theValue << std::endl;
-}
-void GetSystemDate(int& year, int& month, int& day, int& hours, int& minutes, int& seconds)
+class DFTest : public CppUnit::TestFixture
{
-#ifdef WIN32
- SYSTEMTIME st;
+ CPPUNIT_TEST_SUITE( DFTest );
+ CPPUNIT_TEST( test1 );
+ CPPUNIT_TEST( test2 );
+ CPPUNIT_TEST_SUITE_END();
- GetLocalTime ( &st );
+public:
+ void setUp();
+ void tearDown();
- month = st.wMonth;
- day = st.wDay;
- year = st.wYear;
- hours = st.wHour;
- minutes = st.wMinute;
- seconds = st.wSecond;
-#else
- struct tm transfert;
- struct timeval tval;
- struct timezone tzone;
- int status;
+ void test1();
+ void test2();
+};
- status = gettimeofday( &tval, &tzone );
- memcpy(&transfert, localtime((time_t *)&tval.tv_sec), sizeof(tm));
-
- month = transfert.tm_mon + 1;
- day = transfert.tm_mday;
- year = transfert.tm_year + 1900;
- hours = transfert.tm_hour;
- minutes = transfert.tm_min ;
- seconds = transfert.tm_sec ;
-#endif
-}
-
-std::string GetUserName()
+void DFTest::setUp()
{
-#ifdef WIN32
-#ifdef UNICODE
- wchar_t* pBuff = new wchar_t[UNLEN + 1];
-#else
- char* pBuff = new char[UNLEN + 1];
-#endif
- DWORD dwSize = UNLEN + 1;
- std::string retVal;
- GetUserName ( pBuff, &dwSize );
-#ifdef UNICODE
- std::wstring theTmpUserName(pBuff, (int)dwSize - 1);
- retVal = Kernel_Utils::utf8_encode_s(theTmpUserName);
-#else
- std::string theTmpUserName(pBuff, (int)dwSize - 1);
- retVal = theTmpUserName;
-#endif
- delete [] pBuff;
- return retVal;
-#else
- struct passwd *infos;
- infos = getpwuid(getuid());
- return std::string(infos->pw_name);
-#endif
}
-std::string GetNameFromPath(const std::string& thePath) {
- if (thePath.empty()) return "";
- int pos1 = thePath.rfind('/');
- int pos2 = thePath.rfind('\\');
- if(pos1 > 0) return thePath.substr(pos1+1, thePath.size());
- if(pos2 > 0) return thePath.substr(pos2+1, thePath.size());
- return thePath;
-}
-
-std::string GetDirFromPath(const std::string& thePath) {
- if (thePath.empty()) return "";
-
- int pos = thePath.rfind('/');
- std::string path;
- if(pos > 0) {
- path = thePath.substr(0, pos+1);
- }
- if(path.empty()) {
- pos = thePath.rfind('\\');
- if(pos > 0) path = thePath.substr(0, pos+1);
- }
- if(path.empty()) {
- pos = thePath.rfind('|');
- if(pos > 0) path = thePath.substr(0, pos+1);
- }
- if(path.empty()) {
- path = thePath+"/";
- }
-
-#ifdef WIN32 //Check if the only disk letter is given as path
- if(path.size() == 2 && path[1] == ':') path +='\\';
-#endif
-
- for(int i = 0, len = path.size(); i<len; i++)
- if(path[i] == '|') path[i] = '/';
- return path;
-}
-
-
-bool Exists(const std::string thePath)
+void DFTest::tearDown()
{
- return Kernel_Utils::IsExists( thePath );
}
-
-std::string divideString(const std::string& theValue, int nbChars)
+void DFTest::test1()
{
- return theValue.substr(nbChars, theValue.size());
-}
-
-std::vector<std::string> splitString(const std::string& theValue, char separator)
-{
- std::vector<std::string> vs;
- if(theValue[0] == separator && theValue.size() == 1) return vs;
- int pos = theValue.find(separator);
- if(pos < 0) {
- vs.push_back(theValue);
- return vs;
- }
-
- std::string s = theValue;
- if(s[0] == separator) s = s.substr(1, s.size());
- while((pos = s.find(separator)) >= 0) {
- vs.push_back(s.substr(0, pos));
- s = s.substr(pos+1, s.size());
- }
-
- if(!s.empty() && s[0] != separator) vs.push_back(s);
- return vs;
-}
-
-
-int main (int argc, char * argv[])
-{
- std::cout << "Test started " << std::endl;
-
DF_Application* appli = new DF_Application;
- /*
- DF_Document* doc1 = appli->NewDocument("doc_1");
+ DF_Document* doc = appli->NewDocument("doc");
- DF_Label root1 = doc1->Main();
- DF_Label child = root1.FindChild(3, true); //0:1:3
-
- DF_Container* attr1 = DF_Container::Set(child);
- attr1->SetInt("eighteen", 18);
-
-
- DF_Attribute* attr = NULL;
- if(!(attr = child.FindAttribute(DF_Container::GetID()))) {
- std::cout << "Attribute wasn't found" << std::endl;
- }
- else {
- attr1 = dynamic_cast<DF_Container*>(attr);
- std::cout << "Attribute was found " << " HasID " << attr1->HasIntID("eighteen") << " value = " << attr1->GetInt("eighteen")<< std::endl;
- }
-
- DF_Container *attr2 = (DF_Container*)child.FindAttribute(DF_Container::GetID());
-
- if(!attr2) cout << "Can't find the attribute" << endl;
-
- std::cout << "Change find : " << attr2->GetInt("eighteen") << std::endl;
-
-
- std::cout << "Forgetting " << child.ForgetAttribute(DF_Container::GetID()) << std::endl;
- if(!child.FindAttribute(DF_Container::GetID())) {
- std::cout << "Attribute wasn't found" << std::endl;
- }
-
-
- child = root1.NewChild(); //0:1:4
-
- child.NewChild();//0:1:4:1
-
- child.NewChild();//0:1:4:2
-
- std::cout << "Is equal " << (child == child) << std::endl;
- std::cout << "Is equal " << (child == root1) << std::endl;
-
- child = root1.NewChild(); //0:1:5
-
- child.NewChild();//0:1:5:1
- root1.NewChild();//0:1:6
+ DF_Label root = doc->Main(); //0:1
+ DF_Label child = root.FindChild(3, true); //0:1:3
+ CPPUNIT_ASSERT(child.Entry() == "0:1:3");
+ DF_Container* attr = DF_Container::Set(child);
+ attr->SetInt("integer_value", 18);
+
+ DF_Attribute* result = child.FindAttribute(DF_Container::GetID());
+ CPPUNIT_ASSERT(result);
+ attr = dynamic_cast<DF_Container*>(result);
+ CPPUNIT_ASSERT(attr->HasIntID("integer_value"));
+ CPPUNIT_ASSERT(attr->GetInt("integer_value") == 18);
+
+ attr->SetInt("integer_value", 100);
+ CPPUNIT_ASSERT(attr->GetInt("integer_value") == 100);
+
+ child.ForgetAttribute(DF_Container::GetID());
+ result = child.FindAttribute(DF_Container::GetID());
+ CPPUNIT_ASSERT(!result);
+
+ child = root.NewChild(); //0:1:4
+ child.NewChild(); //0:1:4:1
+ child.NewChild(); //0:1:4:2
+ CPPUNIT_ASSERT(child == child);
+ CPPUNIT_ASSERT(child != root);
+
+ child = root.NewChild(); //0:1:5
+ child.NewChild(); //0:1:5:1
+ child = root.NewChild(); //0:1:6
+ CPPUNIT_ASSERT(child.Entry() == "0:1:6");
+
+ child = DF_Label::Label(child, "0:1:4:1"); //0:1:4:1
+ CPPUNIT_ASSERT(child.Entry() == "0:1:4:1");
+ attr = DF_Container::Set(child);
+ attr->SetDouble("double_value", 1.23);
+ CPPUNIT_ASSERT(attr->HasDoubleID("double_value"));
+ attr->SetString("string_value", "custom string");
+ CPPUNIT_ASSERT(attr->HasStringID("string_value"));
+}
- DF_ChildIterator CI(root1.Father(), true);
- //root1.dump();
- for(; CI.More(); CI.Next()) {
- std::cout << CI.Value().Entry() << std::endl;
- //CI.Value().dump();
- }
+void DFTest::test2()
+{
+ DF_Application* appli = new DF_Application;
+ DF_Document* doc = appli->NewDocument("doc");
- DF_Label L = DF_Label::Label(child, "0:1:4:1");
- std::cout << "Found Label " << L.Entry() << std::endl;
+ DF_Label root = doc->Main(); //0:1
+ CPPUNIT_ASSERT(root.Tag() == 1);
+ CPPUNIT_ASSERT(root.Entry() == "0:1");
- std::string s("012-56");
-
- int pos = s.find('-');
- std::cout << "First part : " << s.substr(0, pos) << std::endl;
- std::cout << "Last part : " << s.substr(pos+1, s.size()) << std::endl;
+ DF_Label sco = root.NewChild(); //0:1:1
+ CPPUNIT_ASSERT(sco.Tag() == 1);
+ CPPUNIT_ASSERT(sco.Entry() == "0:1:1");
- std::vector<std::string> vs = splitString("/dn20/salome/srn/salome2/", '/');
- for(int i = 0; i<vs.size(); i++)
- std::cout << vs[i] << std::endl;
+ DF_Label so_3 = sco.FindChild(3, true); //0:1:1:3
+ CPPUNIT_ASSERT(so_3.Tag() == 3);
+ CPPUNIT_ASSERT(so_3.Entry() == "0:1:1:3");
- std::cout << "Diveded str = " << divideString("abcdefg",3) << std::endl;
-
- //mkdir("/dn20/salome/srn/salome2", 0x1ff);
+ DF_Label so_5 = sco.FindChild(5, true); //0:1:1:5
+ CPPUNIT_ASSERT(so_5.Tag() == 5);
+ CPPUNIT_ASSERT(so_5.Entry() == "0:1:1:5");
- //cout << "Exists " << Exists("/dn20/salome/srn/salome2") << endl;
+ DF_Label so_5_1 = so_5.NewChild(); //0:1:1:5:1
+ CPPUNIT_ASSERT(so_5_1.Tag() == 1);
+ CPPUNIT_ASSERT(so_5_1.Entry() == "0:1:1:5:1");
- //cout << GetDirFromPath("/dn20/salome/srn/salome2/test.hdf") << endl;
- //cout << GetDirFromPath("D:\\salome\\srn\\salome2\\test.hdf") << endl;
- //cout << GetDirFromPath("D:") << endl;
- //cout << GetDirFromPath("/dn20") << endl;
- //cout << GetDirFromPath("..") << endl;
- //cout << GetDirFromPath("D:\\") << endl;
- //cout << GetDirFromPath("D:\\test.hdf") << endl;
+ DF_Label so_5_1_1 = so_5_1.NewChild(); //0:1:1:5:1:1
+ CPPUNIT_ASSERT(so_5_1_1.Tag() == 1);
+ CPPUNIT_ASSERT(so_5_1_1.Entry() == "0:1:1:5:1:1");
- cout << "User : " << GetUserName() << endl;
-
- int month=0,day=0,year=0,hh=0,mn=0,ss=0;
- GetSystemDate(year, month, day, hh, mn, ss);
- std::cout << "Date: " << year << " " << month << " " << day << " " << hh << " " << mn << " " << ss << std::endl;
+ DF_Label so_5_1_3 = so_5_1.FindChild(3, true); //0:1:1:5:1:3
+ CPPUNIT_ASSERT(so_5_1_3.Tag() == 3);
+ CPPUNIT_ASSERT(so_5_1_3.Entry() == "0:1:1:5:1:3");
- std::string t("absd");
- t.insert(t.begin(), 'b');
- cout << "Result = " << t << endl;
- char* cstr = (char*)t.c_str();
- printStr(cstr+1);
-
- */
+ DF_Label so_5_1_3_1 = so_5_1_3.NewChild(); //0:1:1:5:1:3:1
+ CPPUNIT_ASSERT(so_5_1_3_1.Tag() == 1);
+ CPPUNIT_ASSERT(so_5_1_3_1.Entry() == "0:1:1:5:1:3:1");
- DF_Document* doc2 = appli->NewDocument("doc_2");
-
- DF_Label root2 = doc2->Main();
- DF_Label sco = root2.NewChild(); //0:1:1
- DF_Label so1 = sco.FindChild(3, true); //0:1:1:3
- DF_Label so5 = so1.FindChild(5, true); //0:1:1:5
- DF_Label so51 = so5.NewChild(); //0:1:1:5:1
- DF_Label so511 = so51.NewChild(); //0:1:1:5:1:1
- DF_Label so513 = so51.FindChild(3, true); //0:1:1:5:1:3
- DF_Label so5131 = so513.NewChild(); //0:1:1:5:1:3:1
-
-
- so51.FindChild(2, true);
+ DF_Label so_5_1_2 = so_5_1.FindChild(2, true);
+ CPPUNIT_ASSERT(so_5_1_2.Tag() == 2);
+ CPPUNIT_ASSERT(so_5_1_2.Entry() == "0:1:1:5:1:2");
+ delete appli;
+}
- DF_ChildIterator CI2(so5, true);
- so5.dump();
- for(; CI2.More(); CI2.Next()) {
- std::cout << " ###### Found child with entry = " << CI2.Value().Entry() << std::endl;
- //CI2.Value().dump();
- }
+// --- Registers the fixture into the 'registry'
- delete appli;
+CPPUNIT_TEST_SUITE_REGISTRATION( DFTest );
- std::cout << "Test finished " << std::endl;
- return 0;
-}
+// --- generic Main program from Basic/Test
+#include "BasicMainTest.hxx"
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-SET(SUBDIRS_COMMON
- DSC_Basic
-)
+ADD_SUBDIRECTORY(DSC_Basic)
IF(NOT WIN32)
- SET(SUBDIRS_ADD
- DSC_User
- DSC_Python
- )
+ ADD_SUBDIRECTORY(DSC_User)
+ ADD_SUBDIRECTORY(DSC_Python)
ENDIF()
IF(SALOME_PACO_PARALLEL)
- SET(SUBDIR_PAR
- ParallelDSC
- )
+ ADD_SUBDIRECTORY(ParallelDSC)
ENDIF()
-
-SET(SUBDIRS
- ${SUBDIRS_COMMON}
- ${SUBDIRS_ADD}
- ${SUBDIR_PAR}
-)
-
-FOREACH(DIR ${SUBDIRS})
- ADD_SUBDIRECTORY(${DIR})
-ENDFOREACH(DIR ${SUBDIRS})
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIR}
${OMNIORB_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${PROJECT_SOURCE_DIR}/src/Container
- ${PROJECT_SOURCE_DIR}/src/GenericObj
- ${PROJECT_SOURCE_DIR}/src/Notification
- ${PROJECT_SOURCE_DIR}/src/SALOMELocalTrace
- ${PROJECT_SOURCE_DIR}/src/Basics
- ${PROJECT_SOURCE_DIR}/src/NamingService
- ${PROJECT_SOURCE_DIR}/src/Utils
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${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
+)
+
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ SALOMELocalTrace
+ SalomeContainer
+ SalomeNS
+ SalomeIDLKernel
)
SET(SalomeDSCContainer_SOURCES
PortProperties_i.cxx
)
-ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
-
ADD_LIBRARY(SalomeDSCContainer ${SalomeDSCContainer_SOURCES})
-TARGET_LINK_LIBRARIES(SalomeDSCContainer SalomeContainer ${OMNIORB_LIBRARIES})
+TARGET_LINK_LIBRARIES(SalomeDSCContainer ${_link_LIBRARIES})
INSTALL(TARGETS SalomeDSCContainer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
SET(SALOME_ConnectionManagerServer_SOURCES
ConnectionManager_i.cxx
)
-SET(SALOME_ConnectionManagerServer_LIBS
- SalomeIDLKernel
- SalomeNS
- SALOMELocalTrace
- SalomeContainer
- ${OMNIORB_LIBRARIES}
-)
-
ADD_EXECUTABLE(SALOME_ConnectionManagerServer ${SALOME_ConnectionManagerServer_SOURCES})
-TARGET_LINK_LIBRARIES(SALOME_ConnectionManagerServer ${SALOME_ConnectionManagerServer_LIBS})
+TARGET_LINK_LIBRARIES(SALOME_ConnectionManagerServer ${_link_LIBRARIES})
INSTALL(TARGETS SALOME_ConnectionManagerServer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+SET(SalomeDSCContainer_HEADERS
+ ConnectionManager_i.hxx
+ DSC_Basic.hxx
+ DSC_Callbacks.hxx
+ DSC_i.hxx
+ DSC_interface.hxx
+ PortProperties_i.hxx
+)
+
+INSTALL(FILES ${SalomeDSCContainer_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+UNSET(SalomeDSCContainer_SOURCES)
+UNSET(SALOME_ConnectionManagerServer_SOURCES)
+UNSET(SalomeDSCContainer_HEADERS)
+UNSET(_link_LIBRARIES)
# 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_SOURCE_FILES_PROPERTIES(calcium.i PROPERTIES SWIG_FLAGS "-py3")
-SET(CMAKE_SWIG_FLAGS "-noexcept")
-ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS} ${NUMPY_DEFINITIONS})
-
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
${NUMPY_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
- ${OMNIORBPY_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${PROJECT_SOURCE_DIR}/src/DSC/DSC_User
- ${PROJECT_SOURCE_DIR}/src/DSC/DSC_User/Datastream
- ${PROJECT_SOURCE_DIR}/src/DSC/DSC_User/Datastream/Palm
- ${PROJECT_SOURCE_DIR}/src/DSC/DSC_User/Datastream/Calcium
- ${PROJECT_BINARY_DIR}/src/DSC/DSC_User/Datastream/Calcium
- ${PROJECT_SOURCE_DIR}/src/DSC/DSC_User/Basic
- ${PROJECT_SOURCE_DIR}/src/DSC/DSC_Basic
- ${PROJECT_SOURCE_DIR}/src/SALOMELocalTrace
- ${PROJECT_SOURCE_DIR}/src/Basics
- ${PROJECT_SOURCE_DIR}/src/Utils
- ${PROJECT_SOURCE_DIR}/src/Container
- ${PROJECT_SOURCE_DIR}/src/GenericObj
- ${PROJECT_SOURCE_DIR}/src/Notification
- ${PROJECT_BINARY_DIR}/idl
- )
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${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
+)
+
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS} ${NUMPY_DEFINITIONS})
-SET(_calcium_LIBS
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${PYTHON_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
CalciumC
SalomeDatastream
SalomeDSCSupervBasic
SalomeDSCSuperv
SalomeDSCContainer
SalomeContainer
- ${OMNIORB_LIBRARIES}
)
+SET_SOURCE_FILES_PROPERTIES(calcium.i PROPERTIES CPLUSPLUS ON)
+SET_SOURCE_FILES_PROPERTIES(calcium.i PROPERTIES SWIG_FLAGS "-py3")
+SET(CMAKE_SWIG_FLAGS "-noexcept")
+
IF(${CMAKE_VERSION} VERSION_LESS "3.8.0")
SWIG_ADD_MODULE(calcium python calcium.i)
ELSE()
SWIG_ADD_LIBRARY(calcium LANGUAGE python SOURCES calcium.i)
ENDIF()
+SWIG_LINK_LIBRARIES(calcium ${_link_LIBRARIES})
+
+IF(WIN32)
+ SET_TARGET_PROPERTIES(_calcium PROPERTIES DEBUG_OUTPUT_NAME _calcium_d)
+ENDIF()
-SWIG_LINK_LIBRARIES(calcium ${_calcium_LIBS})
INSTALL(TARGETS _calcium DESTINATION ${SALOME_INSTALL_PYTHON})
SET(SCRIPTS
dsccalcium.py
${CMAKE_CURRENT_BINARY_DIR}/calcium.py
)
-SALOME_INSTALL_SCRIPTS( "${SCRIPTS}" ${SALOME_INSTALL_PYTHON} EXTRA_DPYS "${SWIG_MODULE_calcium_REAL_NAME}")
+
+SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${SALOME_INSTALL_PYTHON} EXTRA_DPYS "${SWIG_MODULE_calcium_REAL_NAME}")
+
+UNSET(SCRIPTS)
+UNSET(_link_LIBRARIES)
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/idl
- ${PROJECT_BINARY_DIR}/salome_adm
- ${PROJECT_SOURCE_DIR}/src/DSC/DSC_Basic
- ${PROJECT_SOURCE_DIR}/src/DSC/DSC_User
- ${PROJECT_SOURCE_DIR}/src/Container
- ${PROJECT_SOURCE_DIR}/src/GenericObj
- ${PROJECT_SOURCE_DIR}/src/Notification
- ${PROJECT_SOURCE_DIR}/src/SALOMELocalTrace
- ${PROJECT_SOURCE_DIR}/src/Basics
- ${PROJECT_SOURCE_DIR}/src/Utils)
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${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)
+
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ SalomeDSCSuperv
+)
SET(SalomeDSCSupervBasic_SOURCES
basic_port_factory.cxx
data_short_port_provides.cxx
)
-ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
ADD_LIBRARY(SalomeDSCSupervBasic ${SalomeDSCSupervBasic_SOURCES})
-TARGET_LINK_LIBRARIES(SalomeDSCSupervBasic SalomeDSCSuperv)
+TARGET_LINK_LIBRARIES(SalomeDSCSupervBasic ${_link_LIBRARIES})
INSTALL(TARGETS SalomeDSCSupervBasic EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+SET(SalomeDSCSupervBasic_HEADERS
+ basic_port_factory.hxx
+ data_short_port_provides.hxx
+ data_short_port_uses.hxx
+)
+
+INSTALL(FILES ${SalomeDSCSupervBasic_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+UNSET(SalomeDSCSupervBasic_SOURCES)
+SET(SalomeDSCSupervBasic_HEADERS)
+UNSET(_link_LIBRARIES)
# 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_DIR}
${PTHREAD_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${PROJECT_SOURCE_DIR}/src/Container
- ${PROJECT_SOURCE_DIR}/src/GenericObj
- ${PROJECT_SOURCE_DIR}/src/Notification
- ${PROJECT_SOURCE_DIR}/src/DSC/DSC_Basic
- ${PROJECT_SOURCE_DIR}/src/SALOMELocalTrace
- ${PROJECT_SOURCE_DIR}/src/Basics
- ${PROJECT_SOURCE_DIR}/src/Utils
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${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
)
-ADD_SUBDIRECTORY(Basic)
-ADD_SUBDIRECTORY(Datastream)
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
-ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS})
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ OpUtil
+ SALOMELocalTrace
+)
SET(SalomeDSCSuperv_SOURCES
base_port.cxx
)
ADD_LIBRARY(SalomeDSCSuperv ${SalomeDSCSuperv_SOURCES})
-TARGET_LINK_LIBRARIES(SalomeDSCSuperv SalomeDSCContainer ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(SalomeDSCSuperv ${_link_LIBRARIES} SalomeDSCContainer)
INSTALL(TARGETS SalomeDSCSuperv EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-ADD_EXECUTABLE(test_DSC_Exception test_DSC_Exception.cxx)
-TARGET_LINK_LIBRARIES(test_DSC_Exception OpUtil SALOMELocalTrace
- ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS} ${PTHREAD_LIBRARIES})
+IF(SALOME_BUILD_TESTS)
+ ADD_EXECUTABLE(test_DSC_Exception test_DSC_Exception.cxx)
+ TARGET_LINK_LIBRARIES(test_DSC_Exception ${_link_LIBRARIES})
+ENDIF()
+
+SET(SalomeDSCSuperv_HEADERS
+ base_port.hxx
+ DSC_Exception.hxx
+ port_factory.hxx
+ provides_port.hxx
+ Superv_Component_i.hxx
+ uses_port.hxx
+)
+
+INSTALL(FILES ${SalomeDSCSuperv_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+UNSET(SalomeDSCSuperv_SOURCES)
+UNSET(SalomeDSCSuperv_HEADERS)
+UNSET(_link_LIBRARIES)
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+ADD_SUBDIRECTORY(Palm)
+ADD_SUBDIRECTORY(Calcium)
+
INCLUDE_DIRECTORIES(
+ ${PTHREAD_INCLUDE_DIR}
+ ${OMNIORB_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${PROJECT_SOURCE_DIR}/src/DSC/DSC_User
- ${PROJECT_BINARY_DIR}/src/DSC/DSC_User/Datastream/Palm
- ${PROJECT_BINARY_DIR}/src/DSC/DSC_User/Datastream/Calcium
- ${CMAKE_CURRENT_SOURCE_DIR}/..
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User
)
-ADD_SUBDIRECTORY(Palm)
-ADD_SUBDIRECTORY(Calcium)
+ADD_DEFINITIONS(${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS})
-# This local variable defines the list of dependent libraries common to all target in this package.
-SET(COMMON_LIBS
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
SalomePalm
SalomeCalcium
SalomeDSCSuperv
)
-ADD_DEFINITIONS(${BOOST_DEFINITIONS})
-
ADD_LIBRARY(SalomeDatastream fake.cc)
-TARGET_LINK_LIBRARIES(SalomeDatastream ${COMMON_LIBS})
+TARGET_LINK_LIBRARIES(SalomeDatastream ${_link_LIBRARIES})
INSTALL(TARGETS SalomeDatastream EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-SET(COMMON_HEADERS_HXX
+SET(SalomeDatastream_HEADERS
AdjacentFunctor.hxx
ConstTraits.hxx
CorbaTypeManipulator.hxx
IteratorTraits.hxx
)
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${SalomeDatastream_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+UNSET(SalomeDatastream_HEADERS)
+UNSET(_link_LIBRARIES)
#
INCLUDE_DIRECTORIES(
+ ${PTHREAD_INCLUDE_DIR}
${OMNIORB_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${PROJECT_SOURCE_DIR}/src/DSC/DSC_User
- ${PROJECT_SOURCE_DIR}/src/DSC/DSC_User/Datastream
- ${PROJECT_SOURCE_DIR}/src/DSC/DSC_User/Datastream/Palm
- ${PROJECT_SOURCE_DIR}/src/DSC/DSC_User/Datastream/Calcium
- ${PROJECT_SOURCE_DIR}/src/DSC/DSC_User/Basic
- ${PROJECT_SOURCE_DIR}/src/DSC/DSC_Basic
- ${PROJECT_SOURCE_DIR}/src/SALOMELocalTrace
- ${PROJECT_SOURCE_DIR}/src/Basics
- ${PROJECT_SOURCE_DIR}/src/Utils
- ${PROJECT_SOURCE_DIR}/src/Container
- ${PROJECT_SOURCE_DIR}/src/GenericObj
- ${PROJECT_SOURCE_DIR}/src/Notification
- ${PROJECT_BINARY_DIR}/idl
- ${PROJECT_BINARY_DIR}/src/DSC/DSC_User/Datastream/Calcium
+ ${Boost_INCLUDE_DIR}
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${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_CURRENT_BINARY_DIR}
+)
+
+ADD_DEFINITIONS(${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ SalomeDSCSuperv
+ SalomeContainer
)
SET(SalomeCalcium_SOURCES
calcium_destructors_port_uses.cxx
)
-ADD_DEFINITIONS(${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS})
-
ADD_LIBRARY(SalomeCalcium ${SalomeCalcium_SOURCES})
-TARGET_LINK_LIBRARIES(SalomeCalcium SalomeDSCSuperv SalomeContainer ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS})
-
+TARGET_LINK_LIBRARIES(SalomeCalcium ${_link_LIBRARIES})
INSTALL(TARGETS SalomeCalcium EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
SET(CalciumC_SOURCES
Calcium.cxx
calciumf.c
)
-ADD_LIBRARY(CalciumC ${CalciumC_SOURCES})
-TARGET_LINK_LIBRARIES(CalciumC SalomeDSCSuperv SalomeCalcium)
+ADD_LIBRARY(CalciumC ${CalciumC_SOURCES})
+TARGET_LINK_LIBRARIES(CalciumC ${_link_LIBRARIES} SalomeCalcium)
INSTALL(TARGETS CalciumC EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-ADD_EXECUTABLE(test_DataIdContainer_Calcium test_DataIdContainer.cxx)
-TARGET_LINK_LIBRARIES(test_DataIdContainer_Calcium SalomeDSCSuperv SalomeContainer SalomeCalcium OpUtil SALOMELocalTrace ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS})
+IF(SALOME_BUILD_TESTS)
+ ADD_EXECUTABLE(test_DataIdContainer_Calcium test_DataIdContainer.cxx)
+ TARGET_LINK_LIBRARIES(test_DataIdContainer_Calcium ${_link_LIBRARIES} SalomeCalcium)
+ENDIF()
SALOME_CONFIGURE_FILE(calcium_integer_port_uses.hxx.in calcium_integer_port_uses.hxx)
SALOME_CONFIGURE_FILE(CalciumProvidesPort.hxx.in CalciumProvidesPort.hxx)
SALOME_CONFIGURE_FILE(CalciumFortranInt.h.in CalciumFortranInt.h)
-SET(COMMON_HEADERS
+SET(Calcium_HEADERS
Calcium.hxx
CalciumCInterface.hxx
CalciumCouplingPolicy.hxx
${CMAKE_CURRENT_BINARY_DIR}/CalciumProvidesPort.hxx
${CMAKE_CURRENT_BINARY_DIR}/calcium_integer_port_uses.hxx
)
-INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${Calcium_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+UNSET(SalomeCalcium_SOURCES)
+UNSET(CalciumC_SOURCES)
+UNSET(Calcium_HEADERS)
+UNSET(_link_LIBRARIES)
#
INCLUDE_DIRECTORIES(
+ ${PTHREAD_INCLUDE_DIR}
${OMNIORB_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${PROJECT_SOURCE_DIR}/src/DSC/DSC_User
- ${PROJECT_SOURCE_DIR}/src/DSC/DSC_User/Datastream
- ${PROJECT_SOURCE_DIR}/src/DSC/DSC_Basic
- ${PROJECT_SOURCE_DIR}/src/Container
- ${PROJECT_SOURCE_DIR}/src/GenericObj
- ${PROJECT_SOURCE_DIR}/src/Notification
- ${PROJECT_SOURCE_DIR}/src/SALOMELocalTrace
- ${PROJECT_SOURCE_DIR}/src/Basics
- ${PROJECT_SOURCE_DIR}/src/Utils
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${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
)
-
ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+)
+
ADD_LIBRARY(SalomePalm palm_port_factory.cxx)
-TARGET_LINK_LIBRARIES(SalomePalm SalomeDSCSuperv ${OMNIORB_LIBRARIES})
+TARGET_LINK_LIBRARIES(SalomePalm ${_link_LIBRARIES} SalomeDSCSuperv)
INSTALL(TARGETS SalomePalm EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-ADD_EXECUTABLE(test_DataIdContainer_Palm test_DataIdContainer.cxx)
-ADD_DEPENDENCIES(test_DataIdContainer_Palm SalomeIDLKernel)
-TARGET_LINK_LIBRARIES(test_DataIdContainer_Palm ${OMNIORB_LIBRARIES})
+IF(SALOME_BUILD_TESTS)
+ ADD_EXECUTABLE(test_DataIdContainer_Palm test_DataIdContainer.cxx)
+ TARGET_LINK_LIBRARIES(test_DataIdContainer_Palm ${_link_LIBRARIES})
+ENDIF()
+
+SET(SalomePalm_HEADERS
+ PalmCouplingPolicy.hxx
+ palm_data_seq_short_port_provides.hxx
+ palm_data_short_port_provides.hxx
+ palm_port_factory.hxx
+)
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${SalomePalm_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+UNSET(SalomePalm_HEADERS)
+UNSET(_link_LIBRARIES)
#
INCLUDE_DIRECTORIES(
+ ${PTHREAD_INCLUDE_DIR}
${MPI_CXX_INCLUDE_PATH}
${PACO_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${PROJECT_SOURCE_DIR}/src/Container
- ${PROJECT_SOURCE_DIR}/src/ParallelContainer
- ${PROJECT_SOURCE_DIR}/src/Notification
- ${PROJECT_SOURCE_DIR}/src/SALOMELocalTrace
- ${PROJECT_SOURCE_DIR}/src/Basics
- ${PROJECT_SOURCE_DIR}/src/NamingService
- ${PROJECT_SOURCE_DIR}/src/Utils
- ${PROJECT_SOURCE_DIR}/src/DSC/DSC_Basic
- ${PROJECT_SOURCE_DIR}/src/GenericObj
- ${PROJECT_BINARY_DIR}/idl
- ${PROJECT_SOURCE_DIR}/src/Registry
- ${PROJECT_SOURCE_DIR}/src/Utils
- ${PROJECT_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${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_SOURCE_DIR}/src/Registry
+ ${CMAKE_SOURCE_DIR}/src/Utils
)
ADD_DEFINITIONS(
${OMNIORB_DEFINITIONS}
${MPI_DEFINITIONS}
)
+
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${MPI_CXX_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ SalomeDSCContainer
+ SalomeParallelIDLKernel
+)
+
SET(SalomeParallelDSCContainer_SOURCES
- ParallelDSC_i.cxx
- Param_Double_Port_provides_i.cxx
- Param_Double_Port_uses_i.cxx
+ ParallelDSC_i.cxx
+ Param_Double_Port_provides_i.cxx
+ Param_Double_Port_uses_i.cxx
)
ADD_LIBRARY(SalomeParallelDSCContainer ${SalomeParallelDSCContainer_SOURCES})
-ADD_DEPENDENCIES(SalomeParallelDSCContainer SalomeParallelIDLKernel)
+TARGET_LINK_LIBRARIES(SalomeParallelDSCContainer ${_link_LIBRARIES})
INSTALL(TARGETS SalomeParallelDSCContainer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+UNSET(SalomeParallelDSCContainer_SOURCES)
+UNSET(_link_LIBRARIES)
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
)
ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
-ADD_LIBRARY(SalomeGenericObj SALOME_GenericObj_i.cc)
-TARGET_LINK_LIBRARIES(SalomeGenericObj SALOMELocalTrace SalomeIDLKernel)
+
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ SalomeIDLKernel
+ SALOMELocalTrace
+)
+
+SET(SalomeGenericObj_SOURCES
+ SALOME_GenericObj_i.cc
+)
+
+SET(SalomeGenericObj_HEADERS
+ SALOME_GenericObj_i.hh
+ SALOME_GenericObj_wrap.hxx
+)
+
+ADD_LIBRARY(SalomeGenericObj ${SalomeGenericObj_SOURCES})
+TARGET_LINK_LIBRARIES(SalomeGenericObj ${_link_LIBRARIES})
INSTALL(TARGETS SalomeGenericObj EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-INSTALL(FILES SALOME_GenericObj_i.hh SALOME_GenericObj_wrap.hxx DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${SalomeGenericObj_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+UNSET(SalomeGenericObj_SOURCES)
+UNSET(SalomeGenericObj_HEADERS)
+UNSET(_link_LIBRARIES)
INCLUDE_DIRECTORIES(
${HDF5_INCLUDE_DIRS}
${MPI_INCLUDE_DIRS}
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
+ ${CMAKE_SOURCE_DIR}/src/Basics
)
-FILE(GLOB SalomeHDFPersist_SOURCES_C "${CMAKE_CURRENT_SOURCE_DIR}/HDF*.c")
-FILE(GLOB SalomeHDFPersist_SOURCES_CC "${CMAKE_CURRENT_SOURCE_DIR}/HDF*.cc")
-SET(SalomeHDFPersist_SOURCES ${SalomeHDFPersist_SOURCES_C} ${SalomeHDFPersist_SOURCES_CC})
ADD_DEFINITIONS(${HDF5_DEFINITIONS})
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${HDF5_LIBRARIES}
+ ${MPI_LIBRARIES}
+ SALOMEBasics
+)
+
+SET(SalomeHDFPersist_SOURCES
+ HDFarrayClose.c
+ HDFarrayCreate.c
+ HDFarrayGetDim.c
+ HDFarrayGetType.c
+ HDFarrayGetTypeId.c
+ HDFarrayGetnDim.c
+ HDFattrClose.c
+ HDFattrCreate.c
+ HDFattrGetSize.c
+ HDFattrGetType.c
+ HDFattrOpen.c
+ HDFattrRead.c
+ HDFattrWrite.c
+ HDFdatasetClose.c
+ HDFdatasetCreate.c
+ HDFdatasetGetDim.c
+ HDFdatasetGetOrder.c
+ HDFdatasetGetSize.c
+ HDFdatasetGetType.c
+ HDFdatasetGetnDim.c
+ HDFdatasetOpen.c
+ HDFdatasetRead.c
+ HDFdatasetWrite.c
+ HDFerrorModeLock.c
+ HDFfileClose.c
+ HDFfileCreate.c
+ HDFfileMount.c
+ HDFfileOpen.c
+ HDFfileUmount.c
+ HDFgroupClose.c
+ HDFgroupCreate.c
+ HDFgroupOpen.c
+ HDFnObjects.c
+ HDFobjectIdentify.c
+ HDFobjectType.c
+
+ HDFarray.cc
+ HDFascii.cc
+ HDFattribute.cc
+ HDFcontainerObject.cc
+ HDFconvert.cc
+ HDFdataset.cc
+ HDFexplorer.cc
+ HDFfile.cc
+ HDFgroup.cc
+ HDFinternalObject.cc
+ HDFobject.cc
+)
+
+SET(SalomeHDFPersist_HEADERS
+ HDFOI.hxx
+ HDFarray.hxx
+ HDFascii.hxx
+ HDFattribute.hxx
+ HDFcontainerObject.hxx
+ HDFconvert.hxx
+ HDFdataset.hxx
+ HDFexception.hxx
+ HDFexplorer.hxx
+ HDFexport.hxx
+ HDFfile.hxx
+ HDFgroup.hxx
+ HDFinternalObject.hxx
+ HDFobject.hxx
+ HDFtypes.h
+ hdfi.h
+)
+
ADD_LIBRARY(SalomeHDFPersist ${SalomeHDFPersist_SOURCES})
-TARGET_LINK_LIBRARIES(SalomeHDFPersist ${HDF5_LIBRARIES} ${MPI_LIBRARIES} ${PLATFORM_LIBS} SALOMEBasics)
+TARGET_LINK_LIBRARIES(SalomeHDFPersist ${_link_LIBRARIES})
INSTALL(TARGETS SalomeHDFPersist EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_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 ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${SalomeHDFPersist_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+UNSET(SalomeHDFPersist_SOURCES)
+UNSET(SalomeHDFPersist_HEADERS)
+UNSET(_link_LIBRARIES)
+++ /dev/null
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// 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
-//
-
-/*----------------------------------------------------------------------------
-SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
- File : test1.c
- Module : SALOME
-----------------------------------------------------------------------------*/
-
-#include"hdfi.h"
-#include<stdlib.h>
-
-#define MESSAGE(msg) printf(msg);
-//__FILE__,":[",__LINE__,"]: ",
-
-int main() {
- hdf_idt fid,gid,did,atid;
- hdf_err ret;
- hdf_size size[1];
- hdf_int32 data[10] = { 1,2,3,4,5,6,7,8,9,10};
- hdf_int32 attr_val = 2;
-
- system("rm titi.HDF");
-
- HDFerrorModeLock();
-
- if ((fid = HDFfileCreate("titi.HDF")) < 0)
- return -1;
- MESSAGE("Creation du fichier")
-
- if ((gid = HDFgroupCreate(fid,"GROUP")) < 0)
- return -1;
- MESSAGE("Creation d'un groupe")
-
- if ((atid = HDFattrCreate(gid,"ATTR",HDF_INT32))< 0)
- return -1;
- MESSAGE("Creation d'un attribut")
-
- if ((ret = HDFattrWrite(atid,&attr_val)) < 0)
- return -1;
- MESSAGE("Ecriture de l'attribut")
-
- if ((ret = HDFattrClose(atid)) < 0)
- return -1;
- MESSAGE("Fermeture de l'attribut")
-
- size[0] = 10;
- if ((did = HDFdatasetCreate(gid,"DATASET",HDF_INT32,size)) < 0)
- return -1;
- MESSAGE("Creation d'un dataset")
-
- if ((ret = HDFdatasetWrite(did,data)) < 0)
- return -1;
- MESSAGE("Ecriture du dataset")
-
- if ((ret = HDFdatasetClose(did)) < 0)
- return -1;
- MESSAGE("Fermeture du datset")
-
- if ((ret = HDFgroupClose(gid)) < 0)
- return -1;
- MESSAGE("Fermeture du groupe")
-
- if ((ret = HDFfileClose(fid)) < 0)
- return ret;
- MESSAGE("Fermeture du fichier")
-
- if ((fid = HDFfileCreate("toto.HDF")) < 0)
- return -1;
- MESSAGE("Creation du fichier")
-
- if ((ret = HDFfileClose(fid)) < 0)
- return ret;
- MESSAGE("Fermeture du fichier")
-
-
- return 0;
-}
+++ /dev/null
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// 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
-//
-
-/*----------------------------------------------------------------------------
-SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
- File : test2.c
- Module : SALOME
-----------------------------------------------------------------------------*/
-
-#include"hdfi.h"
-#include<stdlib.h>
-
-int main() {
- hdf_idt fid,gid,did,atid;
- hdf_err ret;
- hdf_size size[1];
- hdf_int32 data[10];
- int attr_val;
- int i;
-
- HDFerrorModeLock();
-
- if ((fid = HDFfileOpen("titi.HDF",HDF_RDONLY)) < 0)
- return -1;
- MESSAGE("Ouverture du fichier")
-
- if ((gid = HDFgroupOpen(fid,"GROUP")) < 0)
- return -1;
- MESSAGE("Ouverture du goupe")
-
- if ((atid = HDFattrOpen(gid,"ATTR"))< 0)
- return -1;
- MESSAGE("Ouverture de l'attribut du goupe")
-
- if ((ret = HDFattrRead(atid,&attr_val)) < 0)
- return -1;
- MESSAGE("Lecture de l'attribut du goupe : " << attr_val)
-
- if ((ret = HDFattrClose(atid)) < 0)
- return -1;
- MESSAGE("Fermeture de l'attribut du goupe")
-
- if ((did = HDFdatasetOpen(gid,"DATASET")) < 0)
- return -1;
- MESSAGE("Ouverture du dataset")
-
- if ((ret = HDFdatasetRead(did,data)) < 0)
- return -1;
- MESSAGE("Lecture du dataset")
- for (i=0;i<10;i++)
- MESSAGE(data[i])
-
- if ((ret = HDFdatasetClose(did)) < 0)
- return -1;
- MESSAGE("Fermeture du dataset")
-
- if ((ret = HDFgroupClose(gid)) < 0)
- return -1;
- MESSAGE("Fermeture du groupe")
-
- if ((ret = HDFfileClose(fid)) < 0)
- return ret;
- MESSAGE("Fermeture du fichier")
-
- return 0;
-}
+++ /dev/null
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// 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
-//
-
-// SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// File : test3.cxx
-// Module : SALOME
-//
-#include <iostream.h>
-#include "HDFOI.hxx"
-#include <stdlib.h>
-
-
-int main()
-{
- HDFfile *hdf_file;
- HDFgroup *hdf_group;
- HDFdataset *hdf_dataset;
- HDFdataset *hdf_dataset2;
- HDFattribute *hdf_attribute;
- hdf_size size[1];
- hdf_float64 coordinates[3] = {5.,-6.9,4.2};
- hdf_int32 unit[3] = {0,0,0};
- char message[HDF_NAME_MAX_LEN+1] = "MESSAGE";
- hdf_int32 attribute = 3;
- HDFexplorer *explorer;
- HDFinternalObject *object;
-
- system("rm file_test3.hdf");
-
- try
- {
- // a new HDFfile object
- hdf_file = new HDFfile("file_test3.hdf");
- MESSAGE( ">> A HDFfile object is created" );
-
- hdf_file->CreateOnDisk();
- MESSAGE( ">> The HDF file is created on Disk " );
-
- // Inside the HDF file
-
- // A new HDF group object
- hdf_group = new HDFgroup("MESH",hdf_file);
- MESSAGE( ">> A HDFgroup object 'MESH' is created" );
-
- hdf_group->CreateOnDisk();
- MESSAGE( ">> The HDF group is created on Disk " );
-
- // Inside the HDF group
-
- // A new HDF dataset object
- // size of each dimension, only one in the example
- size[0] = 3;
- hdf_dataset = new HDFdataset("COORDINATES",hdf_group,HDF_FLOAT64,size,1);
- MESSAGE( ">> A HDFdataset object 'COORDINATES' is created" );
-
- hdf_dataset->CreateOnDisk();
- MESSAGE( ">> The HDF dataset is created on Disk " );
-
- // a HDFattribute object inside the dataset
- hdf_attribute = new HDFattribute("ATTRIBUTE",hdf_dataset,HDF_INT32);
- MESSAGE( ">> A HDF attribute object is created for the dataset " );
-
- hdf_dataset->WriteOnDisk(coordinates);
- MESSAGE( ">> The HDF dataset is written on Disk " );
-
- hdf_attribute->CreateOnDisk();
- MESSAGE( ">> The HDF attribute is created on Disk " );
-
- hdf_attribute->WriteOnDisk(&attribute);
- MESSAGE( ">> The HDF attribute is written on Disk " );
-
- hdf_attribute->CloseOnDisk();
- MESSAGE( ">> The HDF attribute closed on Disk " );
-
- hdf_dataset->CloseOnDisk();
- MESSAGE( ">> The HDF dataset is closed on Disk " );
-
- // A new dataset is created
- size[0] = 3;
- hdf_dataset2 = new HDFdataset("UNIT",hdf_group,HDF_INT32,size,1);
- MESSAGE( ">> A second HDFdataset object 'UNIT' is created" );
-
- hdf_dataset2->CreateOnDisk();
- MESSAGE( ">> The HDF dataset is created on Disk " );
-
- hdf_dataset2->WriteOnDisk(unit);
- MESSAGE( ">> The HDF dataset is written on Disk " );
-
- hdf_dataset2->CloseOnDisk();
- MESSAGE( ">> The HDF dataset is closed on Disk " );
-
- // The HDF group is built, it can be closed
- hdf_group->CloseOnDisk();
- MESSAGE( ">> The HDF group is closed on Disk " );
-
- // The HDF file is built, it can be closed
- hdf_file->CloseOnDisk();
- MESSAGE( ">> The HDF file is closed on disk" );
-
- // Explorer
- explorer = new HDFexplorer(hdf_file);
- MESSAGE( ">> A HDF explorer object is created" );
-
- MESSAGE( ">> File Exploration " );
- for (explorer->Init();explorer->More();explorer->Next())
- {
- object = explorer->Value();
- MESSAGE( "--> Name of the object : " << object->GetName() );
- switch (object->GetObjectType())
- {
- case HDF_FILE :
- MESSAGE( "--> Type of the object : HDF_FILE : " );
- break;
-
- case HDF_GROUP :
- MESSAGE( "--> Type of the object : HDF_GROUP : " );
- break;
-
- case HDF_DATASET :
- MESSAGE( "--> Type of the object : HDF_DATASET : " );
- break;
-
- default :
- MESSAGE( "--> PANIC !!! : " );
- }
- }
-
- MESSAGE( ">> Group exploration" );
- explorer->Reset(hdf_group);
- for (explorer->Init();explorer->More();explorer->Next())
- {
- object = explorer->Value();
- MESSAGE( "--> Name of the object : " << object->GetName() );
- switch (object->GetObjectType())
- {
- case HDF_FILE :
- MESSAGE( "--> Type of the object : HDF_FILE : " );
- break;
-
- case HDF_GROUP :
- MESSAGE( "--> Type of the object : HDF_GROUP : " );
- break;
-
- case HDF_DATASET :
- MESSAGE( "--> Type of the object : HDF_DATASET : " );
- break;
-
- default :
- MESSAGE( "--> !!! PANIC !!! : " );
- }
- }
-
- // memory clean
- MESSAGE( ">> MEMORY CLEAN " );
- delete explorer;
- MESSAGE( ">> The HDF eplorer object is deleted" );
- delete hdf_attribute;
- MESSAGE( ">> The HDF attribute object is deleted" );
- delete hdf_dataset;
- MESSAGE( ">> The first HDF dataset object is deleted" );
- delete hdf_dataset2;
- MESSAGE( ">> The second HDF dataset object is deleted" );
- delete hdf_group;
- MESSAGE( ">> The HDF group object is deleted" );
- delete hdf_file;
- MESSAGE( ">> The HDF file object is deleted" );
- }
- catch (HDFexception)
- {
- MESSAGE( "!!!! HDFexception" )
- }
-
- return 0;
-}
+++ /dev/null
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// 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
-//
-
-// SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// File : test4.cxx
-// Module : SALOME
-//
-#include <iostream.h>
-#include "HDFOI.hxx"
-#include <stdlib.h>
-
-
-int main()
-{
- HDFfile *hdf_file;
- HDFgroup *hdf_group;
- HDFdataset *hdf_dataset1, *hdf_dataset2;
- int n,i;
- char name[HDF_NAME_MAX_LEN+1];
- hdf_object_type type;
- hdf_type data_type;
- int ndim, size;
- hdf_size *dim;
- hdf_float64 *val1;
- hdf_int32 *val2;
-
- try
- {
- // a new HDFfile object
- hdf_file = new HDFfile("file_test3.hdf");
- MESSAGE( ">> A HDFfile object is created" );
-
- hdf_file->OpenOnDisk(HDF_RDONLY);
- MESSAGE(">> The HDF file is opened on Disk with HDF_RDONLY access mode")
- // It is possible to read the name of all (objects) sons in the file
- n = hdf_file->nInternalObjects();
- for (i=0;i<n;i++)
- {
- hdf_file->InternalObjectIndentify(i,name);
- MESSAGE( "--> First Level Internal Object Name : " << name );
- }
-
- // Or it is possible to ask if an object is in the file
- if (hdf_file->ExistInternalObject("MESH"))
- MESSAGE( "--> The object naming 'MESH' is in the file " );
-
- // it is possible to determine the type of an object
- type = hdf_file->InternalObjectType("MESH");
- switch (type)
- {
- case HDF_GROUP :
- MESSAGE( "--> Its type is HDF_GROUP" );
- break;
-
- case HDF_DATASET :
- MESSAGE( "--> Its type is HDF_DATASET" );
- break;
-
- default :
- MESSAGE( "--> !!!! PANIC !!!" );
- }
-
- hdf_group = new HDFgroup(name,hdf_file);
- MESSAGE( ">> A new HDF group object " << name << " is created in memory")
-
- hdf_group->OpenOnDisk();
- MESSAGE( ">> The group " << name << " is opened on disk" );
-
- // object inside the group ?
- n = hdf_group->nInternalObjects();
- MESSAGE( ">> There are " << n << " objects in this group " );
- for (i=0;i<n;i++)
- {
- hdf_group->InternalObjectIndentify(i,name);
- type = hdf_group->InternalObjectType(name);
- MESSAGE( "--> First Level Internal Object Name : " << name );
- switch (type)
- {
- case HDF_GROUP :
- MESSAGE( "--> Its type is HDF_GROUP" );
- break;
-
- case HDF_DATASET :
- MESSAGE( "--> Its type is HDF_DATASET" );
- break;
-
- default :
- MESSAGE( "--> !!!! PANIC !!!" );
- }
- }
-
- // The first dataset object 'COORDINATES'
- hdf_dataset1 = new HDFdataset("COORDINATES",hdf_group);
- MESSAGE( ">> The dataset object 'COORDINATES' is created in memory " );
-
- hdf_dataset1->OpenOnDisk();
- MESSAGE( ">> The dataset object 'COORDINATES' is opened on disk " );
-
- data_type = hdf_dataset1->GetType();
- switch(data_type)
- {
- case HDF_INT32 :
- MESSAGE( "--> Type of data : HDF_INT32 " );
- break;
- case HDF_INT64 :
- MESSAGE( "--> Type of data : HDF_INT64 " );
- break;
- case HDF_FLOAT64 :
- MESSAGE( "--> Type of data : HDF_FLOAT64 " );
- break;
- default :
- MESSAGE( "--> Type of data : HDF_STRING " );
- }
-
- ndim = hdf_dataset1->nDim();
- MESSAGE( "--> Number of dimensions : " << ndim );
-
- dim = new hdf_size[ndim];
- hdf_dataset1->GetDim(dim);
- for (i=0;i<ndim;i++)
- MESSAGE( "--> Dimension " << i+1 << " of size : " << dim[i] );
- delete dim;
-
- size = hdf_dataset1->GetSize();
- val1 = new hdf_float64[size];
- hdf_dataset1->ReadFromDisk(val1);
- MESSAGE( "--> The values are : ");
- for (i=0;i<size;i++)
- MESSAGE( " " << val1[i]);
- MESSAGE();
- delete val1;
-
- hdf_dataset1->CloseOnDisk();
- MESSAGE( ">> The dataset object 'COORDINATES' is closed on disk " );
-
- // The second dataset 'UNIT'
- hdf_dataset2 = new HDFdataset("UNIT",hdf_group);
- MESSAGE( ">> The dataset object 'UNIT' is created in memory " );
-
- hdf_dataset2->OpenOnDisk();
- MESSAGE( ">> The dataset object 'UNIT' is opened on disk " );
-
- data_type = hdf_dataset2->GetType();
- switch(data_type)
- {
- case HDF_INT32 :
- MESSAGE( "--> Type of data : HDF_INT32 " );
- break;
- case HDF_INT64 :
- MESSAGE( "--> Type of data : HDF_INT64 " );
- break;
- case HDF_FLOAT64 :
- MESSAGE( "--> Type of data : HDF_FLOAT64 " );
- break;
- default :
- MESSAGE( "--> Type of data : HDF_STRING " );
- }
-
- ndim = hdf_dataset2->nDim();
- MESSAGE( "--> Number of dimensions : " << ndim );
-
- dim = new hdf_size[ndim];
- hdf_dataset2->GetDim(dim);
- for (i=0;i<ndim;i++)
- MESSAGE( "--> Dimension " << i+1 << " of size : " << dim[i] );
- delete dim;
-
- size = hdf_dataset2->GetSize();
- val2 = new hdf_int32[size];
- hdf_dataset2->ReadFromDisk(val2);
- MESSAGE( "--> The values are : ");
- for (i=0;i<size;i++)
- MESSAGE( " " << val2[i]);
- MESSAGE();
- delete val2;
-
- hdf_dataset2->CloseOnDisk();
- MESSAGE( ">> The dataset object 'UNIT' is closed on disk " );
-
- hdf_group->CloseOnDisk();
- MESSAGE( ">> The group is closed on file" );
-
- hdf_file->CloseOnDisk();
- MESSAGE(">> The HDF file is closed on Disk" )
-
- // Memory clean
- delete hdf_dataset1;
- delete hdf_dataset2;
- delete hdf_group;
- delete hdf_file;
- MESSAGE( ">> MEMORY CLEAN : all HDF objects have been deleted" );
- }
- catch (HDFexception)
- {
- MESSAGE( "!!! HDFexception !!! " )
- }
-
- return 0;
-}
+++ /dev/null
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// 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
-//
-
-// SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// File : test5.cxx
-// Module : SALOME
-//
-#include <iostream.h>
-#include "HDFOI.hxx"
-#include <stdlib.h>
-
-
-int main()
-{
- HDFfile *hdf_file;
- HDFgroup *hdf_group;
-
- try
- {
- // A file study.hdf with 2 groups : MESH and GEOM
- hdf_file = new HDFfile("study.hdf");
-
- hdf_file->CreateOnDisk();
-
- hdf_group = new HDFgroup("GEOM",hdf_file);
-
- hdf_group->CreateOnDisk();
-
- hdf_group->CloseOnDisk();
-
- delete hdf_group;
-
- hdf_group = new HDFgroup("MESH",hdf_file);
-
- hdf_group->CreateOnDisk();
-
- hdf_group->CloseOnDisk();
-
- delete hdf_group;
-
- hdf_file->CloseOnDisk();
-
- delete hdf_file;
-
- // a file mesh.hdf with 2 groups MESH_1 and MESH_2
- hdf_file = new HDFfile("mesh.hdf");
-
- hdf_file->CreateOnDisk();
-
- hdf_group = new HDFgroup("MESH_1",hdf_file);
-
- hdf_group->CreateOnDisk();
-
- hdf_group->CloseOnDisk();
-
- delete hdf_group;
-
- hdf_group = new HDFgroup("MESH_2",hdf_file);
-
- hdf_group->CreateOnDisk();
-
- hdf_group->CloseOnDisk();
-
- delete hdf_group;
-
- hdf_file->CloseOnDisk();
-
- delete hdf_file;
-
- // a file geom.hdf with 2 groups GEOM_1 and GEOM_2
- hdf_file = new HDFfile("geom.hdf");
-
- hdf_file->CreateOnDisk();
-
- hdf_group = new HDFgroup("GEOM_1",hdf_file);
-
- hdf_group->CreateOnDisk();
-
- hdf_group->CloseOnDisk();
-
- delete hdf_group;
-
- hdf_group = new HDFgroup("GEOM_2",hdf_file);
-
- hdf_group->CreateOnDisk();
-
- hdf_group->CloseOnDisk();
-
- delete hdf_group;
-
- hdf_file->CloseOnDisk();
-
- delete hdf_file;
- }
- catch (HDFexception)
- {
- MESSAGE( "!!!! HDFexception !!!" )
- }
-
- return 0;
-}
+++ /dev/null
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// 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
-//
-
-// SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// File : test6.cxx
-// Module : SALOME
-//
-#include <iostream.h>
-#include "HDFOI.hxx"
-#include <stdlib.h>
-
-int main()
-{
- HDFfile *study;
- HDFgroup *geom, *mesh;
- HDFgroup *geom1, *geom2, *mesh1, *mesh2;
- int n,m,i;
- char name[HDF_NAME_MAX_LEN+1];
-
- try
- {
- // the groups 'GEOM' and 'MESH' become mounted points for
- // the files 'geom.hdf' and 'mesh.hdf' in the 'study.hdf' file
-
- study = new HDFfile("study.hdf");
- MESSAGE( ">> The HDFfile object for 'study.hdf' is created" );
-
- study->OpenOnDisk(HDF_RDONLY);
- MESSAGE( "--> The file is opened" );
-
- geom = new HDFgroup("GEOM",study);
- MESSAGE( ">> The HDFgroup object for 'GEOM' is created" );
-
- geom->FileMount("geom.hdf",HDF_RDONLY);
- MESSAGE( ">> 'GEOM' becomes a mounted point for the file 'geom.hdf'" );
-
- geom->OpenOnDisk();
- MESSAGE( "--> The group is opened" );
-
- m = geom->nInternalObjects();
- MESSAGE( "--> There are " << m << " objects in the group" );
-
- for (i=0;i<m;i++)
- {
- geom->InternalObjectIndentify(i,name);
- MESSAGE( "--> First Level Internal Object Name : " << name );
- }
-
- geom1 = new HDFgroup("GEOM_1",geom);
- MESSAGE( ">> The HDF group object is created for 'GEOM_1' with 'GEOM' as father" );
- MESSAGE( "--> This group is in fact in the file 'geom.hdf'");
-
- geom1->OpenOnDisk();
- MESSAGE( "-> The group 'GEOM_1' is opened" );
-
- geom1->CloseOnDisk();
- MESSAGE( "-> The group 'GEOM_1' is closed" );
-
- geom2 = new HDFgroup("GEOM_2",geom);
- MESSAGE( ">> The HDF group object is created for 'GEOM_2' with 'GEOM' as father" );
- MESSAGE( "--> This group is in fact in the file 'geom.hdf'");
-
- geom2->OpenOnDisk();
- MESSAGE( "-> The group 'GEOM_2' is opened" );
-
- geom2->CloseOnDisk();
- MESSAGE( "-> The group 'GEOM_2' is closed" );
-
- geom->CloseOnDisk();
- MESSAGE( "-> The group 'GEOM' is closed" );
-
- geom->FileUnMount();
- MESSAGE( ">> The file 'geom.hdf' is unmounted from 'GEOM' " );
-
- mesh = new HDFgroup("MESH",study);
-
- mesh->FileMount("mesh.hdf",HDF_RDONLY);
-
- mesh->OpenOnDisk();
-
- mesh1 = new HDFgroup("MESH_1",mesh);
-
- mesh1->OpenOnDisk();
-
- mesh1->CloseOnDisk();
-
- mesh2 = new HDFgroup("MESH_2",mesh);
-
- mesh2->OpenOnDisk();
-
- mesh2->CloseOnDisk();
-
- mesh->CloseOnDisk();
-
- mesh->FileUnMount();
-
- MESSAGE( ">> The same operations have been done for the file 'mesh.hdf'" )
- MESSAGE( " and the groups MESH_1 and MESH_2" )
- MESSAGE( "--> This file has been mounted on the group 'MESH' of the file 'study.hdf' ")
-
- study->CloseOnDisk();
- MESSAGE( ">> The study.hdf file is closed" );
-
- MESSAGE( ">> Memory clean" );
- delete mesh1;
- delete mesh2;
- delete mesh;
- delete geom1;
- delete geom2;
- delete geom;
- delete study;
- }
- catch(HDFexception)
- {
- MESSAGE( "!!! HDFexception !!! ")
- }
- return 0;
-}
+++ /dev/null
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// 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
-//
-
-// SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// File : test7.cxx
-// Module : SALOME
-//
-#include "HDFIO.hxx"
-#include <iostream.h>
-
-
-int main()
-{
-
-
- return 0;
-}
+++ /dev/null
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// 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
-//
-
-// SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// File : test8.cxx
-// Module : SALOME
-//
-#include <iostream.h>
-#include "HDFOI.hxx"
-#include <stdlib.h>
-
-
-int main()
-{
- HDFfile *hdf_file;
- HDFgroup *hdf_group;
- HDFdataset *hdf_dataset;
- hdf_size size[1];
- char message[HDF_NAME_MAX_LEN+1] = "MESSAGE";
- hdf_int32 attribute = 3;
-
- system("rm file_ascii.hdf");
-
- try
- {
- // a new HDFfile object
- hdf_file = new HDFfile("file_ascii.hdf");
- MESSAGE( ">> A HDFfile object is created" );
-
- hdf_file->CreateOnDisk();
- MESSAGE( ">> The HDF file is created on Disk " );
-
- // Inside the HDF file
-
- // A new HDF group object
- hdf_group = new HDFgroup("ASCII GROUP",hdf_file);
- MESSAGE( ">> A HDFgroup object 'ASCII' is created" );
-
- hdf_group->CreateOnDisk();
- MESSAGE( ">> The HDF group is created on Disk " );
-
- // Transfert d'un fichier ASCII dans un groupe HDF
- HDFConvert::FromAscii("ascii.txt",*hdf_group,"ASCII DATASET");
- MESSAGE( ">> The ASCII file is transferred " );
-
- // The HDF group is built, it can be closed
- hdf_group->CloseOnDisk();
- MESSAGE( ">> The HDF group is closed on Disk " );
-
- // The HDF file is built, it can be closed
- hdf_file->CloseOnDisk();
- MESSAGE( ">> The HDF file is closed on disk" );
-
-
- delete hdf_group;
- MESSAGE( ">> The HDF group object is deleted" );
- delete hdf_file;
- MESSAGE( ">> The HDF file object is deleted" );
- }
- catch (HDFexception)
- {
- MESSAGE( "!!!! HDFexception" )
- }
-
- return 0;
-}
+++ /dev/null
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// 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
-//
-
-// SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// File : test9.cxx
-// Module : SALOME
-//
-#include <iostream.h>
-#include "HDFOI.hxx"
-#include <stdlib.h>
-
-
-int main()
-{
- HDFfile *hdf_file;
- HDFgroup *hdf_group;
- HDFdataset *hdf_dataset1;
- int fd;
- size_t size;
- char * buffer;
- off_t pos;
-
- system("rm ascii_hdf.txt");
-
- try {
-
- // a new HDFfile object
- hdf_file = new HDFfile("file_ascii.hdf");
- MESSAGE( ">> A HDFfile object is created" );
-
- hdf_file->OpenOnDisk(HDF_RDONLY);
- MESSAGE( ">> The HDF file is opened on Disk with HDF_RDONLY access mode" )
-
- hdf_group = new HDFgroup("ASCII GROUP",hdf_file);
- MESSAGE(">> A new HDF group object ASCII GROUP" << " is created in memory")
-
- hdf_group->OpenOnDisk();
- MESSAGE( ">> The group ASCII GROUP is opened on disk" );
-
- // The dataset object 'ASCII DATASET'
- hdf_dataset1 = new HDFdataset("ASCII DATASET",hdf_group);
- MESSAGE( ">> The dataset object 'ASCII DATASET' is created in memory " );
-
- hdf_dataset1->OpenOnDisk();
- MESSAGE( ">> The dataset object 'ASCII DATASET' is opened on disk " );
-
- size = (size_t) hdf_dataset1->GetSize();
-
- // Open the target file
-
- if ( (fd = open("ascii_hdf.txt",O_RDWR|O_CREAT,00666)) <0) {
- perror("open : test9");
- return -1;
- };
-
- // if ( (pos = lseek(fd,(off_t) size-3,SEEK_SET)) <0) {
-// perror("lseek : test9");
-// return -1;
-// };
-
-// if ( write(fd,"END",3) <0) {
-// perror("write : test9");
-// return -1;
-// };
-
-#ifdef _POSIX_MAPPED_FILES
- // Map le fichier en mémoire
- // if ((buffer = (char *) mmap(0,size,PROT_WRITE,MAP_SHARED,fd,0)) == MAP_FAILED ) {
- // perror("mmap : test9");
- //return -1;
- //};
- buffer = new char[size];
-#else
- // Sort de la compilation
-#error Necessite l''utilisation de la primitive mmap
-#endif
-
- // Transfert les informations dans le fichier destination
- hdf_dataset1->ReadFromDisk(buffer);
-
- if ( write(fd,buffer,size) <0) {
- perror("write : test9");
- return -1;
- };
-
- // Desalloue le mapping
-// if (munmap(buffer,size) < 0 ) {
-// perror("munmap : test9");
-// return -1;
-// };
-
- // Close the target file
- if (close(fd) <0) {
- perror("close : test9");
- return -1;
- }
-
- hdf_dataset1->CloseOnDisk();
- MESSAGE( ">> The dataset is closed on disk " );
-
- hdf_group->CloseOnDisk();
- MESSAGE( ">> The group is closed on file" );
-
- hdf_file->CloseOnDisk();
- MESSAGE( ">> The HDF file is closed on Disk" )
-
- // Memory clean
- delete hdf_dataset1;
- delete hdf_group;
- delete hdf_file;
- delete buffer;
- MESSAGE( ">> MEMORY CLEAN : all HDF objects have been deleted" );
-
- }
- catch (HDFexception) {
- return -1;
- MESSAGE( "!!! HDFexception !!! " )
- }
-
- return 0;
-}
-
SET(salomepython_PYTHON
omnipatch.py
+ Help.py
+ PyInterp.py
+ batchmode_salome.py
+ kernel_test.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
)
-SET(salomepython_PYTHON
- ${salomepython_PYTHON}
- Help.py
- PyInterp.py
- batchmode_salome.py
- kernel_test.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
- )
-
SALOME_INSTALL_SCRIPTS("${salomepython_PYTHON}" ${SALOME_INSTALL_PYTHON})
SALOME_INSTALL_SCRIPTS(__init__.py ${SALOME_INSTALL_PYTHON}/salome)
+
+UNSET(salomepython_PYTHON)
${CMAKE_CURRENT_BINARY_DIR}/logconfig.py
)
SALOME_INSTALL_SCRIPTS("${mypkgpython_PYTHON}" ${SALOME_INSTALL_PYTHON}/salome/kernel)
+
+UNSET(mypkgpython_PYTHON)
# Executable scripts to be installed
SALOME_INSTALL_SCRIPTS("${mypkgpython_PYTHON}" ${SALOME_INSTALL_PYTHON}/salome/kernel/parametric)
+
+UNSET(mypkgpython_PYTHON)
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIR}
${OMNIORB_INCLUDE_DIR}
- ${PROJECT_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
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${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
)
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+
SET(SalomeKernelHelpers_LIBS
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
${OMNIORB_LIBRARIES}
SalomeNS
SALOMELocalTrace
SALOMEDS_DriverDefaultImpl.cxx
)
-ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+SET(SalomeKernelHelpers_HEADERS
+ KernelHelpers.hxx
+ SALOMEDS_DriverDefaultImpl.hxx
+ SALOME_KernelServices.hxx
+ SALOME_StudyEditor.hxx
+)
ADD_LIBRARY(SalomeKernelHelpers ${SalomeKernelHelpers_SOURCES})
TARGET_LINK_LIBRARIES(SalomeKernelHelpers ${SalomeKernelHelpers_LIBS})
INSTALL(TARGETS SalomeKernelHelpers EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-ADD_EXECUTABLE(KernelHelpersUseCases KernelHelpersUseCases.cxx)
-TARGET_LINK_LIBRARIES(KernelHelpersUseCases SalomeKernelHelpers ${SalomeKernelHelpers_LIBS})
-INSTALL(TARGETS KernelHelpersUseCases DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(FILES ${SalomeKernelHelpers_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+IF(SALOME_BUILD_TESTS)
+ ADD_EXECUTABLE(KernelHelpersUseCases KernelHelpersUseCases.cxx)
+ TARGET_LINK_LIBRARIES(KernelHelpersUseCases ${SalomeKernelHelpers_LIBS} SalomeKernelHelpers)
+ INSTALL(TARGETS KernelHelpersUseCases DESTINATION ${SALOME_INSTALL_BINS})
+ENDIF()
+
+UNSET(SalomeKernelHelpers_SOURCES)
+UNSET(SalomeKernelHelpers_HEADERS)
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+IF(SALOME_BUILD_TESTS)
+ ADD_SUBDIRECTORY(Test)
+ENDIF()
${CPPUNIT_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${PROJECT_SOURCE_DIR}/src/Basics/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/..
- ${PROJECT_SOURCE_DIR}/src/NamingService
- ${PROJECT_SOURCE_DIR}/src/SALOMELocalTrace
- ${PROJECT_SOURCE_DIR}/src/Basics
- ${PROJECT_SOURCE_DIR}/src/Utils
- ${PROJECT_SOURCE_DIR}/src/LifeCycleCORBA
- ${PROJECT_SOURCE_DIR}/src/Container
- ${PROJECT_SOURCE_DIR}/src/Notification
- ${PROJECT_SOURCE_DIR}/src/GenericObj
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/Basics/Test
+ ${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_SOURCE_DIR}/src/KernelHelpers
)
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+
SET(SalomeKernelHelpersTest_LIBS
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
${CPPUNIT_LIBRARIES}
SalomeKernelHelpers
- ${OMNIORB_LIBRARIES}
SalomeNS
SALOMELocalTrace
SALOMEBasics
SalomeIDLKernel
)
-ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS})
-
SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/KernelHelpers)
ADD_LIBRARY(SalomeKernelHelpersTest KernelHelpersUnitTests.cxx)
INSTALL(TARGETS SalomeKernelHelpersTest DESTINATION ${KERNEL_TEST_LIB})
ADD_EXECUTABLE(TestKernelHelpers TestKernelHelpers.cxx)
-TARGET_LINK_LIBRARIES(TestKernelHelpers SalomeKernelHelpersTest ${SalomeKernelHelpersTest_LIBS})
-#ADD_TEST(TestKernelHelpers TestKernelHelpers)
+TARGET_LINK_LIBRARIES(TestKernelHelpers ${SalomeKernelHelpersTest_LIBS} SalomeKernelHelpersTest)
INSTALL(TARGETS TestKernelHelpers DESTINATION ${LOCAL_TEST_DIR})
-# Executable scripts to be installed
INSTALL(FILES TestKernelHelpers.py DESTINATION ${LOCAL_TEST_DIR})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${LOCAL_TEST_DIR})
-
INSTALL(FILES CTestTestfileInstall.cmake
DESTINATION ${LOCAL_TEST_DIR}
RENAME CTestTestfile.cmake)
+
+SET(LOCAL_TEST_DIR)
+UNSET(SalomeKernelHelpersTest_LIBS)
${PTHREAD_INCLUDE_DIR}
${Boost_INCLUDE_DIR}
${LIBBATCH_INCLUDE_DIRS}
- ${PROJECT_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_CURRENT_SOURCE_DIR}/../SALOMESDS
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/NamingService
+ ${CMAKE_SOURCE_DIR}/src/Utils
+ ${CMAKE_SOURCE_DIR}/src/Registry
+ ${CMAKE_SOURCE_DIR}/src/Notification
+ ${CMAKE_SOURCE_DIR}/src/Container
+ ${CMAKE_SOURCE_DIR}/src/ResourcesManager
+ ${CMAKE_SOURCE_DIR}/src/SALOMESDS
)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS})
ADD_DEFINITIONS(-DWITH_LIBBATCH)
ENDIF(SALOME_USE_LIBBATCH)
-# This local variable defines the list of dependent libraries common to all target in this package.
-SET(COMMON_LIBS
- Registry
- SalomeNotification
- SalomeContainer
- SalomeResourcesManager
- SalomeNS
- OpUtil
- SALOMELocalTrace
- SALOMEBasics
- SalomeIDLKernel
- ${Boost_FILESYSTEM_LIBRARY}
- ${Boost_SYSTEM_LIBRARY}
- ${LIBBATCH_LIBRARIES}
- ${OMNIORB_LIBRARIES}
- ${LIBXML2_LIBRARIES}
- ${PYTHON_LIBRARIES}
-)
-
SET(Launcher_SOURCES
SALOME_Launcher_Parser.cxx
SALOME_Launcher_Handler.cxx
Launcher_XML_Persistence.cxx
)
-ADD_LIBRARY(Launcher ${Launcher_SOURCES})
-TARGET_LINK_LIBRARIES(Launcher ResourcesManager ${LIBBATCH_LIBRARIES} ${LIBXML2_LIBS} ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})
-INSTALL(TARGETS Launcher EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-
-SET(TestLauncher_LIBS
+SET(Launcher_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
${LIBXML2_LIBRARIES}
- ResourcesManager
- Launcher
+ ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}
${LIBBATCH_LIBRARIES}
- ${Boost_FILESYSTEM_LIBRARY}
- ${Boost_SYSTEM_LIBRARY}
+ ResourcesManager
)
-# TestLauncher needs only (and must need only) libxml, libbatch, ResourceManager and Launcher libraries!
-ADD_EXECUTABLE(TestLauncher TestLauncher.cxx)
-TARGET_LINK_LIBRARIES(TestLauncher ${TestLauncher_LIBS})
-INSTALL(TARGETS TestLauncher DESTINATION ${SALOME_INSTALL_BINS})
+ADD_LIBRARY(Launcher ${Launcher_SOURCES})
+TARGET_LINK_LIBRARIES(Launcher ${Launcher_LIBRARIES})
+INSTALL(TARGETS Launcher EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+IF(SALOME_BUILD_TESTS)
+ # TestLauncher needs only (and must need only)
+ # libxml, libbatch, ResourceManager and Launcher libraries!
+ ADD_EXECUTABLE(TestLauncher TestLauncher.cxx)
+ TARGET_LINK_LIBRARIES(TestLauncher ${Launcher_LIBRARIES} Launcher)
+ INSTALL(TARGETS TestLauncher DESTINATION ${SALOME_INSTALL_BINS})
+ INSTALL(FILES testLauncher.xml DESTINATION ${SALOME_KERNEL_INSTALL_RES_DATA})
+ENDIF()
-ADD_LIBRARY(SalomeLauncher BatchTest.cxx SALOME_Launcher.cxx SALOME_ExternalServerLauncher.cxx SALOME_LauncherException.cxx SALOME_ExternalServerHandler.cxx)
-TARGET_LINK_LIBRARIES(SalomeLauncher Launcher ${COMMON_LIBS})
-INSTALL(TARGETS SalomeLauncher EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-
-SET(SALOME_LauncherServer_LIBS
- Launcher
- SalomeLauncher
- SalomeSDS
- SALOMEBasics
- SALOMELocalTrace
- ${LIBBATCH_LIBRARIES}
+SET(SalomeLauncher_SOURCES
+ BatchTest.cxx
+ SALOME_Launcher.cxx
+ SALOME_ExternalServerLauncher.cxx
+ SALOME_LauncherException.cxx
+ SALOME_ExternalServerHandler.cxx
+)
+
+SET(SalomeLauncher_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
${OMNIORB_LIBRARIES}
${LIBXML2_LIBRARIES}
${PYTHON_LIBRARIES}
+ ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}
+ ${LIBBATCH_LIBRARIES}
+ Registry
+ SalomeNotification
+ SalomeContainer
+ SalomeResourcesManager
+ SalomeNS
+ OpUtil
+ SALOMELocalTrace
+ SALOMEBasics
+ SalomeIDLKernel
+ Launcher
)
+ADD_LIBRARY(SalomeLauncher ${SalomeLauncher_SOURCES})
+TARGET_LINK_LIBRARIES(SalomeLauncher ${SalomeLauncher_LIBRARIES})
+INSTALL(TARGETS SalomeLauncher EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
ADD_EXECUTABLE(SALOME_LauncherServer SALOME_LauncherServer.cxx)
-TARGET_LINK_LIBRARIES(SALOME_LauncherServer ${SALOME_LauncherServer_LIBS})
+TARGET_LINK_LIBRARIES(SALOME_LauncherServer ${SalomeLauncher_LIBRARIES} SalomeLauncher SalomeSDS)
INSTALL(TARGETS SALOME_LauncherServer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
-SET(COMMON_HEADERS_HXX
- BatchTest.hxx
+SET(Launcher_HEADERS
Launcher.hxx
Launcher_Job.hxx
Launcher_Job_Command.hxx
SALOME_ExternalServerLauncher.hxx
SALOME_LauncherException.hxx
)
+INSTALL(FILES ${Launcher_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
-SET(LAUNCHER_PYTHON_SCRIPTS
+SET(Launcher_SCRIPTS
launcher_proxy.py
)
+SALOME_INSTALL_SCRIPTS("${Launcher_SCRIPTS}" ${SALOME_INSTALL_PYTHON})
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
-INSTALL(FILES testLauncher.xml DESTINATION ${SALOME_KERNEL_INSTALL_RES_DATA})
-SALOME_INSTALL_SCRIPTS("${LAUNCHER_PYTHON_SCRIPTS}" ${SALOME_INSTALL_PYTHON})
+SET(Launcher_SOURCES)
+SET(Launcher_LIBRARIES)
+SET(SalomeLauncher_SOURCES)
+SET(SalomeLauncher_LIBRARIES)
+SET(Launcher_HEADERS)
+SET(Launcher_SCRIPTS)
# --- rules ---
+SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/Launcher)
+
IF(NOT WIN32)
-# ** Now in CTestTestfileInstall.cmake **
-# ** In this file only remain unit tests (no SALOME session is needed) **
-# ADD_TEST(NAME SalomeLauncher
-# COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../../UnitTests/prepare_test.py
-# ${CMAKE_CURRENT_SOURCE_DIR}/test_launcher.py
-# -d KERNEL_ROOT_DIR=${CMAKE_INSTALL_PREFIX}
-# )
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/test_launcher.py
- DESTINATION ${KERNEL_TEST_DIR}/Launcher)
+ INSTALL(PROGRAMS test_stress.sh launcher_use_case.py test_launcher.py
+ DESTINATION ${LOCAL_TEST_DIR})
INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${KERNEL_TEST_DIR}/Launcher
+ DESTINATION ${LOCAL_TEST_DIR}
RENAME CTestTestfile.cmake)
- SET(STRESS_TEST_FILES
- test_stress.sh
- launcher_use_case.py
- )
- INSTALL(PROGRAMS ${STRESS_TEST_FILES}
- DESTINATION ${KERNEL_TEST_DIR}/Launcher)
ENDIF()
+
+UNSET(LOCAL_TEST_DIR)
IF(NOT WIN32)
SET(TEST_NAME ${COMPONENT_NAME}_Launcher)
ADD_TEST(${TEST_NAME} ${SALOME_TEST_DRIVER} 2000 test_launcher.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}"
- # TIMEOUT 500
- )
-
- SET(TEST_NAME ${COMPONENT_NAME}_StressLauncher)
- ADD_TEST(${TEST_NAME} ${SALOME_TEST_DRIVER} 2000 ./test_stress.sh)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}"
- # TIMEOUT 500
- )
- # /!\ DO NOT SET TIMEOUT PROPERTY IF USING ${SALOME_TEST_DRIVER}
- # BUT PASS TIMEOUT VALUE TO THE DRIVER
+ SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
+# VSR: disable stress test as it often kills workstation
+# SET(TEST_NAME ${COMPONENT_NAME}_StressLauncher)
+# ADD_TEST(${TEST_NAME} ${SALOME_TEST_DRIVER} 2000 ./test_stress.sh)
+# SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
ENDIF()
INCLUDE(${SWIG_USE_FILE})
-ADD_DEFINITIONS(${PYTHON_DEFINITIONS})
-
SET(Launcher_target_name pylauncher)
+INCLUDE_DIRECTORIES(
+ ${PTHREAD_INCLUDE_DIR}
+ ${PYTHON_INCLUDE_DIRS}
+ ${LIBBATCH_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/src/ResourcesManager
+ ${CMAKE_SOURCE_DIR}/src/Launcher
+)
+
IF(SALOME_USE_LIBBATCH)
ADD_DEFINITIONS(-DWITH_LIBBATCH)
SET(SWIG_MODULE_${Launcher_target_name}_EXTRA_FLAGS "-DWITH_LIBBATCH")
ENDIF(SALOME_USE_LIBBATCH)
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${PYTHON_LIBRARIES}
+ Launcher
+)
+
SET_SOURCE_FILES_PROPERTIES(Launcher.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(Launcher.i PROPERTIES SWIG_FLAGS "-py3")
+IF(${CMAKE_VERSION} VERSION_LESS "3.8.0")
+ SWIG_ADD_MODULE(${Launcher_target_name} python Launcher.i)
+ELSE()
+ SWIG_ADD_LIBRARY(${Launcher_target_name} LANGUAGE python SOURCES Launcher.i)
+ENDIF()
-INCLUDE_DIRECTORIES(
- ${PYTHON_INCLUDE_DIRS}
- ${LIBBATCH_INCLUDE_DIRS}
- ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager
- ${CMAKE_CURRENT_SOURCE_DIR}/../Launcher
- )
-
-SWIG_ADD_LIBRARY(${Launcher_target_name} LANGUAGE python SOURCES Launcher.i)
-
-SWIG_LINK_LIBRARIES(${Launcher_target_name} ${PYTHON_LIBRARIES} ${PLATFORM_LIBS} Launcher)
+SWIG_LINK_LIBRARIES(${Launcher_target_name} ${_link_LIBRARIES})
SWIG_CHECK_GENERATION(${Launcher_target_name})
-INSTALL(TARGETS ${SWIG_MODULE_${Launcher_target_name}_REAL_NAME} DESTINATION ${SALOME_INSTALL_PYTHON})
+IF(WIN32)
+ SET_TARGET_PROPERTIES(_${Launcher_target_name}
+ PROPERTIES
+ DEBUG_OUTPUT_NAME _${Launcher_target_name}_d)
+ENDIF()
+
+INSTALL(TARGETS ${SWIG_MODULE_${Launcher_target_name}_REAL_NAME}
+ DESTINATION ${SALOME_INSTALL_PYTHON})
-SET(PYFILES_TO_INSTALL ${PYFILES_TO_INSTALL} ${CMAKE_CURRENT_BINARY_DIR}/pylauncher.py)
+SALOME_INSTALL_SCRIPTS(${CMAKE_CURRENT_BINARY_DIR}/${Launcher_target_name}.py
+ ${SALOME_INSTALL_PYTHON}
+ EXTRA_DPYS "${SWIG_MODULE_${Launcher_target_name}_REAL_NAME}")
-SALOME_INSTALL_SCRIPTS("${PYFILES_TO_INSTALL}" ${SALOME_INSTALL_PYTHON} EXTRA_DPYS "${SWIG_MODULE_${Launcher_target_name}_REAL_NAME}")
+UNSET(Launcher_target_name)
+UNSET(_link_LIBRARIES)
IF(SALOME_BUILD_TESTS)
ADD_SUBDIRECTORY(Test)
# --- rules ---
IF(NOT WIN32)
-# ** Now in CTestTestfileInstall.cmake **
-# ** In this file only remain unit tests (no SALOME session is needed) **
-# ADD_TEST(NAME SalomeLauncher
-# COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../../UnitTests/prepare_test.py
-# ${CMAKE_CURRENT_SOURCE_DIR}/test_launcher.py
-# -d KERNEL_ROOT_DIR=${CMAKE_INSTALL_PREFIX}
-# )
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/test_swig_launcher.py
DESTINATION ${KERNEL_TEST_DIR}/Launcher_SWIG)
INSTALL(FILES CTestTestfileInstall.cmake
DESTINATION ${KERNEL_TEST_DIR}/Launcher_SWIG
RENAME CTestTestfile.cmake)
-
- INSTALL(PROGRAMS ${STRESS_TEST_FILES}
- DESTINATION ${KERNEL_TEST_DIR}/Launcher_SWIG)
ENDIF()
${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
- ${PROJECT_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_CURRENT_SOURCE_DIR}/../Launcher
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMESDS
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/SALOMETraceCollector
+ ${CMAKE_SOURCE_DIR}/src/NamingService
+ ${CMAKE_SOURCE_DIR}/src/Utils
+ ${CMAKE_SOURCE_DIR}/src/GenericObj
+ ${CMAKE_SOURCE_DIR}/src/Container
+ ${CMAKE_SOURCE_DIR}/src/ResourcesManager
+ ${CMAKE_SOURCE_DIR}/src/Batch
+ ${CMAKE_SOURCE_DIR}/src/Notification
+ ${CMAKE_SOURCE_DIR}/src/Registry
+ ${CMAKE_SOURCE_DIR}/src/Launcher
+ ${CMAKE_SOURCE_DIR}/src/SALOMESDS
)
-SET(COMMON_LIBS
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ ${PYTHON_LIBRARIES}
SalomeContainer
SalomeResourcesManager
SalomeNS
SalomeGenericObj
SalomeIDLKernel
SalomeLauncher
+ Registry
)
-ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+SET(SalomeLifeCycleCORBA_SOURCES
+ SALOME_LifeCycleCORBA.cxx
+ SALOME_FileTransferCORBA.cxx
+)
-ADD_LIBRARY(SalomeLifeCycleCORBA SALOME_LifeCycleCORBA.cxx SALOME_FileTransferCORBA.cxx)
-TARGET_LINK_LIBRARIES(SalomeLifeCycleCORBA ${COMMON_LIBS})
+SET(SalomeLifeCycleCORBA_HEADERS
+ SALOME_LifeCycleCORBA.hxx
+ SALOME_FileTransferCORBA.hxx
+)
+
+ADD_LIBRARY(SalomeLifeCycleCORBA ${SalomeLifeCycleCORBA_SOURCES})
+TARGET_LINK_LIBRARIES(SalomeLifeCycleCORBA ${_link_LIBRARIES})
INSTALL(TARGETS SalomeLifeCycleCORBA EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-ADD_EXECUTABLE(Test_LifeCycleCORBA Test_LifeCycleCORBA.cxx)
-TARGET_LINK_LIBRARIES(Test_LifeCycleCORBA SalomeLifeCycleCORBA Registry SalomeNotification SalomeContainer ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
+INSTALL(FILES ${SalomeLifeCycleCORBA_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+IF(SALOME_BUILD_TESTS)
+ ADD_EXECUTABLE(Test_LifeCycleCORBA Test_LifeCycleCORBA.cxx)
+ TARGET_LINK_LIBRARIES(Test_LifeCycleCORBA ${_link_LIBRARIES} SalomeLifeCycleCORBA)
+
+ ADD_EXECUTABLE(TestContainerManager TestContainerManager.cxx)
+ TARGET_LINK_LIBRARIES(TestContainerManager SalomeLifeCycleCORBA ${_link_LIBRARIES})
-ADD_EXECUTABLE(TestContainerManager TestContainerManager.cxx)
-TARGET_LINK_LIBRARIES(TestContainerManager SalomeLifeCycleCORBA Registry SalomeNotification SalomeContainer ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
+ INSTALL(TARGETS Test_LifeCycleCORBA TestContainerManager DESTINATION ${SALOME_INSTALL_BINS})
+ENDIF()
-INSTALL(TARGETS Test_LifeCycleCORBA TestContainerManager DESTINATION ${SALOME_INSTALL_BINS})
+UNSET(SalomeLifeCycleCORBA_SOURCES)
+UNSET(SalomeLifeCycleCORBA_HEADERS)
+UNSET(_link_LIBRARIES)
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+IF(SALOME_BUILD_TESTS)
+ ADD_SUBDIRECTORY(Test)
+ENDIF()
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIR}
- ${CPPUNIT_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${PROJECT_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
- ${PROJECT_BINARY_DIR}/idl
+ ${PYTHON_INCLUDE_DIRS}
+ ${CPPUNIT_INCLUDE_DIRS}
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/Basics/Test
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace/Test
+ ${CMAKE_SOURCE_DIR}/src/SALOMETraceCollector
+ ${CMAKE_SOURCE_DIR}/src/SALOMETraceCollector/Test
+ ${CMAKE_SOURCE_DIR}/src/NamingService
+ ${CMAKE_SOURCE_DIR}/src/NamingService/Test
+ ${CMAKE_SOURCE_DIR}/src/Utils
+ ${CMAKE_SOURCE_DIR}/src/Utils/Test
+ ${CMAKE_SOURCE_DIR}/src/ResourcesManager
+ ${CMAKE_SOURCE_DIR}/src/LifeCycleCORBA
)
-SET(COMMON_LIBS
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ ${PYTHON_LIBRARIES}
${CPPUNIT_LIBRARIES}
SALOMEBasics
SalomeResourcesManager
SalomeNS
Registry
SalomeNotification
- UtilsTest
OpUtil
- SALOMELocalTraceTest
SALOMELocalTrace
- SALOMETraceCollectorTest
SalomeIDLKernel
SalomeLifeCycleCORBA
- ${OMNIORB_LIBRARIES}
)
-ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS})
SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/LifeCycleCORBA)
ADD_LIBRARY(LifeCycleCORBATest LifeCycleCORBATest.cxx)
-TARGET_LINK_LIBRARIES(LifeCycleCORBATest ${COMMON_LIBS})
+TARGET_LINK_LIBRARIES(LifeCycleCORBATest ${_link_LIBRARIES})
INSTALL(TARGETS LifeCycleCORBATest DESTINATION ${KERNEL_TEST_LIB})
+SET(_exe_LIBRARIES
+ ${_link_LIBRARIES}
+ NamingServiceTest
+ SALOMETraceCollectorTest
+ SALOMELocalTraceTest
+ UtilsTest
+ LifeCycleCORBATest
+)
+
ADD_EXECUTABLE(TestLifeCycleCORBA TestLifeCycleCORBA.cxx)
-TARGET_LINK_LIBRARIES(TestLifeCycleCORBA LifeCycleCORBATest NamingServiceTest SalomeLifeCycleCORBA ${COMMON_LIBS})
+TARGET_LINK_LIBRARIES(TestLifeCycleCORBA ${_exe_LIBRARIES})
INSTALL(TARGETS TestLifeCycleCORBA DESTINATION ${LOCAL_TEST_DIR})
# Executable scripts to be installed
-INSTALL(FILES TestLifeCycleCORBA.py DESTINATION ${LOCAL_TEST_DIR})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${LOCAL_TEST_DIR})
+INSTALL(PROGRAMS TestLifeCycleCORBA.py DESTINATION ${LOCAL_TEST_DIR})
INSTALL(FILES CTestTestfileInstall.cmake
DESTINATION ${LOCAL_TEST_DIR}
RENAME CTestTestfile.cmake)
+
+UNSET(LOCAL_TEST_DIR)
+UNSET(_link_LIBRARIES)
+UNSET(_exe_LIBRARIES)
INCLUDE(${SWIG_USE_FILE})
-SET_SOURCE_FILES_PROPERTIES(libSALOME_LifeCycleCORBA.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(libSALOME_LifeCycleCORBA.i PROPERTIES SWIG_FLAGS "-py3")
-ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
-
INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${OMNIORB_INCLUDE_DIR}
- ${OMNIORBPY_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
${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
- ${PROJECT_BINARY_DIR}/idl
- )
+ ${CMAKE_SOURCE_DIR}/src/NamingService
+ ${CMAKE_SOURCE_DIR}/src/LifeCycleCORBA
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/Utils
+)
+
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${PYTHON_LIBRARIES}
+ SalomeLifeCycleCORBA
+)
+
+SET_SOURCE_FILES_PROPERTIES(libSALOME_LifeCycleCORBA.i PROPERTIES CPLUSPLUS ON)
+SET_SOURCE_FILES_PROPERTIES(libSALOME_LifeCycleCORBA.i PROPERTIES SWIG_FLAGS "-py3")
IF(${CMAKE_VERSION} VERSION_LESS "3.8.0")
SWIG_ADD_MODULE(libSALOME_LifeCycleCORBA python libSALOME_LifeCycleCORBA.i)
ELSE()
- SWIG_ADD_LIBRARY(libSALOME_LifeCycleCORBA LANGUAGE python SOURCES libSALOME_LifeCycleCORBA.i)
+ SWIG_ADD_LIBRARY(libSALOME_LifeCycleCORBA LANGUAGE python SOURCES libSALOME_LifeCycleCORBA.i)
ENDIF()
-SWIG_LINK_LIBRARIES(libSALOME_LifeCycleCORBA ${PYTHON_LIBRARIES} SalomeLifeCycleCORBA)
-TARGET_LINK_LIBRARIES(_libSALOME_LifeCycleCORBA ${PLATFORM_LIBS})
+SWIG_LINK_LIBRARIES(libSALOME_LifeCycleCORBA ${_link_LIBRARIES})
-IF(${MACHINE} STREQUAL WINDOWS)
+IF(WIN32)
SET_TARGET_PROPERTIES(_libSALOME_LifeCycleCORBA PROPERTIES DEBUG_OUTPUT_NAME _libSALOME_LifeCycleCORBA_d)
-ENDIF(${MACHINE} STREQUAL WINDOWS)
+ENDIF()
INSTALL(TARGETS _libSALOME_LifeCycleCORBA DESTINATION ${SALOME_INSTALL_PYTHON})
-SET(SCRIPTS
- LifeCycleCORBA.py
- TestLifeCycleCORBA.py
-)
-SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON})
+
+SALOME_INSTALL_SCRIPTS(LifeCycleCORBA.py ${SALOME_INSTALL_SCRIPT_PYTHON})
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_LifeCycleCORBA.py DESTINATION ${SALOME_INSTALL_PYTHON})
+
+IF(SALOME_BUILD_TESTS)
+ SALOME_INSTALL_SCRIPTS(TestLifeCycleCORBA.py ${SALOME_INSTALL_SCRIPT_PYTHON})
+ENDIF()
+
+UNSET(_link_LIBRARIES)
+
+IF(SALOME_BUILD_TESTS)
+ ADD_SUBDIRECTORY(Test)
+ENDIF()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-# Scripts to be installed
SET(SCRIPTS
LifeCycleCORBA_SWIGTest.py
testresourcemanager.py
)
SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/LifeCycleCORBA_SWIG)
+
INSTALL(FILES ${SCRIPTS} DESTINATION ${LOCAL_TEST_DIR})
+
INSTALL(FILES CTestTestfileInstall.cmake
DESTINATION ${LOCAL_TEST_DIR}
RENAME CTestTestfile.cmake)
+
+UNSET(SCRIPTS)
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
)
+
ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
-ADD_LIBRARY(SalomeLoggerServer SALOME_Trace.cxx SALOME_Logger_Server.cxx)
-TARGET_LINK_LIBRARIES(SalomeLoggerServer SalomeIDLKernel ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS})
-INSTALL(TARGETS SalomeLoggerServer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${OMNIORB_LIBRARIES}
+ ${PTHREAD_LIBRARIES}
+ SalomeIDLKernel
+)
-SET(SALOME_Logger_Server_SOURCES
- SALOME_Logger_Server_main.cxx
- SALOME_Logger_Server.hxx
+SET(Logger_SOURCES
+ SALOME_Trace.cxx
+ SALOME_Logger_Server.cxx
)
-SET(SALOME_Logger_Server_LIBS
- SalomeLoggerServer
- SalomeIDLKernel
- ${OMNIORB_LIBRARIES}
+SET(Logger_HEADERS
+ SALOME_Trace.hxx
)
-ADD_EXECUTABLE(SALOME_Logger_Server ${SALOME_Logger_Server_SOURCES})
-TARGET_LINK_LIBRARIES(SALOME_Logger_Server ${SALOME_Logger_Server_LIBS})
+ADD_LIBRARY(SalomeLoggerServer ${Logger_SOURCES})
+TARGET_LINK_LIBRARIES(SalomeLoggerServer ${_link_LIBRARIES})
+INSTALL(TARGETS SalomeLoggerServer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+ADD_EXECUTABLE(SALOME_Logger_Server SALOME_Logger_Server_main.cxx)
+TARGET_LINK_LIBRARIES(SALOME_Logger_Server ${_link_LIBRARIES} SalomeLoggerServer)
INSTALL(TARGETS SALOME_Logger_Server EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
-# Executable scripts to be installed
SALOME_INSTALL_SCRIPTS(SALOME_Trace.py ${SALOME_INSTALL_SCRIPT_PYTHON})
-INSTALL(FILES SALOME_Trace.hxx DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${Logger_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+UNSET(Logger_SOURCES)
+UNSET(Logger_HEADERS)
+UNSET(_link_LIBRARIES)
+
+IF(SALOME_BUILD_TESTS)
+ ADD_SUBDIRECTORY(Test)
+ENDIF()
${PTHREAD_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
- ${PROJECT_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
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/NamingService
+ ${CMAKE_SOURCE_DIR}/src/Utils
+ ${CMAKE_SOURCE_DIR}/src/Registry
+ ${CMAKE_SOURCE_DIR}/src/Notification
+ ${CMAKE_SOURCE_DIR}/src/ResourcesManager
+ ${CMAKE_SOURCE_DIR}/src/Container
+ ${CMAKE_SOURCE_DIR}/src/GenericObj
)
-SET(COMMON_LIBS
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ ${MPI_CXX_LIBRARIES}
+ ${PYTHON_LIBRARIES}
Registry
SalomeNotification
SalomeResourcesManager
SalomeContainer
SalomeGenericObj
SalomeIDLKernel
- ${OMNIORB_LIBRARIES}
)
ADD_DEFINITIONS(${MPI_DEFINITIONS} ${OMNIORB_DEFINITIONS})
ADD_LIBRARY(SalomeMPIContainer MPIObject_i.cxx MPIContainer_i.cxx)
-TARGET_LINK_LIBRARIES(SalomeMPIContainer ${COMMON_LIBS})
+TARGET_LINK_LIBRARIES(SalomeMPIContainer ${_link_LIBRARIES})
INSTALL(TARGETS SalomeMPIContainer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(SALOME_MPIContainer SALOME_MPIContainer.cxx)
-TARGET_LINK_LIBRARIES(SALOME_MPIContainer SalomeMPIContainer ${COMMON_LIBS} ${PYTHON_LIBRARIES} ${MPI_CXX_LIBRARIES})
-
-ADD_EXECUTABLE(testMPI2 testMPI2.cxx)
-TARGET_LINK_LIBRARIES(testMPI2 ${MPI_CXX_LIBRARIES})
+TARGET_LINK_LIBRARIES(SALOME_MPIContainer ${_link_LIBRARIES} SalomeMPIContainer)
+INSTALL(TARGETS SALOME_MPIContainer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
ADD_EXECUTABLE(getMPIImplementation getMPIImplementation.cxx)
TARGET_LINK_LIBRARIES(getMPIImplementation ${MPI_CXX_LIBRARIES})
+INSTALL(TARGETS getMPIImplementation EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
-INSTALL(TARGETS SALOME_MPIContainer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
-INSTALL(TARGETS testMPI2 DESTINATION ${SALOME_INSTALL_BINS})
-INSTALL(TARGETS getMPIImplementation DESTINATION ${SALOME_INSTALL_BINS})
+IF(SALOME_BUILD_TESTS)
+ ADD_EXECUTABLE(testMPI2 testMPI2.cxx)
+ TARGET_LINK_LIBRARIES(testMPI2 ${MPI_CXX_LIBRARIES})
+ INSTALL(TARGETS testMPI2 DESTINATION ${SALOME_INSTALL_BINS})
+ INSTALL(FILES launch_testMPI2.csh
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+ DESTINATION ${SALOME_INSTALL_SCRIPT_SCRIPTS})
+ENDIF()
-INSTALL(FILES launch_testMPI2.csh PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE DESTINATION ${SALOME_INSTALL_SCRIPT_SCRIPTS})
+INSTALL(FILES MPIContainer_i.hxx MPIObject_i.hxx DESTINATION ${SALOME_INSTALL_HEADERS})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+UNSET(_link_LIBRARIES)
${PTHREAD_INCLUDE_DIR}
${OMNIORB_INCLUDE_DIR}
${LIBXML2_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/NamingService
+ ${CMAKE_SOURCE_DIR}/src/Utils
)
-# This local variable defines the list of dependent libraries common to all target in this package.
-SET(COMMON_LIBS
+ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${LIBXML2_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
SalomeNS
OpUtil
SALOMELocalTrace
SALOMEBasics
SalomeIDLKernel
- ${LIBXML2_LIBRARIES}
- ${PTHREAD_LIBRARIES}
)
SET(SalomeCatalog_SOURCES
SALOME_ModuleCatalog_impl.cxx
SALOME_ModuleCatalog_Acomponent_impl.cxx
)
-ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+
+SET(SalomeCatalog_HEADERS
+ SALOME_ModuleCatalog.hxx
+ SALOME_ModuleCatalog_Acomponent_impl.hxx
+ SALOME_ModuleCatalog_impl.hxx
+)
ADD_LIBRARY(SalomeCatalog ${SalomeCatalog_SOURCES})
-TARGET_LINK_LIBRARIES(SalomeCatalog ${COMMON_LIBS})
+TARGET_LINK_LIBRARIES(SalomeCatalog ${_link_LIBRARIES})
INSTALL(TARGETS SalomeCatalog EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(SALOME_ModuleCatalog_Server SALOME_ModuleCatalog_Server.cxx)
-TARGET_LINK_LIBRARIES(SALOME_ModuleCatalog_Server SalomeCatalog ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
+TARGET_LINK_LIBRARIES(SALOME_ModuleCatalog_Server ${_link_LIBRARIES} SalomeCatalog)
ADD_EXECUTABLE(SALOME_ModuleCatalog_Client SALOME_ModuleCatalog_Client.cxx)
-TARGET_LINK_LIBRARIES(SALOME_ModuleCatalog_Client SalomeCatalog ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
+TARGET_LINK_LIBRARIES(SALOME_ModuleCatalog_Client ${_link_LIBRARIES} SalomeCatalog)
INSTALL(TARGETS SALOME_ModuleCatalog_Server SALOME_ModuleCatalog_Client
EXPORT ${PROJECT_NAME}TargetGroup
DESTINATION ${SALOME_INSTALL_BINS})
-# Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestModuleCatalog.py ${SALOME_INSTALL_SCRIPT_PYTHON})
+IF(SALOME_BUILD_TESTS)
+ SALOME_INSTALL_SCRIPTS(TestModuleCatalog.py ${SALOME_INSTALL_SCRIPT_PYTHON})
+ENDIF()
-SET(COMMON_HEADERS_HXX
- SALOME_ModuleCatalog.hxx
- SALOME_ModuleCatalog_Acomponent_impl.hxx
- SALOME_ModuleCatalog_impl.hxx
- )
+INSTALL(FILES ${SalomeCatalog_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+UNSET(SalomeCatalog_SOURCES)
+UNSET(SalomeCatalog_HEADERS)
+UNSET(_link_LIBRARIES)
+++ /dev/null
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// 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
-//
-
-// SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules
-// File : PathPrefix.hxx
-// Author : Estelle Deville
-// Module : SALOME
-// $Header$
-//
-#ifndef PATH_PREFIX_H
-#define PATH_PREFIX_H
-
-#include <string>
-#include <vector>
-
-struct PathPrefix
-{
- string path ;
- vector<string> listOfComputer ;
-} ;
-
-typedef vector<PathPrefix> ListOfPathPrefix ;
-
-#endif // PATH_PREFIX_H
INCLUDE(${SWIG_USE_FILE})
-SET_SOURCE_FILES_PROPERTIES(NOTIFICATION.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(NOTIFICATION.i PROPERTIES SWIG_FLAGS "-py3")
-SET_SOURCE_FILES_PROPERTIES(NOTIFICATIONPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} -DHAVE_CONFIG_H")
-
INCLUDE_DIRECTORIES(
- ${PYTHON_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
+ ${PYTHON_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/Notification
${CMAKE_CURRENT_SOURCE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Notification
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- )
+)
+
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ ${PYTHON_LIBRARIES}
+ SalomeNotification
+)
# SWIG module name differs from file name - avoid unnecessary rebuild:
SET_SOURCE_FILES_PROPERTIES(NOTIFICATION.i PROPERTIES SWIG_MODULE_NAME libNOTIFICATION)
+SET_SOURCE_FILES_PROPERTIES(NOTIFICATION.i PROPERTIES CPLUSPLUS ON)
+SET_SOURCE_FILES_PROPERTIES(NOTIFICATION.i PROPERTIES SWIG_FLAGS "-py3")
+SET_SOURCE_FILES_PROPERTIES(NOTIFICATIONPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} -DHAVE_CONFIG_H")
IF(${CMAKE_VERSION} VERSION_LESS "3.8.0")
SWIG_ADD_MODULE(libNOTIFICATION python NOTIFICATION.i NOTIFICATION_Swig.cxx)
SWIG_ADD_LIBRARY(libNOTIFICATION LANGUAGE python SOURCES NOTIFICATION.i NOTIFICATION_Swig.cxx)
ENDIF()
+SWIG_LINK_LIBRARIES(libNOTIFICATION ${_link_LIBRARIES})
-SWIG_LINK_LIBRARIES(libNOTIFICATION ${PYTHON_LIBRARIES} SalomeNotification)
-ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
-
-IF(${MACHINE} STREQUAL WINDOWS)
+IF(WIN32)
SET_TARGET_PROPERTIES(_libNOTIFICATION PROPERTIES DEBUG_OUTPUT_NAME _libNOTIFICATION_d)
-ENDIF(${MACHINE} STREQUAL WINDOWS)
+ENDIF()
INSTALL(TARGETS _libNOTIFICATION DESTINATION ${SALOME_INSTALL_PYTHON})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libNOTIFICATION.py DESTINATION ${SALOME_INSTALL_PYTHON})
+
+UNSET(_link_LIBRARIES)
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${PROJECT_BINARY_DIR}/idl
- )
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/Utils
+)
+
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ SALOMEBasics
+ OpUtil
+ SalomeIDLKernel
+)
SET(SalomeNS_SOURCES
+ NamingService_WaitForServerReadiness.cxx
SALOME_NamingService.cxx
ServiceUnreachable.cxx
- NamingService_WaitForServerReadiness.cxx
)
+SET(SalomeNS_HEADERS
+ NamingService_WaitForServerReadiness.hxx
+ SALOME_NamingService_defs.hxx
+ SALOME_NamingService.hxx
+ ServiceUnreachable.hxx
+)
-ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
ADD_LIBRARY(SalomeNS ${SalomeNS_SOURCES})
-ADD_DEPENDENCIES(SalomeNS SalomeIDLKernel)
-TARGET_LINK_LIBRARIES(SalomeNS OpUtil)
-
+TARGET_LINK_LIBRARIES(SalomeNS ${_link_LIBRARIES})
INSTALL(TARGETS SalomeNS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-# Executable scripts to be installed
SALOME_INSTALL_SCRIPTS(SALOME_NamingServicePy.py ${SALOME_INSTALL_SCRIPT_PYTHON})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${SalomeNS_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+UNSET(SalomeNS_SOURCES)
+UNSET(SalomeNS_HEADERS)
+UNSET(_link_LIBRARIES)
+
+IF(SALOME_BUILD_TESTS)
+ ADD_SUBDIRECTORY(Test)
+ENDIF()
+++ /dev/null
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// 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
-//
-
-// SALOME NamingService : wrapping NamingService services
-// File : SALOME_NamingService.i
-// Author : Paul RASCLE, EDF
-// Module : SALOME
-// $Header$
-//
-%{
-#include "SALOME_NamingService.hxx"
-//#include <omniORB4/CORBA.h>
-#include <omniORB3/CORBA.h>
-#include "ServiceUnreachable.hxx"
-%}
-
-%except(python)
-{
- try
- {
- $function
- }
- catch (ServiceUnreachable)
- {
- PyErr_SetString(PyExc_IndexError,"Naming Service Unreacheable");
- return NULL;
- }
-}
-
-class SALOME_NamingService
-{
-public:
-
- //! standard constructor
- SALOME_NamingService();
-
- //! standard destructor
- virtual ~SALOME_NamingService();
-
- //! initialize ORB reference after default constructor
- void init_orb(CORBA::ORB_ptr orb);
-
- //! method to create an association in the NamingService between an object reference and a path
- void Register(CORBA::Object_ptr ObjRef, const char* Path)
- throw(ServiceUnreachable);
-
- //! method to get the ObjRef of a symbolic name
- CORBA::Object_ptr Resolve(const char* Path)
- throw( ServiceUnreachable);
-
- //! method to research a name from the naming service's current directory
- int Find(const char* name)
- throw(ServiceUnreachable);
-
- //! method to create a directory from the current directory
- bool Create_Directory(const char* Path)
- throw(ServiceUnreachable);
-
- //! method to change the current directory to the directory Path indicated in "in" Parameter
- bool Change_Directory(const char* Path)
- throw(ServiceUnreachable);
-
- //!method to get the current directory
- char* Current_Directory()
- throw(ServiceUnreachable);
-
- //!method to print all the contexts contained from the current directory
- void list()
- throw(ServiceUnreachable);
-
- //! method to destroy an association Path-Object Reference
- void Destroy_Name(const char* Path)
- throw(ServiceUnreachable);
-
- //! method to destroy a directory if it is empty
- virtual void Destroy_Directory(const char* Path)
- throw(ServiceUnreachable);
-};
-
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIR}
- ${CPPUNIT_INCLUDE_DIRS}
+ ${CPPUNIT_INCLUDE_DIRS}ti
${OMNIORB_INCLUDE_DIR}
- ${PROJECT_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_CURRENT_SOURCE_DIR}/../../LifeCycleCORBA
- ${PROJECT_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
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/Basics/Test
+ ${CMAKE_SOURCE_DIR}/src/Utils
+ ${CMAKE_SOURCE_DIR}/src/Utils/Test
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace/Test
+ ${CMAKE_SOURCE_DIR}/src/SALOMETraceCollector
+ ${CMAKE_SOURCE_DIR}/src/SALOMETraceCollector/Test
+ ${CMAKE_SOURCE_DIR}/src/NamingService
+ ${CMAKE_SOURCE_DIR}/src/LifeCycleCORBA
)
-# This local variable defines the list of dependent libraries common to all target in this package.
-SET(COMMON_LIBS
- ${CPPUNIT_LIBRARIES}
- SalomeNS
- SalomeLifeCycleCORBA
- ${OMNIORB_LIBRARIES}
- ${PLATFORM_LIBS}
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ ${CPPUNIT_LIBRARIES}
+ SalomeNS
+ SalomeLifeCycleCORBA
)
ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+
SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/NamingService)
ADD_LIBRARY(NamingServiceTest NamingServiceTest.cxx)
-TARGET_LINK_LIBRARIES(NamingServiceTest ${COMMON_LIBS})
+TARGET_LINK_LIBRARIES(NamingServiceTest ${_link_LIBRARIES})
INSTALL(TARGETS NamingServiceTest DESTINATION ${KERNEL_TEST_LIB})
-SET(TestNamingService_LIBS
+SET(_exe_LIBRARIES
+ ${_link_LIBRARIES}
NamingServiceTest
- SalomeNS
- SALOMELocalTraceTest
- SALOMELocalTrace
SALOMETraceCollectorTest
+ SALOMELocalTraceTest
UtilsTest
- OpUtil
- SALOMEBasics
- SalomeIDLKernel
- ${COMMON_LIBS}
)
ADD_EXECUTABLE(TestNamingService TestNamingService.cxx)
-TARGET_LINK_LIBRARIES(TestNamingService ${TestNamingService_LIBS})
+TARGET_LINK_LIBRARIES(TestNamingService ${_exe_LIBRARIES})
INSTALL(TARGETS TestNamingService DESTINATION ${LOCAL_TEST_DIR})
-# Executable scripts to be installed
-INSTALL(FILES TestNamingService.py DESTINATION ${LOCAL_TEST_DIR})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${LOCAL_TEST_DIR})
+INSTALL(PROGRAMS TestNamingService.py DESTINATION ${LOCAL_TEST_DIR})
INSTALL(FILES CTestTestfileInstall.cmake
DESTINATION ${LOCAL_TEST_DIR}
RENAME CTestTestfile.cmake)
+
+UNSET(LOCAL_TEST_DIR)
+UNSET(_link_LIBRARIES)
+UNSET(_exe_LIBRARIES)
#
INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- )
+ ${OMNIORB_INCLUDE_DIR}
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/Utils
+)
+
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
-SET(COMMON_LIBS
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
OpUtil
SALOMELocalTrace
SALOMEBasics
- ${OMNIORB_LIBRARIES}
)
SET(SalomeNotification_SOURCES
NOTIFICATION_Consumer.cxx
)
-ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+SET(SalomeNotification_HEADERS
+ CosNotifyShorthands.h
+ NOTIFICATION_Consumer.hxx
+ NOTIFICATION.hxx
+ NOTIFICATION_Supplier.hxx
+ SALOME_NOTIFICATION.hxx
+)
ADD_LIBRARY(SalomeNotification ${SalomeNotification_SOURCES})
-TARGET_LINK_LIBRARIES(SalomeNotification ${COMMON_LIBS})
+TARGET_LINK_LIBRARIES(SalomeNotification ${_link_LIBRARIES})
INSTALL(TARGETS SalomeNotification EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-SET(COMMON_HEADERS ${COMMON_HEADERS_HXX} CosNotifyShorthands.h)
-INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${SalomeNotification_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+UNSET(SalomeNotification_SOURCES)
+UNSET(SalomeNotification_HEADERS)
+UNSET(_link_LIBRARIES)
${MPI_CXX_INCLUDE_PATH}
${PYTHON_INCLUDE_DIRS}
${PACO_INCLUDE_DIRS}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${PROJECT_SOURCE_DIR}/src/Container
- ${PROJECT_SOURCE_DIR}/src/Notification
- ${PROJECT_SOURCE_DIR}/src/SALOMELocalTrace
- ${PROJECT_SOURCE_DIR}/src/Basics
- ${PROJECT_SOURCE_DIR}/src/NamingService
- ${PROJECT_SOURCE_DIR}/src/Registry
- ${PROJECT_SOURCE_DIR}/src/Utils
- ${PROJECT_SOURCE_DIR}/src/GenericObj
- ${CMAKE_CURRENT_SOURCE_DIR}/../HDFPersist
- ${PROJECT_BINARY_DIR}/idl
- ${PROJECT_SOURCE_DIR}/src/SALOMETraceCollector
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${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_SOURCE_DIR}/src/HDFPersist
+ ${CMAKE_SOURCE_DIR}/src/SALOMETraceCollector
)
-# This local variable defines the list of dependent libraries common to all target in this package.
-SET(COMMON_LIBS
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${MPI_DEFINITIONS})
+
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ ${PACO_LIBRARIES}
+ ${PYTHON_LIBRARIES}
+ ${MPI_CXX_LIBRARIES}
SalomeContainer
SalomeNS
SALOMELocalTrace
SalomeHDFPersist
SalomeParallelIDLKernel
SalomeIDLKernel
- ${OMNIORB_LIBRARIES}
- ${PACO_LIBRARIES}
- ${PYTHON_LIBRARIES}
)
SET(SalomeParallelContainer_SOURCES
SALOME_ParallelGlobalProcessVar_i.cxx
)
-ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${MPI_DEFINITIONS})
-
ADD_LIBRARY(SalomeParallelContainer ${SalomeParallelContainer_SOURCES})
-TARGET_LINK_LIBRARIES(SalomeParallelContainer ${COMMON_LIBS} ${MPI_CXX_LIBRARIES})
+TARGET_LINK_LIBRARIES(SalomeParallelContainer ${_link_LIBRARIES})
INSTALL(TARGETS SalomeParallelContainer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
IF(SALOME_USE_MPI)
- SET(SALOME_ParallelContainerProxyMpi_LIBS
- SalomeParallelContainer
- ${MPI_CXX_LIBRARIES}
- ${COMMON_LIBS}
- )
ADD_EXECUTABLE(SALOME_ParallelContainerProxyMpi SALOME_ParallelContainerProxyMpi.cxx)
- TARGET_LINK_LIBRARIES(SALOME_ParallelContainerProxyMpi ${SALOME_ParallelContainerProxyMpi_LIBS})
+ TARGET_LINK_LIBRARIES(SALOME_ParallelContainerProxyMpi ${_link_LIBRARIES} SalomeParallelContainer)
ADD_EXECUTABLE(SALOME_ParallelContainerNodeMpi SALOME_ParallelContainerNodeMpi.cxx)
- TARGET_LINK_LIBRARIES(SALOME_ParallelContainerNodeMpi ${SALOME_ParallelContainerProxyMpi_LIBS})
+ TARGET_LINK_LIBRARIES(SALOME_ParallelContainerNodeMpi ${_link_LIBRARIES} SalomeParallelContainer)
INSTALL(TARGETS SALOME_ParallelContainerProxyMpi SALOME_ParallelContainerNodeMpi
- EXPORT ${PROJECT_NAME}TargetGroup
- DESTINATION ${SALOME_INSTALL_BINS})
+ EXPORT ${PROJECT_NAME}TargetGroup
+ DESTINATION ${SALOME_INSTALL_BINS})
ENDIF(SALOME_USE_MPI)
-SET(SALOME_ParallelContainerProxyDummy_LIBS
- SalomeParallelContainer
- ${COMMON_LIBS}
-)
-
ADD_EXECUTABLE(SALOME_ParallelContainerProxyDummy SALOME_ParallelContainerProxyDummy.cxx)
-TARGET_LINK_LIBRARIES(SALOME_ParallelContainerProxyDummy ${SALOME_ParallelContainerProxyDummy_LIBS})
+TARGET_LINK_LIBRARIES(SALOME_ParallelContainerProxyDummy ${_link_LIBRARIES} SalomeParallelContainer)
ADD_EXECUTABLE(SALOME_ParallelContainerNodeDummy SALOME_ParallelContainerNodeDummy.cxx)
-TARGET_LINK_LIBRARIES(SALOME_ParallelContainerNodeDummy ${SALOME_ParallelContainerProxyDummy_LIBS})
+TARGET_LINK_LIBRARIES(SALOME_ParallelContainerNodeDummy ${_link_LIBRARIES} SalomeParallelContainer)
INSTALL(TARGETS SALOME_ParallelContainerNodeDummy SALOME_ParallelContainerProxyDummy DESTINATION ${SALOME_INSTALL_BINS})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+SET(SalomeParallelContainer_HEADERS
+ Parallel_Salome_file_i.hxx
+ SALOME_ParallelComponent_i.hxx
+ SALOME_ParallelContainer_i.hxx
+ SALOME_ParallelContainerProxy_i.hxx
+ SALOME_ParallelGlobalProcessVar_i.hxx
+)
+
+INSTALL(FILES ${SalomeParallelContainer_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+UNSET(SalomeParallelContainer_SOURCES)
+UNSET(SalomeParallelContainer_HEADERS)
+UNSET(_link_LIBRARIES)
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIR}
${OMNIORB_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/NamingService
+ ${CMAKE_SOURCE_DIR}/src/Utils
)
-ADD_LIBRARY(Registry RegistryConnexion.cxx RegistryService.cxx)
ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
-TARGET_LINK_LIBRARIES(Registry SalomeNS OpUtil SALOMELocalTrace SalomeIDLKernel ${PLATFORM_LIBS})
-INSTALL(TARGETS Registry EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-SET(SALOME_Registry_Server_LIBS
- SalomeIDLKernel
- Registry
- SalomeNS
- OpUtil
- SALOMELocalTrace
- SALOMEBasics
- ${PLATFORM_LIBS}
- ${PTHREAD_LIBRARIES}
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ OpUtil
+ SALOMELocalTrace
+ SalomeIDLKernel
+ SalomeNS
+)
+
+SET(Registry_SOURCES
+ RegistryConnexion.cxx
+ RegistryService.cxx
+)
+
+SET(Registry_HEADERS
+ RegistryConnexion.hxx
+ RegistryService.hxx
+ SALOME_Registry.hxx
)
+ADD_LIBRARY(Registry ${Registry_SOURCES})
+TARGET_LINK_LIBRARIES(Registry ${_link_LIBRARIES})
+INSTALL(TARGETS Registry EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
ADD_EXECUTABLE(SALOME_Registry_Server SALOME_Registry_Server.cxx)
-TARGET_LINK_LIBRARIES(SALOME_Registry_Server ${SALOME_Registry_Server_LIBS})
+TARGET_LINK_LIBRARIES(SALOME_Registry_Server ${_link_LIBRARIES} Registry)
INSTALL(TARGETS SALOME_Registry_Server EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${Registry_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+UNSET(Registry_SOURCES)
+UNSET(Registry_HEADERS)
+UNSET(_link_LIBRARIES)
#
INCLUDE_DIRECTORIES(
- ${LIBXML2_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
${OMNIORB_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${PROJECT_BINARY_DIR}/idl
+ ${LIBXML2_INCLUDE_DIR}
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/NamingService
+ ${CMAKE_SOURCE_DIR}/src/Utils
)
-
-# This local variable defines the list of dependent libraries common to all target in this package.
-SET(COMMON_LIBS
- SalomeNS
- OpUtil
- SALOMEBasics
- SalomeIDLKernel
- ${LIBXML2_LIBRARIES}
-)
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${LIBXML2_DEFINITIONS})
SET(ResourcesManager_SOURCES
- SALOME_ResourcesCatalog_Parser.cxx
- SALOME_ResourcesCatalog_Handler.cxx
- SALOME_LoadRateManager.cxx
- ResourcesManager.cxx
+ SALOME_ResourcesCatalog_Parser.cxx
+ SALOME_ResourcesCatalog_Handler.cxx
+ SALOME_LoadRateManager.cxx
+ ResourcesManager.cxx
)
-ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${LIBXML2_DEFINITIONS})
+SET(ResourcesManager_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${LIBXML2_LIBRARIES}
+ SALOMEBasics
+)
ADD_LIBRARY(ResourcesManager ${ResourcesManager_SOURCES})
-TARGET_LINK_LIBRARIES(ResourcesManager SALOMEBasics ${LIBXML2_LIBRARIES})
-INSTALL(TARGETS ResourcesManager EXPORT ${PROJECT_NAME}TargetGroup
- DESTINATION ${SALOME_INSTALL_LIBS})
+TARGET_LINK_LIBRARIES(ResourcesManager ${ResourcesManager_LIBRARIES})
+INSTALL(TARGETS ResourcesManager
+ EXPORT ${PROJECT_NAME}TargetGroup
+ DESTINATION ${SALOME_INSTALL_LIBS})
SET(SalomeResourcesManager_SOURCES
SALOME_ResourcesManager.cxx
SALOME_ResourcesManager_Client.cxx
SALOME_ResourcesManager_Common.cxx
)
+
+SET(SalomeResourcesManager_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${LIBXML2_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ SALOMEBasics
+ SalomeNS
+ OpUtil
+ SalomeIDLKernel
+ ResourcesManager
+)
+
ADD_LIBRARY(SalomeResourcesManager ${SalomeResourcesManager_SOURCES})
-TARGET_LINK_LIBRARIES(SalomeResourcesManager ResourcesManager ${COMMON_LIBS})
-INSTALL(TARGETS SalomeResourcesManager EXPORT ${PROJECT_NAME}TargetGroup
+TARGET_LINK_LIBRARIES(SalomeResourcesManager ${SalomeResourcesManager_LIBRARIES})
+INSTALL(TARGETS SalomeResourcesManager
+ EXPORT ${PROJECT_NAME}TargetGroup
DESTINATION ${SALOME_INSTALL_LIBS})
-SET(COMMON_HEADERS_HXX
+SET(ResourcesManager_HEADERS
ResourcesManager.hxx
ResourcesManager_Defs.hxx
SALOME_LoadRateManager.hxx
SALOME_ResourcesManager.hxx
SALOME_ResourcesManager_Client.hxx
SALOME_ResourcesManager_Common.hxx
- )
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+)
+
+INSTALL(FILES ${ResourcesManager_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+UNSET(ResourcesManager_SOURCES)
+UNSET(ResourcesManager_LIBRARIES)
+UNSET(SalomeResourcesManager_SOURCES)
+UNSET(SalomeResourcesManager_LIBRARIES)
+UNSET(ResourcesManager_HEADERS)
${OMNIORB_INCLUDE_DIR}
${HDF5_INCLUDE_DIRS}
${Boost_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../HDFPersist
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../KernelHelpers
- ${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_CURRENT_SOURCE_DIR}/../TOOLSDS
- ${CMAKE_CURRENT_SOURCE_DIR}/../Container
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/HDFPersist
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/KernelHelpers
+ ${CMAKE_SOURCE_DIR}/src/Utils
+ ${CMAKE_SOURCE_DIR}/src/DF
+ ${CMAKE_SOURCE_DIR}/src/SALOMEDSImpl
+ ${CMAKE_SOURCE_DIR}/src/NamingService
+ ${CMAKE_SOURCE_DIR}/src/GenericObj
+ ${CMAKE_SOURCE_DIR}/src/SALOMEDSClient
+ ${CMAKE_SOURCE_DIR}/src/LifeCycleCORBA
+ ${CMAKE_SOURCE_DIR}/src/TOOLSDS
+ ${CMAKE_SOURCE_DIR}/src/Container
)
ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS})
ADD_DEFINITIONS(-DNOGDI)
ENDIF(WIN32)
-SET(COMMON_LIBS
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${HDF5_C_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
TOOLSDS
SalomeNS
OpUtil
SalomeLifeCycleCORBA
SalomeIDLKernel
SalomeDSClient
- ${HDF5_C_LIBRARIES}
)
SET(SalomeDS_SOURCES
SALOMEDS_IParameters.cxx
)
-
ADD_LIBRARY(SalomeDS ${SalomeDS_SOURCES})
-TARGET_LINK_LIBRARIES(SalomeDS ${COMMON_LIBS})
+TARGET_LINK_LIBRARIES(SalomeDS ${_link_LIBRARIES})
INSTALL(TARGETS SalomeDS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(SALOMEDS_Server SALOMEDS_Server.cxx)
-TARGET_LINK_LIBRARIES(SALOMEDS_Server SalomeDS SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
-
-ADD_EXECUTABLE(SALOMEDS_Client SALOMEDS_Client.cxx)
-TARGET_LINK_LIBRARIES(SALOMEDS_Client SalomeDS SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
+TARGET_LINK_LIBRARIES(SALOMEDS_Server SalomeDS SALOMEBasics ${_link_LIBRARIES})
+INSTALL(TARGETS SALOMEDS_Server EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
-INSTALL(TARGETS SALOMEDS_Server SALOMEDS_Client
- EXPORT ${PROJECT_NAME}TargetGroup
- DESTINATION ${SALOME_INSTALL_BINS})
+IF(SALOME_BUILD_TESTS)
+ ADD_EXECUTABLE(SALOMEDS_Client SALOMEDS_Client.cxx)
+ TARGET_LINK_LIBRARIES(SALOMEDS_Client SalomeDS SALOMEBasics ${_link_LIBRARIES})
+ INSTALL(TARGETS SALOMEDS_Client DESTINATION ${SALOME_INSTALL_BINS})
+ENDIF()
-# Executable scripts to be installed
SALOME_INSTALL_SCRIPTS(SALOME_DriverPy.py ${SALOME_INSTALL_SCRIPT_PYTHON})
-SET(COMMON_HEADERS_HXX
+SET(SALOMEDS_HEADERS
SALOMEDS_Driver_i.hxx
SALOMEDS_Study_i.hxx
SALOMEDS_Study.hxx
SALOMEDS_wrap.hxx
SALOMEDS_Attributes_wrap.hxx
)
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+INSTALL(FILES ${SALOMEDS_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+UNSET(SalomeDS_SOURCES)
+UNSET(SALOMEDS_HEADERS)
+UNSET(_link_LIBRARIES)
+
+IF(SALOME_BUILD_TESTS)
+ ADD_SUBDIRECTORY(Test)
+ENDIF()
${OMNIORB_INCLUDE_DIR}
${Boost_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
- ${PROJECT_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_CURRENT_SOURCE_DIR}/../../GenericObj
- ${PROJECT_BINARY_DIR}/idl
+ ${HDF5_INCLUDE_DIRS}
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/SALOMETraceCollector
+ ${CMAKE_SOURCE_DIR}/src/NamingService
+ ${CMAKE_SOURCE_DIR}/src/Utils
+ ${CMAKE_SOURCE_DIR}/src/ResourcesManager
+ ${CMAKE_SOURCE_DIR}/src/LifeCycleCORBA
+ ${CMAKE_SOURCE_DIR}/src/SALOMEDS
+ ${CMAKE_SOURCE_DIR}/src/SALOMEDSClient
+ ${CMAKE_SOURCE_DIR}/src/DF
+ ${CMAKE_SOURCE_DIR}/src/SALOMEDSImpl
+ ${CMAKE_SOURCE_DIR}/src/GenericObj
)
-# This local variable defines the list of dependent libraries common to all target in this package.
-SET(COMMON_LIBS
- ${CPPUNIT_LIBRARIES}
- SALOMEBasics
- SalomeResourcesManager
- SalomeContainer
- SalomeNS
- Registry
- SalomeNotification
- UtilsTest
- OpUtil
- SALOMELocalTraceTest
- SALOMELocalTrace
- SALOMETraceCollectorTest
- SALOMEDSImplTest
- DF
- SalomeDSImpl
- SalomeDSClient
- SalomeDS
- SalomeGenericObj
- SalomeIDLKernel
-)
-
-ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS})
-SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/SALOMEDS)
-
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS})
IF(WIN32)
ADD_DEFINITIONS(-DNOGDI)
ENDIF(WIN32)
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${HDF5_C_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ ${CPPUNIT_LIBRARIES}
+ SALOMEBasics
+ SalomeResourcesManager
+ SalomeContainer
+ SalomeNS
+ Registry
+ SalomeNotification
+ OpUtil
+ SALOMELocalTrace
+ DF
+ SalomeDSImpl
+ SalomeDSClient
+ SalomeDS
+ SalomeGenericObj
+ SalomeIDLKernel
+)
+
+SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/SALOMEDS)
+
ADD_LIBRARY(SALOMEDSTest SALOMEDSTest.cxx)
-TARGET_LINK_LIBRARIES(SALOMEDSTest ${COMMON_LIBS})
+TARGET_LINK_LIBRARIES(SALOMEDSTest ${_link_LIBRARIES})
INSTALL(TARGETS SALOMEDSTest DESTINATION ${KERNEL_TEST_LIB})
ADD_EXECUTABLE(TestSALOMEDS TestSALOMEDS.cxx)
-TARGET_LINK_LIBRARIES(TestSALOMEDS SALOMEDSTest SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
+TARGET_LINK_LIBRARIES(TestSALOMEDS ${_link_LIBRARIES} SALOMEDSTest)
INSTALL(TARGETS TestSALOMEDS DESTINATION ${LOCAL_TEST_DIR})
-# Executable scripts to be installed
INSTALL(FILES TestSALOMEDS.py DESTINATION ${LOCAL_TEST_DIR})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${LOCAL_TEST_DIR})
-
INSTALL(FILES CTestTestfileInstall.cmake
DESTINATION ${LOCAL_TEST_DIR}
- RENAME CTestTestfile.cmake)
\ No newline at end of file
+ RENAME CTestTestfile.cmake)
+
+UNSET(LOCAL_TEST_DIR)
+UNSET(_link_LIBRARIES)
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// --- include all SALOMEDS Test from basics until the present directory
-//
-#include "SALOMELocalTraceTest.hxx"
-#include "SALOMEDSImplTest.hxx"
#include "SALOMEDSTest.hxx"
// --- Registers the fixture into the 'registry'
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR}
${Boost_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
)
-ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS})
+
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ SalomeIDLKernel
+)
+
+SET(SalomeDSClient_HEADERS
+ SALOMEDSClient_AttributeComment.hxx
+ SALOMEDSClient_AttributeDrawable.hxx
+ SALOMEDSClient_AttributeExpandable.hxx
+ SALOMEDSClient_AttributeExternalFileDef.hxx
+ SALOMEDSClient_AttributeFileType.hxx
+ SALOMEDSClient_AttributeFlags.hxx
+ SALOMEDSClient_AttributeGraphic.hxx
+ SALOMEDSClient_AttributeInteger.hxx
+ SALOMEDSClient_AttributeIOR.hxx
+ SALOMEDSClient_AttributeLocalID.hxx
+ SALOMEDSClient_AttributeName.hxx
+ SALOMEDSClient_AttributeOpened.hxx
+ SALOMEDSClient_AttributeParameter.hxx
+ SALOMEDSClient_AttributePersistentRef.hxx
+ SALOMEDSClient_AttributePixMap.hxx
+ SALOMEDSClient_AttributePythonObject.hxx
+ SALOMEDSClient_AttributeReal.hxx
+ SALOMEDSClient_AttributeSelectable.hxx
+ SALOMEDSClient_AttributeSequenceOfInteger.hxx
+ SALOMEDSClient_AttributeSequenceOfReal.hxx
+ SALOMEDSClient_AttributeString.hxx
+ SALOMEDSClient_AttributeStudyProperties.hxx
+ SALOMEDSClient_AttributeTable.hxx
+ SALOMEDSClient_AttributeTableOfInteger.hxx
+ SALOMEDSClient_AttributeTableOfReal.hxx
+ SALOMEDSClient_AttributeTableOfString.hxx
+ SALOMEDSClient_AttributeTarget.hxx
+ SALOMEDSClient_AttributeTextColor.hxx
+ SALOMEDSClient_AttributeTextHighlightColor.hxx
+ SALOMEDSClient_AttributeTreeNode.hxx
+ SALOMEDSClient_AttributeUserID.hxx
+ SALOMEDSClient_ChildIterator.hxx
+ SALOMEDSClient_ClientFactory.hxx
+ SALOMEDSClient_definitions.hxx
+ SALOMEDSClient_GenericAttribute.hxx
+ SALOMEDSClient.hxx
+ SALOMEDSClient_IParameters.hxx
+ SALOMEDSClient_Observer.hxx
+ SALOMEDSClient_SComponent.hxx
+ SALOMEDSClient_SComponentIterator.hxx
+ SALOMEDSClient_SObject.hxx
+ SALOMEDSClient_StudyBuilder.hxx
+ SALOMEDSClient_Study.hxx
+ SALOMEDSClient_UseCaseBuilder.hxx
+ SALOMEDSClient_UseCaseIterator.hxx
+)
ADD_LIBRARY(SalomeDSClient SALOMEDSClient_ClientFactory.cxx)
-TARGET_LINK_LIBRARIES(SalomeDSClient SalomeIDLKernel ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(SalomeDSClient ${_link_LIBRARIES})
INSTALL(TARGETS SalomeDSClient EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${SalomeDSClient_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+UNSET(SalomeDSClient_HEADERS)
+UNSET(_link_LIBRARIES)
${PTHREAD_INCLUDE_DIR}
${HDF5_INCLUDE_DIRS}
${Boost_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../HDFPersist
- ${CMAKE_CURRENT_SOURCE_DIR}/../DF
- ${PROJECT_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/HDFPersist
+ ${CMAKE_SOURCE_DIR}/src/DF
)
-# This local variable defines the list of FLAGS common to all target in this package.
-ADD_DEFINITIONS(${BOOST_DEFINITIONS})
-# This local variable defines the list of dependent libraries common to all target in this package.
-SET(COMMON_LIBS
+ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS})
+
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${HDF5_C_LIBRARIES}
SALOMEBasics
+ SALOMELocalTrace
SalomeHDFPersist
DF
- ${HDF5_C_LIBRARIES}
)
SET(SalomeDSImpl_SOURCES
SALOMEDSImpl_ScalarVariable.cxx
)
+SET(SalomeDSImpl_HEADERS
+ 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_AttributeParameter.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_AttributeString.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_Callback.hxx
+ SALOMEDSImpl_ChildIterator.hxx
+ SALOMEDSImpl_ChildNodeIterator.hxx
+ SALOMEDSImpl_Defines.hxx
+ SALOMEDSImpl_Driver.hxx
+ SALOMEDSImpl_GenericAttribute.hxx
+ SALOMEDSImpl_GenericVariable.hxx
+ SALOMEDSImpl_IParameters.hxx
+ SALOMEDSImpl_ScalarVariable.hxx
+ SALOMEDSImpl_SComponent.hxx
+ SALOMEDSImpl_SComponentIterator.hxx
+ SALOMEDSImpl_SObject.hxx
+ SALOMEDSImpl_StudyBuilder.hxx
+ SALOMEDSImpl_Study.hxx
+ SALOMEDSImpl_TMPFile.hxx
+ SALOMEDSImpl_UseCaseBuilder.hxx
+ SALOMEDSImpl_UseCaseIterator.hxx
+)
+# SALOMEDSImpl_Tool.hxx
+# SALOMEDSImpl_StudyHandle.hxx
+
ADD_LIBRARY(SalomeDSImpl ${SalomeDSImpl_SOURCES})
-TARGET_LINK_LIBRARIES(SalomeDSImpl SALOMELocalTrace ${COMMON_LIBS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(SalomeDSImpl ${_link_LIBRARIES})
INSTALL(TARGETS SalomeDSImpl EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-ADD_EXECUTABLE(testDS testDS.cxx)
-TARGET_LINK_LIBRARIES(testDS SalomeDSImpl ${COMMON_LIBS} ${PLATFORM_LIBS})
-INSTALL(TARGETS testDS DESTINATION ${SALOME_INSTALL_BINS})
+IF(SALOME_BUILD_TESTS)
+ ADD_EXECUTABLE(testDS testDS.cxx)
+ TARGET_LINK_LIBRARIES(testDS ${_link_LIBRARIES} SalomeDSImpl)
+ INSTALL(TARGETS testDS DESTINATION ${SALOME_INSTALL_BINS})
+ENDIF()
-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 ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${SalomeDSImpl_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+UNSET(_link_LIBRARIES)
+UNSET(SalomeDSImpl_SOURCES)
+UNSET(SalomeDSImpl_HEADERS)
+
+IF(SALOME_BUILD_TESTS)
+ ADD_SUBDIRECTORY(Test)
+ENDIF()
INCLUDE_DIRECTORIES(
${CPPUNIT_INCLUDE_DIRS}
${Boost_INCLUDE_DIR}
- ${OMNIORB_INCLUDE_DIR}
+ ${HDF5_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
- ${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
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/Basics/Test
+ ${CMAKE_SOURCE_DIR}/src/DF
+ ${CMAKE_SOURCE_DIR}/src/SALOMEDSImpl
+ ${CMAKE_BINARY_DIR}/idl
)
-# This local variable defines the list of dependent libraries common to all target in this package.
-SET(COMMON_LIBS
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${BOOST_DEFINITIONS})
+
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${HDF5_C_LIBRARIES}
${CPPUNIT_LIBRARIES}
SALOMEBasics
- SalomeResourcesManager
- SalomeContainer
- SalomeNS
- Registry
- SalomeNotification
- UtilsTest
- OpUtil
- SALOMELocalTraceTest
SALOMELocalTrace
- SALOMETraceCollectorTest
+ SalomeHDFPersist
DF
SalomeDSImpl
- SalomeHDFPersist
- SalomeIDLKernel
)
-ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS})
SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/SALOMEDSImpl)
ADD_LIBRARY(SALOMEDSImplTest SALOMEDSImplTest.cxx)
-TARGET_LINK_LIBRARIES(SALOMEDSImplTest ${COMMON_LIBS})
+TARGET_LINK_LIBRARIES(SALOMEDSImplTest ${_link_LIBRARIES})
INSTALL(TARGETS SALOMEDSImplTest DESTINATION ${KERNEL_TEST_LIB})
ADD_EXECUTABLE(TestSALOMEDSImpl TestSALOMEDSImpl.cxx)
-TARGET_LINK_LIBRARIES(TestSALOMEDSImpl SALOMEDSImplTest SalomeDSImpl NamingServiceTest ${COMMON_LIBS})
+TARGET_LINK_LIBRARIES(TestSALOMEDSImpl ${_link_LIBRARIES} SALOMEDSImplTest)
INSTALL(TARGETS TestSALOMEDSImpl DESTINATION ${LOCAL_TEST_DIR})
-# Executable scripts to be installed
INSTALL(FILES TestSALOMEDSImpl.py DESTINATION ${LOCAL_TEST_DIR})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${LOCAL_TEST_DIR})
-
INSTALL(FILES CTestTestfileInstall.cmake
DESTINATION ${LOCAL_TEST_DIR}
- RENAME CTestTestfile.cmake)
\ No newline at end of file
+ RENAME CTestTestfile.cmake)
+
+UNSET(_link_LIBRARIES)
+UNSET(LOCAL_TEST_DIR)
#include <string>
#include <vector>
#include <cstdlib>
-#include "utilities.h"
#include "SALOMEDSImpl_AttributeParameter.hxx"
#include "SALOMEDSImpl_Study.hxx"
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${PTHREAD_INCLUDE_DIR}
+ ${CMAKE_SOURCE_DIR}/src/Basics
)
-SET(COMMON_HEADERS
- utilities.h
- LocalTraceBufferPool.hxx
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ SALOMEBasics
+)
+
+SET(SALOMELocalTrace_HEADERS
BaseTraceCollector.hxx
+ LocalTraceBufferPool.hxx
SALOME_LocalTrace.hxx
+ utilities.h
)
SET(SALOMELocalTrace_SOURCES
BaseTraceCollector.cxx
- BaseTraceCollector.hxx
- LocalTraceCollector.cxx
- LocalTraceCollector.hxx
FileTraceCollector.cxx
- FileTraceCollector.hxx
LocalTraceBufferPool.cxx
- LocalTraceBufferPool.hxx
- SALOME_LocalTrace.hxx
+ LocalTraceCollector.cxx
)
ADD_LIBRARY(SALOMELocalTrace ${SALOMELocalTrace_SOURCES})
-TARGET_LINK_LIBRARIES(SALOMELocalTrace SALOMEBasics ${PLATFORM_LIBS} ${PTHREAD_LIBRARIES})
+TARGET_LINK_LIBRARIES(SALOMELocalTrace ${_link_LIBRARIES})
INSTALL(TARGETS SALOMELocalTrace EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${SALOMELocalTrace_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+UNSET(SALOMELocalTrace_SOURCES)
+UNSET(SALOMELocalTrace_HEADERS)
+UNSET(_link_LIBRARIES)
+
+IF(SALOME_BUILD_TESTS)
+ ADD_SUBDIRECTORY(Test)
+ENDIF()
#include <dispatch/dispatch.h>
#endif
#include "BaseTraceCollector.hxx"
-#include "BasicsGenericDestructor.hxx"
+#include "Basics_GenericDestructor.hxx"
#define BRIEF_MESS 2
#define ABORT_MESS 1 // for traceType field in struct LocalTrace_TraceInfo
#
INCLUDE_DIRECTORIES(
- ${CPPUNIT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace
+ ${CPPUNIT_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/Basics/Test
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
)
ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS})
+
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${CPPUNIT_LIBRARIES}
+ SALOMELocalTrace
+)
+
SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/SALOMELocalTrace)
ADD_LIBRARY(SALOMELocalTraceTest SALOMELocalTraceTest.cxx)
-TARGET_LINK_LIBRARIES(SALOMELocalTraceTest SALOMELocalTrace ${CPPUNIT_LIBRARIES} ${PTHREAD_LIBRARIES} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(SALOMELocalTraceTest ${_link_LIBRARIES})
INSTALL(TARGETS SALOMELocalTraceTest DESTINATION ${KERNEL_TEST_LIB})
ADD_EXECUTABLE(TestSALOMELocalTrace TestSALOMELocalTrace.cxx)
-TARGET_LINK_LIBRARIES(TestSALOMELocalTrace SALOMELocalTraceTest SALOMELocalTrace SALOMEBasics ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(TestSALOMELocalTrace ${_link_LIBRARIES} SALOMELocalTraceTest)
INSTALL(TARGETS TestSALOMELocalTrace DESTINATION ${LOCAL_TEST_DIR})
-# Executable scripts to be installed
INSTALL(FILES TestSALOMELocalTrace.py DESTINATION ${LOCAL_TEST_DIR})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${LOCAL_TEST_DIR})
-
INSTALL(FILES CTestTestfileInstall.cmake
DESTINATION ${LOCAL_TEST_DIR}
- RENAME CTestTestfile.cmake)
\ No newline at end of file
+ RENAME CTestTestfile.cmake)
+
+UNSET(LOCAL_TEST_DIR)
+UNSET(_link_LIBRARIES)
import sys, signal,string,subprocess
import subprocess
-import runSalome
import setenv
# get SALOME environment :
${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
- ${PROJECT_BINARY_DIR}/idl
- ${PROJECT_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../Launcher
- ${CMAKE_CURRENT_SOURCE_DIR}/../Container
- ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_SOURCE_DIR}/src/Utils
+ ${CMAKE_SOURCE_DIR}/src/NamingService
+ ${CMAKE_SOURCE_DIR}/src/Launcher
+ ${CMAKE_SOURCE_DIR}/src/Container
+ ${CMAKE_SOURCE_DIR}/src/ResourcesManager
)
-ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${PYTHON_DEFINITIONS})
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
-SET(COMMON_LIBS SalomeNS SalomeContainer SalomeIDLKernel ${OMNIORB_LIBRARIES} ${PYTHON_LIBRARIES})
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ ${PYTHON_LIBRARIES}
+ SalomeNS
+ SalomeContainer
+ SalomeIDLKernel
+)
SET(SalomeSDS_SOURCES
SALOMESDS_Exception.cxx
SALOMESDS_Transaction.cxx
SALOMESDS_KeyWaiter.cxx
SALOMESDS_Sha1Keeper.cxx
- )
+)
ADD_LIBRARY(SalomeSDS ${SalomeSDS_SOURCES})
-TARGET_LINK_LIBRARIES(SalomeSDS ${COMMON_LIBS} ${PTHREAD_LIBRARIES})
+TARGET_LINK_LIBRARIES(SalomeSDS ${_link_LIBRARIES})
INSTALL(TARGETS SalomeSDS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(SALOME_DataScopeServer SALOME_DataScopeServer.cxx)
-TARGET_LINK_LIBRARIES(SALOME_DataScopeServer SalomeSDS)
-INSTALL(TARGETS SALOME_DataScopeServer DESTINATION ${SALOME_INSTALL_BINS})
+TARGET_LINK_LIBRARIES(SALOME_DataScopeServer ${_link_LIBRARIES} SalomeSDS)
+INSTALL(TARGETS SALOME_DataScopeServer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
+
INSTALL(FILES SalomeSDSClt.py SALOMEWrappedStdType.py DESTINATION ${SALOME_INSTALL_BINS})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
-# tests part
-SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/SALOMESDS)
-INSTALL(FILES TestSalomeSDS.py TestSalomeSDSHelper0.py DESTINATION ${LOCAL_TEST_DIR})
-INSTALL(FILES CTestTestfileInstall.cmake DESTINATION ${LOCAL_TEST_DIR} RENAME CTestTestfile.cmake)
+
+SET(SalomeSDS_HEADERS
+ SALOMESDS_Auto.hxx
+ SALOMESDS_AutoRefCountPtr.hxx
+ SALOMESDS_BasicDataServer.hxx
+ SALOMESDS_DataScopeServer.hxx
+ SALOMESDS_DataServerManager.hxx
+ SALOMESDS_Defines.hxx
+ SALOMESDS_Exception.hxx
+ SALOMESDS_KeyWaiter.hxx
+ SALOMESDS_PickelizedPyObjRdExtInitServer.hxx
+ SALOMESDS_PickelizedPyObjRdExtServer.hxx
+ SALOMESDS_PickelizedPyObjRdOnlyServer.hxx
+ SALOMESDS_PickelizedPyObjRdWrServer.hxx
+ SALOMESDS_PickelizedPyObjServer.hxx
+ SALOMESDS_RefCountServ.hxx
+ SALOMESDS_RequestSwitcher.hxx
+ SALOMESDS_Sha1Keeper.hxx
+ SALOMESDS_Transaction.hxx
+ SALOMESDS_TrustTransaction.hxx
+)
+
+INSTALL(FILES ${SalomeSDS_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+IF(SALOME_BUILD_TESTS)
+ SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/SALOMESDS)
+ INSTALL(FILES TestSalomeSDS.py TestSalomeSDSHelper0.py DESTINATION ${LOCAL_TEST_DIR})
+ INSTALL(FILES CTestTestfileInstall.cmake DESTINATION ${LOCAL_TEST_DIR} RENAME CTestTestfile.cmake)
+ENDIF()
+
+UNSET(LOCAL_TEST_DIR)
+UNSET(SalomeSDS_SOURCES)
+UNSET(SalomeSDS_HEADERS)
+UNSET(_link_LIBRARIES)
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${PROJECT_BINARY_DIR}/idl
)
-ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${PTHREAD_DEFINITIONS})
-ADD_LIBRARY(with_loggerTraceCollector SALOMETraceCollector.cxx TraceCollector_WaitForServerReadiness.cxx)
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
-TARGET_LINK_LIBRARIES(with_loggerTraceCollector SALOMELocalTrace SalomeIDLKernel ${OMNIORB_LIBRARIES} ${PTHREAD_LIBRARIES})
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ SalomeIDLKernel
+ SALOMELocalTrace
+)
+
+SET(TraceCollector_SOURCES
+ SALOMETraceCollector.cxx
+ TraceCollector_WaitForServerReadiness.cxx
+)
+
+SET(TraceCollector_HEADERS
+ SALOMETraceCollector.hxx
+ TraceCollector_WaitForServerReadiness.hxx
+)
+
+ADD_LIBRARY(with_loggerTraceCollector ${TraceCollector_SOURCES})
+TARGET_LINK_LIBRARIES(with_loggerTraceCollector ${_link_LIBRARIES})
INSTALL(TARGETS with_loggerTraceCollector EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${TraceCollector_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+UNSET(TraceCollector_SOURCES)
+UNSET(TraceCollector_HEADERS)
+UNSET(_link_LIBRARIES)
+
+IF(SALOME_BUILD_TESTS)
+ ADD_SUBDIRECTORY(Test)
+ENDIF()
#
INCLUDE_DIRECTORIES(
- ${CPPUNIT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
- ${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
+ ${CPPUNIT_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/Basics/Test
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace/Test
+ ${CMAKE_SOURCE_DIR}/src/SALOMETraceCollector
)
-SET(COMMON_LIBS
- SALOMELocalTraceTest
- SALOMELocalTrace
- SALOMEBasics
- ${PTHREAD_LIBRARIES}
+SET(_link_LIBRARIES
${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
${CPPUNIT_LIBRARIES}
+ SALOMELocalTrace
+ SALOMEBasics
+)
+
+SET(_exe_LIBRARIES
+ ${_link_LIBRARIES}
+ SALOMELocalTraceTest
)
ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS})
+
SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/SALOMETraceCollector)
ADD_LIBRARY(SALOMETraceCollectorTest SALOMETraceCollectorTest.cxx)
-TARGET_LINK_LIBRARIES(SALOMETraceCollectorTest ${COMMON_LIBS})
+TARGET_LINK_LIBRARIES(SALOMETraceCollectorTest ${_link_LIBRARIES})
INSTALL(TARGETS SALOMETraceCollectorTest DESTINATION ${KERNEL_TEST_LIB})
ADD_EXECUTABLE(TestSALOMETraceCollector TestSALOMETraceCollector.cxx)
-TARGET_LINK_LIBRARIES(TestSALOMETraceCollector SALOMETraceCollectorTest ${COMMON_LIBS})
+TARGET_LINK_LIBRARIES(TestSALOMETraceCollector ${_exe_LIBRARIES} SALOMETraceCollectorTest)
INSTALL(TARGETS TestSALOMETraceCollector DESTINATION ${LOCAL_TEST_DIR})
-# Executable scripts to be installed
INSTALL(PROGRAMS TestSALOMETraceCollector.py DESTINATION ${LOCAL_TEST_DIR})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${LOCAL_TEST_DIR})
-
INSTALL(FILES CTestTestfileInstall.cmake
DESTINATION ${LOCAL_TEST_DIR}
RENAME CTestTestfile.cmake)
+
+UNSET(LOCAL_TEST_DIR)
+UNSET(_link_LIBRARIES)
+UNSET(_exe_LIBRARIES)
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR}
- ${HDF5_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
- ${Boost_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/Basics
+)
+
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ SALOMEBasics
+ SalomeIDLKernel
)
ADD_LIBRARY(TOOLSDS SALOMEDS_Tool.cxx)
-ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS})
-TARGET_LINK_LIBRARIES(TOOLSDS OpUtil SalomeIDLKernel ${OMNIORB_LIBRARIES})
+TARGET_LINK_LIBRARIES(TOOLSDS ${_link_LIBRARIES})
INSTALL(TARGETS TOOLSDS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES SALOMEDS_Tool.hxx DESTINATION ${SALOME_INSTALL_HEADERS})
+
+UNSET(_link_LIBRARIES)
//
#include "SALOMEDS_Tool.hxx"
-#include "utilities.h"
#include "Basics_DirUtils.hxx"
#include "Basics_Utils.hxx"
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIR}
${OMNIORB_INCLUDE_DIR}
- ${PROJECT_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
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/NamingService
+ ${CMAKE_SOURCE_DIR}/src/Utils
+ ${CMAKE_SOURCE_DIR}/src/Registry
+ ${CMAKE_SOURCE_DIR}/src/Notification
+ ${CMAKE_SOURCE_DIR}/src/ResourcesManager
+ ${CMAKE_SOURCE_DIR}/src/Container
+ ${CMAKE_SOURCE_DIR}/src/GenericObj
)
-SET(SalomeTestComponentEngine_SOURCES
- SALOME_TestComponent.hxx
- SALOME_TestComponent_i.cxx
- SALOME_TestComponent_i.hxx
-)
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
-SET(COMMON_LIBS
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
SalomeContainer
Registry
SalomeNotification
SalomeIDLKernel
)
-ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+SET(SalomeTestComponentEngine_SOURCES
+ SALOME_TestComponent.hxx
+ SALOME_TestComponent_i.cxx
+ SALOME_TestComponent_i.hxx
+)
ADD_LIBRARY(SalomeTestComponentEngine ${SalomeTestComponentEngine_SOURCES})
-TARGET_LINK_LIBRARIES(SalomeTestComponentEngine ${COMMON_LIBS})
-
-INSTALL(TARGETS SalomeTestComponentEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+TARGET_LINK_LIBRARIES(SalomeTestComponentEngine ${_link_LIBRARIES})
+INSTALL(TARGETS SalomeTestComponentEngine DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(TestLogger TestLogger.cxx)
-TARGET_LINK_LIBRARIES(TestLogger SalomeTestComponentEngine SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
+TARGET_LINK_LIBRARIES(TestLogger ${_link_LIBRARIES} SalomeTestComponentEngine)
ADD_EXECUTABLE(TestContainer TestContainer.cxx)
-TARGET_LINK_LIBRARIES(TestContainer SalomeTestComponentEngine SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
+TARGET_LINK_LIBRARIES(TestContainer ${_link_LIBRARIES} SalomeTestComponentEngine)
-INSTALL(TARGETS TestLogger TestContainer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(TARGETS TestLogger TestContainer DESTINATION ${SALOME_INSTALL_BINS})
-# Executable scripts to be installed
SET(SCRIPTS
SALOME_TestComponentPy.py
TestComponentPy.py
TestLogger.py
)
+
SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON})
+
+UNSET(SCRIPTS)
+UNSET(SalomeTestComponentEngine_SOURCES)
+UNSET(_link_LIBRARIES)
INCLUDE_DIRECTORIES(
${MPI_CXX_INCLUDE_PATH}
${OMNIORB_INCLUDE_DIR}
- ${PROJECT_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
- ${PROJECT_BINARY_DIR}/idl
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/NamingService
+ ${CMAKE_SOURCE_DIR}/src/Utils
+ ${CMAKE_SOURCE_DIR}/src/Registry
+ ${CMAKE_SOURCE_DIR}/src/Notification
+ ${CMAKE_SOURCE_DIR}/src/ResourcesManager
+ ${CMAKE_SOURCE_DIR}/src/Container
+ ${CMAKE_SOURCE_DIR}/src/MPIContainer
+ ${CMAKE_SOURCE_DIR}/src/GenericObj
)
ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${MPI_DEFINITIONS})
-SET(COMMON_LIBS
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ ${MPI_CXX_LIBRARIES}
Registry
SalomeNotification
SalomeResourcesManager
SalomeMPIContainer
SalomeGenericObj
SalomeIDLKernel
- ${OMNIORB_LIBRARIES}
)
ADD_LIBRARY(SalomeTestMPIComponentEngine TestMPIComponentEngine.cxx)
-TARGET_LINK_LIBRARIES(SalomeTestMPIComponentEngine ${COMMON_LIBS})
+TARGET_LINK_LIBRARIES(SalomeTestMPIComponentEngine ${_link_LIBRARIES})
INSTALL(TARGETS SalomeTestMPIComponentEngine DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(TestMPIContainer TestMPIContainer.cxx)
-TARGET_LINK_LIBRARIES(TestMPIContainer SalomeTestMPIComponentEngine ${COMMON_LIBS} ${MPI_CXX_LIBRARIES})
+TARGET_LINK_LIBRARIES(TestMPIContainer ${_link_LIBRARIES} SalomeTestMPIComponentEngine)
INSTALL(TARGETS TestMPIContainer DESTINATION ${SALOME_INSTALL_BINS})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+UNSET(_link_LIBRARIES)
INCLUDE_DIRECTORIES(
${CPPUNIT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
- ${PROJECT_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_BINARY_DIR}/salome_adm
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/Basics/Test
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace/Test
)
-# ===============================================================
-# Files to be installed
-# ===============================================================
-
-# Executable scripts to be installed
-SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/UnitTests)
-INSTALL(PROGRAMS UnitTests.py DESTINATION ${LOCAL_TEST_DIR})
-
-# ===============================================================
-# Executables targets
-# ===============================================================
-
ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS})
-SET(COMMON_LIBS
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
${CPPUNIT_LIBRARIES}
SALOMEBasics
SALOMELocalTrace
IF(NOT SALOME_LIGHT_ONLY)
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR}
- ${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
- ${PROJECT_BINARY_DIR}/idl
- ${CMAKE_CURRENT_SOURCE_DIR}/../Registry
- ${CMAKE_CURRENT_SOURCE_DIR}/../Notification
- ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager
+ ${CMAKE_BINARY_DIR}/idl
+ ${CMAKE_SOURCE_DIR}/src/SALOMETraceCollector
+ ${CMAKE_SOURCE_DIR}/src/SALOMETraceCollector/Test
+ ${CMAKE_SOURCE_DIR}/src/NamingService
+ ${CMAKE_SOURCE_DIR}/src/NamingService/Test
+ ${CMAKE_SOURCE_DIR}/src/Utils
+ ${CMAKE_SOURCE_DIR}/src/Utils/Test
+ ${CMAKE_SOURCE_DIR}/src/LifeCycleCORBA
+ ${CMAKE_SOURCE_DIR}/src/LifeCycleCORBA/Test
+ ${CMAKE_SOURCE_DIR}/src/SALOMDESImpl
+ ${CMAKE_SOURCE_DIR}/src/SALOMEDSImpl/Test
+ ${CMAKE_SOURCE_DIR}/src/SALOMDES
+ ${CMAKE_SOURCE_DIR}/src/SALOMEDS/Test
+ ${CMAKE_SOURCE_DIR}/src/Registry
+ ${CMAKE_SOURCE_DIR}/src/Notification
+ ${CMAKE_SOURCE_DIR}/src/ResourcesManager
)
ADD_DEFINITIONS(-DWITH_CORBA ${OMNIORB_DEFINITIONS})
- SET(COMMON_LIBS
- ${COMMON_LIBS}
+ LIST(APPEND _link_LIBRARIES
+ ${OMNIORB_LIBRARIES}
Registry
SalomeNotification
SalomeResourcesManager
SalomeDS
SALOMEDSTest
SalomeIDLKernel
- ${OMNIORB_LIBRARIES}
)
ENDIF()
+SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/UnitTests)
+
ADD_EXECUTABLE(UnitTests UnitTests.cxx)
-TARGET_LINK_LIBRARIES(UnitTests ${COMMON_LIBS})
+TARGET_LINK_LIBRARIES(UnitTests ${_link_LIBRARIES})
INSTALL(TARGETS UnitTests DESTINATION ${LOCAL_TEST_DIR})
INSTALL(FILES CTestTestfileInstall.cmake
DESTINATION ${LOCAL_TEST_DIR}
RENAME CTestTestfile.cmake)
+
+INSTALL(PROGRAMS UnitTests.py DESTINATION ${LOCAL_TEST_DIR})
+
+UNSET(_link_LIBRARIES)
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+INCLUDE_DIRECTORIES(${PTHREAD_INCLUDE_DIR})
IF(NOT SALOME_LIGHT_ONLY)
+ INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIR})
+ENDIF()
+INCLUDE_DIRECTORIES(
+ ${CMAKE_BINARY_DIR}/salome_adm
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+)
+IF(NOT SALOME_LIGHT_ONLY)
+ INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/idl)
+ENDIF()
- INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIR}
- ${PTHREAD_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${PROJECT_BINARY_DIR}/idl
- )
- ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${PTHREAD_DEFINITIONS})
- SET(COMMON_LIBS
- SALOMELocalTrace
- SalomeIDLKernel
- ${OMNIORB_LIBRARIES}
- ${PTHREAD_LIBRARIES}
- )
- 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
- )
- FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx" )
-
-ELSE()
+IF(NOT SALOME_LIGHT_ONLY)
+ ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+ENDIF()
- INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIR}
- ${PROJECT_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- )
- SET(COMMON_LIBS
- SALOMELocalTrace
- ${PTHREAD_LIBRARIES}
+SET(_link_LIBRARIES ${PTHREAD_LIBRARIES})
+IF(NOT SALOME_LIGHT_ONLY)
+ SET(_link_LIBRARIES ${_link_LIBRARIES} ${OMNIORB_LIBRARIES})
+ENDIF()
+SET(_link_LIBRARIES ${_link_LIBRARIES} SALOMELocalTrace)
+IF(NOT SALOME_LIGHT_ONLY)
+ SET(_link_LIBRARIES ${_link_LIBRARIES} SalomeIDLKernel)
+ENDIF()
+
+SET(OpUtil_SOURCES
+ Utils_SALOME_Exception.cxx
+ duplicate.cxx
+)
+IF(NOT SALOME_LIGHT_ONLY)
+ SET(OpUtil_SOURCES ${OpUtil_SOURCES}
+ Utils_CommException.cxx
+ Utils_DESTRUCTEUR_GENERIQUE.cxx
+ Utils_ExceptHandlers.cxx
+ Utils_Identity.cxx
+ Utils_Mutex.cxx
+ Utils_ORB_INIT.cxx
+ Utils_Timer.cxx
)
- SET(OpUtil_SOURCES
- Utils_SALOME_Exception.cxx
- duplicate.cxx
- )
- SET(COMMON_HEADERS_HXX Utils_SALOME_Exception.hxx)
-
ENDIF()
-SET(COMMON_SCRIPTS
- Utils_Identity.py
- SALOME_utilities.py
+SET(OpUtil_HEADERS
+ OpUtil.hxx
+ Utils_SALOME_Exception.hxx
)
-SALOME_INSTALL_SCRIPTS("${COMMON_SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON})
+IF(NOT SALOME_LIGHT_ONLY)
+ SET(OpUtil_HEADERS ${OpUtil_HEADERS}
+ SALOME_Utils.hxx
+ Utils_CommException.hxx
+ Utils_CorbaException.hxx
+ Utils_DESTRUCTEUR_GENERIQUE.hxx
+ Utils_ExceptHandlers.hxx
+ Utils_Identity.hxx
+ Utils_Mutex.hxx
+ Utils_ORB_INIT.hxx
+ Utils_SINGLETON.hxx
+ Utils_Timer.hxx
+ )
+ENDIF()
+
+IF(NOT SALOME_LIGHT_ONLY)
+ SET(OpUtil_SCRIPTS
+ Utils_Identity.py
+ SALOME_utilities.py
+ )
+ENDIF()
ADD_LIBRARY(OpUtil ${OpUtil_SOURCES})
-TARGET_LINK_LIBRARIES(OpUtil ${COMMON_LIBS})
+TARGET_LINK_LIBRARIES(OpUtil ${_link_LIBRARIES})
INSTALL(TARGETS OpUtil EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+INSTALL(FILES ${OpUtil_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
+SALOME_INSTALL_SCRIPTS("${OpUtil_SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON})
+
+UNSET(OpUtil_SOURCES)
+UNSET(OpUtil_HEADERS)
+UNSET(OpUtil_SCRIPTS)
+UNSET(_link_LIBRARIES)
+
+IF(SALOME_BUILD_TESTS)
+ ADD_SUBDIRECTORY(Test)
+ENDIF()
INCLUDE_DIRECTORIES(
${PTHREAD_INCLUDE_DIR}
${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
+ ${CMAKE_SOURCE_DIR}/src/Basics
+ ${CMAKE_SOURCE_DIR}/src/Basics/Test
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
+ ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace/Test
+ ${CMAKE_SOURCE_DIR}/src/Utils
)
-SET(COMMON_LIBS
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS})
+
+SET(_link_LIBRARIES
+ ${PLATFORM_LIBS}
+ ${PTHREAD_LIBRARIES}
${CPPUNIT_LIBRARIES}
OpUtil
+)
+
+SET(_exe_LIBRARIES
+ ${_link_LIBRARIES}
SALOMELocalTraceTest
- SALOMELocalTrace
- SALOMETraceCollectorTest
- SALOMEBasics
- ${PLATFORM_LIBS}
)
-ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS})
SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/Utils)
ADD_LIBRARY(UtilsTest UtilsTest.cxx)
-TARGET_LINK_LIBRARIES(UtilsTest ${COMMON_LIBS} )
+TARGET_LINK_LIBRARIES(UtilsTest ${_link_LIBRARIES})
INSTALL(TARGETS UtilsTest DESTINATION ${KERNEL_TEST_LIB})
ADD_EXECUTABLE(TestUtils TestUtils.cxx)
-TARGET_LINK_LIBRARIES(TestUtils ${COMMON_LIBS} UtilsTest ${OMNIORB_LIBRARIES})
+TARGET_LINK_LIBRARIES(TestUtils ${_exe_LIBRARIES} UtilsTest)
INSTALL(TARGETS TestUtils DESTINATION ${LOCAL_TEST_DIR})
INSTALL(FILES TestUtils.py DESTINATION ${LOCAL_TEST_DIR})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${LOCAL_TEST_DIR})
-
INSTALL(FILES CTestTestfileInstall.cmake
DESTINATION ${LOCAL_TEST_DIR}
- RENAME CTestTestfile.cmake)
\ No newline at end of file
+ RENAME CTestTestfile.cmake)
+
+UNSET(_link_LIBRARIES)
+UNSET(_exe_LIBRARIES)
+UNSET(LOCAL_TEST_DIR)
// --- include all Unit Test from basics until the present directory
//
#include "SALOMELocalTraceTest.hxx"
-#include "SALOMETraceCollectorTest.hxx"
#include "UtilsTest.hxx"
// --- Registers the fixture into the 'registry'
CPPUNIT_TEST_SUITE_REGISTRATION( SALOMELocalTraceTest );
-CPPUNIT_TEST_SUITE_REGISTRATION( SALOMETraceCollectorTest );
CPPUNIT_TEST_SUITE_REGISTRATION( UtilsTest );
// --- generic Main program from Basic/Test
import sys, os,signal,string,subprocess
import subprocess
-import runSalome
-import orbmodule
-import TestKiller
import setenv
# get SALOME environment :
args, modules_list, modules_root_dir = setenv.get_config()
setenv.set_env(args, modules_list, modules_root_dir)
-# launch CORBA naming server
-
-clt=orbmodule.client()
-
-# launch CORBA logger server
-
-myServer=runSalome.LoggerServer(args)
-myServer.run()
-clt.waitLogger("Logger")
-
# execute Unit Test
command = ['./TestUtils']
ret = subprocess.call(command)
-# kill Test process
-
-TestKiller.killProcess(runSalome.process_id)
-TestKiller.closeSalome()
+# no process to kill
exit(ret)