]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Clean-up build procedure
authorvsr <vsr@opencascade.com>
Thu, 14 May 2020 15:12:26 +0000 (18:12 +0300)
committervsr <vsr@opencascade.com>
Thu, 21 May 2020 11:13:12 +0000 (14:13 +0300)
104 files changed:
CMakeLists.txt
CTestTestfileInstall.cmake.in
SalomeKERNELConfig.cmake.in
bin/appliskel/CMakeLists.txt
doc/salome/gui/CMakeLists.txt
doc/salome/gui/doxyfile.in
doc/salome/tui/doxyfile.in
idl/CMakeLists.txt
resources/CMakeLists.txt
src/AppQuickStart/CMakeLists.txt
src/AppQuickStart/resources/Anita semi square.ttf [new file with mode: 0644]
src/AppQuickStart/resources/CMakeLists.txt [new file with mode: 0644]
src/AppQuickStart/resources/background.png [new file with mode: 0644]
src/AppQuickStart/ressources/Anita semi square.ttf [deleted file]
src/AppQuickStart/ressources/CMakeLists.txt [deleted file]
src/AppQuickStart/ressources/background.png [deleted file]
src/Basics/BasicsGenericDestructor.cxx [deleted file]
src/Basics/BasicsGenericDestructor.hxx [deleted file]
src/Basics/Basics_DirUtils.hxx
src/Basics/Basics_GenericDestructor.cxx [new file with mode: 0644]
src/Basics/Basics_GenericDestructor.hxx [new file with mode: 0644]
src/Basics/Basics_OCCTVersion.hxx
src/Basics/Basics_Utils.hxx
src/Basics/CMakeLists.txt
src/Basics/SALOME_Basics.hxx
src/Basics/Test/CMakeLists.txt
src/Basics/Test/README [new file with mode: 0644]
src/CMakeLists.txt
src/Communication/CMakeLists.txt
src/Communication_SWIG/CMakeLists.txt
src/Container/CMakeLists.txt
src/DF/CMakeLists.txt
src/DF/CTestTestfileInstall.cmake [new file with mode: 0644]
src/DF/TestDF.py [new file with mode: 0644]
src/DF/testDF.cxx
src/DSC/CMakeLists.txt
src/DSC/DSC_Basic/CMakeLists.txt
src/DSC/DSC_Python/CMakeLists.txt
src/DSC/DSC_User/Basic/CMakeLists.txt
src/DSC/DSC_User/CMakeLists.txt
src/DSC/DSC_User/Datastream/CMakeLists.txt
src/DSC/DSC_User/Datastream/Calcium/CMakeLists.txt
src/DSC/DSC_User/Datastream/Palm/CMakeLists.txt
src/DSC/ParallelDSC/CMakeLists.txt
src/GenericObj/CMakeLists.txt
src/HDFPersist/CMakeLists.txt
src/HDFPersist/test1.c [deleted file]
src/HDFPersist/test2.c [deleted file]
src/HDFPersist/test3.cxx [deleted file]
src/HDFPersist/test4.cxx [deleted file]
src/HDFPersist/test5.cxx [deleted file]
src/HDFPersist/test6.cxx [deleted file]
src/HDFPersist/test7.cxx [deleted file]
src/HDFPersist/test8.cxx [deleted file]
src/HDFPersist/test9.cxx [deleted file]
src/KERNEL_PY/CMakeLists.txt
src/KERNEL_PY/kernel/CMakeLists.txt
src/KERNEL_PY/kernel/parametric/CMakeLists.txt
src/KernelHelpers/CMakeLists.txt
src/KernelHelpers/Test/CMakeLists.txt
src/Launcher/CMakeLists.txt
src/Launcher/Test/CMakeLists.txt
src/Launcher/Test/CTestTestfileInstall.cmake
src/Launcher_SWIG/CMakeLists.txt
src/Launcher_SWIG/Test/CMakeLists.txt
src/LifeCycleCORBA/CMakeLists.txt
src/LifeCycleCORBA/Test/CMakeLists.txt
src/LifeCycleCORBA_SWIG/CMakeLists.txt
src/LifeCycleCORBA_SWIG/Test/CMakeLists.txt
src/Logger/CMakeLists.txt
src/MPIContainer/CMakeLists.txt
src/ModuleCatalog/CMakeLists.txt
src/ModuleCatalog/PathPrefix.hxx [deleted file]
src/NOTIFICATION_SWIG/CMakeLists.txt
src/NamingService/CMakeLists.txt
src/NamingService/SALOME_NamingService.i [deleted file]
src/NamingService/Test/CMakeLists.txt
src/Notification/CMakeLists.txt
src/ParallelContainer/CMakeLists.txt
src/Registry/CMakeLists.txt
src/ResourcesManager/CMakeLists.txt
src/SALOMEDS/CMakeLists.txt
src/SALOMEDS/Test/CMakeLists.txt
src/SALOMEDS/Test/TestSALOMEDS.cxx
src/SALOMEDSClient/CMakeLists.txt
src/SALOMEDSImpl/CMakeLists.txt
src/SALOMEDSImpl/Test/CMakeLists.txt
src/SALOMEDSImpl/Test/SALOMEDSImplTest.cxx
src/SALOMELocalTrace/CMakeLists.txt
src/SALOMELocalTrace/LocalTraceBufferPool.hxx
src/SALOMELocalTrace/Test/CMakeLists.txt
src/SALOMELocalTrace/Test/TestSALOMELocalTrace.py
src/SALOMESDS/CMakeLists.txt
src/SALOMETraceCollector/CMakeLists.txt
src/SALOMETraceCollector/Test/CMakeLists.txt
src/TOOLSDS/CMakeLists.txt
src/TOOLSDS/SALOMEDS_Tool.cxx
src/TestContainer/CMakeLists.txt
src/TestMPIContainer/CMakeLists.txt
src/UnitTests/CMakeLists.txt
src/Utils/CMakeLists.txt
src/Utils/Test/CMakeLists.txt
src/Utils/Test/TestUtils.cxx
src/Utils/Test/TestUtils.py

index 3bd7da09566911775383781fa358e58f1c930355..40451c732f9df5715369c1dda84a117d8b2a3e2b 100755 (executable)
@@ -16,6 +16,7 @@
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
 INCLUDE(CMakeDependentOption)
 
@@ -176,28 +177,32 @@ SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOM
 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})
 
@@ -205,67 +210,10 @@ SALOME_CONFIGURE_FILE(KERNEL_version.h.in KERNEL_version.h INSTALL ${SALOME_INST
 # ====================
 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}")
@@ -275,14 +223,15 @@ SET(OMNIORB_ROOT_DIR "${OMNIORB_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
@@ -290,27 +239,15 @@ CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in
        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
index a926383a1a0097b47a05c3ed51257f874615bfa4..c0721a4c01b2ea13405b16d713f38ad9514e7983 100644 (file)
@@ -38,6 +38,7 @@ SUBDIRS( Launcher
          SALOMEDSImpl
          SALOMESDS
          Utils
+         DF
          UnitTests
          salomeInstance
          salomeCommand
index c01f6fdf9ef8a4849c23f9f51fded1a8e6393538..fe36118e179d243baf540205bdfa4c05d27bf11f 100644 (file)
@@ -148,8 +148,6 @@ SET(SALOME_INSTALL_AMCONFIG_LOCAL "@SALOME_INSTALL_AMCONFIG_LOCAL@") # to be rem
 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)
@@ -164,25 +162,18 @@ SET(KERNEL_SalomeDSClient SalomeDSClient)
 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)
index 82d293832ac620e02dd36e8a3cb9420f39e6d6ad..3506c7d96cfb06b3aaf2a2c50ace05cd20bb894b 100644 (file)
@@ -18,7 +18,9 @@
 #
 
 ADD_SUBDIRECTORY(salome_tester)
-ADD_SUBDIRECTORY(tests)
+IF(SALOME_BUILD_TESTS)
+  ADD_SUBDIRECTORY(tests)
+ENDIF()
 
 # ===============================================================
 # Files to be installed
index 3da0444e6d292ee41a4f5f9d08c90ea342b724c6..8dc4ed8dc9cad5ec0c31ac76199fe555e7f96f2c 100644 (file)
@@ -52,7 +52,7 @@ ADD_CUSTOM_TARGET(usr_docs ${CMAKE_COMMAND} -E make_directory tmp
   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) 
 
index fc5033f5aa7b58135b2913d0eb2904f09e255deb..c34dbae97b79e02f602e35952b002163bdff95f4 100644 (file)
@@ -15,7 +15,7 @@ ABBREVIATE_BRIEF       =
 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
@@ -77,22 +77,22 @@ WARN_LOGFILE           = log.txt
 #---------------------------------------------------------------------------
 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
index 1e4d110b1e2bf562178d7dcd2edca4828e19605c..48e2bb9092f834966feb8961c48bd1254e1e26e1 100644 (file)
@@ -13,7 +13,7 @@ ABBREVIATE_BRIEF       =
 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
@@ -75,17 +75,17 @@ WARN_LOGFILE           = log.txt
 # 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
index fcd45f5000ff4c37f9568d76e3a839b71090edce..47c94683c35bdc268da020fed5993c2669e779a2 100644 (file)
@@ -42,7 +42,6 @@ SET(SalomeIDLKernel_IDLSOURCES
   SALOME_GenericObj.idl
   SALOME_Types.idl
   SALOME_Session.idl
-  nstest.idl
   DSC_Engines.idl
   SALOME_Ports.idl
   SALOME_PyNode.idl
@@ -51,15 +50,28 @@ SET(SalomeIDLKernel_IDLSOURCES
   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
index 03989de7ddb3c9c3a97213a36aec0f9720771f3a..471bd1f27dfe381fd60cf277c88396d43d7c9b1c 100644 (file)
 # 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)
index 6f04b374b9adb23109a61b72d6f4583b7433bef2..991ac37d68cfa5985e49ed0897727317c25c5620 100644 (file)
@@ -17,7 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-ADD_SUBDIRECTORY( ressources ) 
+ADD_SUBDIRECTORY(resources)
 
 # ===============================================================
 # Files to be installed
@@ -30,4 +30,6 @@ SET(SCRIPTS
 
 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)
diff --git a/src/AppQuickStart/resources/Anita semi square.ttf b/src/AppQuickStart/resources/Anita semi square.ttf
new file mode 100644 (file)
index 0000000..17776fd
Binary files /dev/null and b/src/AppQuickStart/resources/Anita semi square.ttf differ
diff --git a/src/AppQuickStart/resources/CMakeLists.txt b/src/AppQuickStart/resources/CMakeLists.txt
new file mode 100644 (file)
index 0000000..254ec8d
--- /dev/null
@@ -0,0 +1,32 @@
+# 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)
diff --git a/src/AppQuickStart/resources/background.png b/src/AppQuickStart/resources/background.png
new file mode 100644 (file)
index 0000000..66627c8
Binary files /dev/null and b/src/AppQuickStart/resources/background.png differ
diff --git a/src/AppQuickStart/ressources/Anita semi square.ttf b/src/AppQuickStart/ressources/Anita semi square.ttf
deleted file mode 100644 (file)
index 17776fd..0000000
Binary files a/src/AppQuickStart/ressources/Anita semi square.ttf and /dev/null differ
diff --git a/src/AppQuickStart/ressources/CMakeLists.txt b/src/AppQuickStart/ressources/CMakeLists.txt
deleted file mode 100644 (file)
index eac8740..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-# 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} )
diff --git a/src/AppQuickStart/ressources/background.png b/src/AppQuickStart/ressources/background.png
deleted file mode 100644 (file)
index 66627c8..0000000
Binary files a/src/AppQuickStart/ressources/background.png and /dev/null differ
diff --git a/src/Basics/BasicsGenericDestructor.cxx b/src/Basics/BasicsGenericDestructor.cxx
deleted file mode 100644 (file)
index e2aa0dc..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-// 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();
-}
diff --git a/src/Basics/BasicsGenericDestructor.hxx b/src/Basics/BasicsGenericDestructor.hxx
deleted file mode 100644 (file)
index f5642a6..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-// 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
index 22b90bf285a4295df1f25c9def3da14c798d6550..29f858091caf8cc851ad255624d517b12ed9fcd3 100644 (file)
 // 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"
 
@@ -75,4 +70,4 @@ namespace Kernel_Utils
   BASICS_EXPORT std::string HomePath();
 }
 
-#endif
+#endif // BASICS_DIRUTILS_HXX
diff --git a/src/Basics/Basics_GenericDestructor.cxx b/src/Basics/Basics_GenericDestructor.cxx
new file mode 100644 (file)
index 0000000..c6a2139
--- /dev/null
@@ -0,0 +1,200 @@
+// 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();
+}
diff --git a/src/Basics/Basics_GenericDestructor.hxx b/src/Basics/Basics_GenericDestructor.hxx
new file mode 100644 (file)
index 0000000..20b69de
--- /dev/null
@@ -0,0 +1,173 @@
+// 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
index bc0bb2682398893be7e15eb53b3eb70fc364e7a2..16d3ef8908970f73f50914f0da0f93db5563ed36 100644 (file)
@@ -20,9 +20,6 @@
 // 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
 
index 2b2d676f4442031668cdd38716b7d85eae98fa47..4c2c750f921324b67e2a841d9f7bc8e4b3f65d3c 100644 (file)
 // 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>
@@ -155,4 +150,4 @@ double ToDouble(const T &arg) {
 #define LOG STDLOG
 
 
-#endif //_Basics_UTILS_HXX_
+#endif // BASICS_UTILS_HXX
index c71e78f94a44102a85c545c1d4b6e21567b91ef1..0bf9a05e1d9bd4b95d5baddd05ea0a29a567c71d 100644 (file)
@@ -21,20 +21,33 @@ INCLUDE_DIRECTORIES(
   ${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)
index 6cfd4b8a5677919834defb9123af5abf829d08bc..85529b63f841af51d37e57b7e0f1b3140a0e8422 100644 (file)
 // 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
index ac88d34c3ae02e6948012c25069210953d3d536c..828a913a17380d2661467762f6d6394331b63fce 100644 (file)
@@ -17,5 +17,4 @@
 # 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})
diff --git a/src/Basics/Test/README b/src/Basics/Test/README
new file mode 100644 (file)
index 0000000..33132bf
--- /dev/null
@@ -0,0 +1,7 @@
+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.
index b8c665211cb0cfa136fab5b54d9adf7d8408f6fe..b7918b631206d72eb0b802ec4008bd0cc04cf114 100644 (file)
 # 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)
index 5bade02c0596b6bb3c7d22617362d39f3bcb8c17..4e2bac008912d866f9604125d9e01109f848408a 100755 (executable)
@@ -21,20 +21,24 @@ INCLUDE_DIRECTORIES(
   ${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
@@ -47,13 +51,11 @@ 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
@@ -66,4 +68,8 @@ SET(COMMON_HEADERS_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)
index 3d244f809b1cb352fa49d7f991ee6abc28df1a55..5baf2182321df5e2b0bd64311f460987e256176f 100644 (file)
 
 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)
index 81de169b948d09f547548b5f8f59dca2160482aa..9b873e8f28dfa0dc40bc8e5b6d8ffe98bffd9e1f 100644 (file)
 #
 
 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
@@ -55,21 +57,12 @@ SET(COMMON_LIBS
   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
@@ -84,27 +77,47 @@ 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)
index c56ef7cfb483ccda4a0c3b8373c8053c5f510b02..66abcfc8002e9f6178b76fc7425ffd8aeecfc17e 100644 (file)
 # 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
@@ -32,12 +28,39 @@ 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)
diff --git a/src/DF/CTestTestfileInstall.cmake b/src/DF/CTestTestfileInstall.cmake
new file mode 100644 (file)
index 0000000..5733a52
--- /dev/null
@@ -0,0 +1,27 @@
+# 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()
diff --git a/src/DF/TestDF.py b/src/DF/TestDF.py
new file mode 100644 (file)
index 0000000..5dff1b2
--- /dev/null
@@ -0,0 +1,40 @@
+#  -*- 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)
index 0811fa5362ceeb7c50968ad47c25ef954408d9f9..081edb73433f4db2f443eedf4f7659f80c57b3f5 100644 (file)
 // 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"
index 816cafe68a866e97250c150b3a207480d517d5e9..016a241a5406b2e48d016ecf7130f8399503f001 100644 (file)
 # 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})
index 877875017d65dc196217a7b1b275fcff513a0b62..808c7c3d211a34f98d3c1ee43c268b09142ea794 100644 (file)
 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
@@ -37,10 +49,8 @@ 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
@@ -48,17 +58,22 @@ 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)
index 863d3fda7ffe22077101c09ce8c263b704358370..9690865c073e7681228d10e11a240a6c45c72f6a 100644 (file)
 # 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)
index 0138bc5bae80cabf2403bbb9ae82f5d07a16ec76..7b490c62318ca388b866d6f80b4c952299984c22 100644 (file)
 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
@@ -37,10 +46,18 @@ SET(SalomeDSCSupervBasic_SOURCES
   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)
index 5a72988cefde2b4400406fce7a7a8567b8077a31..c2a99470a8f453a91a6441b937796fc2a4f09715 100644 (file)
 # 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
@@ -45,12 +52,25 @@ SET(SalomeDSCSuperv_SOURCES
 )
 
 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)
index a76518b92714cc917dac7bf098776277896c541d..0eaf17f4cad7c44eb2cc5989c77c53e4127067bd 100644 (file)
 # 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
@@ -56,4 +57,7 @@ SET(COMMON_HEADERS_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)
index cdc33f677687e23e9c50551451647b205a3f6a4a..7bd155d9a2113d7f9e2c7cf07077016a13807be0 100644 (file)
 #
 
 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
@@ -52,11 +63,8 @@ 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
@@ -64,19 +72,21 @@ 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
@@ -113,4 +123,9 @@ SET(COMMON_HEADERS
   ${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)
index c27b60f2dfb20457fb444a95f844c894d87d4f9d..755b474670fd54131e8cab9609f069f7b8604068 100644 (file)
 #
 
 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)
index 5a2a8e08474dbec09c9dc4c83b790014464083b0..3045fd9f24f470b0754f30c46df77abc7aa1e1ed 100644 (file)
 #
 
 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)
index 3d44bfc0f89e8d43772716430f689975c0ab4add..ec70cf6eed0dc25cb572442f4d9238ad1ed43dcb 100644 (file)
 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)
index 247ccb0268152242792c52ca9e626619e44193f6..f5359900568d75c0777d16b9cf4b5614bc3c5d1b 100644 (file)
 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)
diff --git a/src/HDFPersist/test1.c b/src/HDFPersist/test1.c
deleted file mode 100644 (file)
index 9693a8f..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-// 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;
-}
diff --git a/src/HDFPersist/test2.c b/src/HDFPersist/test2.c
deleted file mode 100644 (file)
index acf6522..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-// 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;
-}
diff --git a/src/HDFPersist/test3.cxx b/src/HDFPersist/test3.cxx
deleted file mode 100644 (file)
index d6d2e4f..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-// 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;
-}
diff --git a/src/HDFPersist/test4.cxx b/src/HDFPersist/test4.cxx
deleted file mode 100644 (file)
index faf090d..0000000
+++ /dev/null
@@ -1,218 +0,0 @@
-// 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;
-}
diff --git a/src/HDFPersist/test5.cxx b/src/HDFPersist/test5.cxx
deleted file mode 100644 (file)
index 8de1048..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-// 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;
-}
diff --git a/src/HDFPersist/test6.cxx b/src/HDFPersist/test6.cxx
deleted file mode 100644 (file)
index 5081002..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-// 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;
-}
diff --git a/src/HDFPersist/test7.cxx b/src/HDFPersist/test7.cxx
deleted file mode 100644 (file)
index e1fac83..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-// 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;
-}
diff --git a/src/HDFPersist/test8.cxx b/src/HDFPersist/test8.cxx
deleted file mode 100644 (file)
index fd461f7..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-// 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;
-}
diff --git a/src/HDFPersist/test9.cxx b/src/HDFPersist/test9.cxx
deleted file mode 100644 (file)
index e380975..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-// 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;
-}
-
index f00b0095c746bae8d3a999ae67e7cd99bd5ebbef..a126d598c76bbbd4cf331b0b00df283fd120ffe3 100644 (file)
@@ -21,25 +21,23 @@ ADD_SUBDIRECTORY(kernel)
 
 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)
index e9097c825879406a9064a741d4d2d8ab001ad2c5..5d01c66af58ddeec7288931923e62d727c675711 100644 (file)
@@ -46,3 +46,5 @@ LIST(APPEND mypkgpython_PYTHON
     ${CMAKE_CURRENT_BINARY_DIR}/logconfig.py
 )
 SALOME_INSTALL_SCRIPTS("${mypkgpython_PYTHON}" ${SALOME_INSTALL_PYTHON}/salome/kernel)
+
+UNSET(mypkgpython_PYTHON)
index a8a4bff35b1d7a8ab0ef38ed8ce912a7dfcfb1bd..56b1d7815c16b7dd5cf6f345d5c8f3f9f7e16536 100644 (file)
@@ -26,3 +26,5 @@ SET(mypkgpython_PYTHON
 
 # Executable scripts to be installed
 SALOME_INSTALL_SCRIPTS("${mypkgpython_PYTHON}" ${SALOME_INSTALL_PYTHON}/salome/kernel/parametric)
+
+UNSET(mypkgpython_PYTHON)
index c5879fc716ac302951019ef7ad1e431ac8691ecc..361bb2c76a2287d800a3fa023668e527c37e7052 100644 (file)
 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
@@ -51,15 +55,28 @@ SET(SalomeKernelHelpers_SOURCES
   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()
index 0beda846004f4303d0fd5592cf538c3867d77dc1..8aed400e0db168ab0e5ae1e1ff59bedc43a32f0f 100644 (file)
@@ -21,24 +21,28 @@ INCLUDE_DIRECTORIES(
   ${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
@@ -50,8 +54,6 @@ SET(SalomeKernelHelpersTest_LIBS
   SalomeIDLKernel
 )
 
-ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS})
-
 SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/KernelHelpers)
 
 ADD_LIBRARY(SalomeKernelHelpersTest KernelHelpersUnitTests.cxx)
@@ -59,16 +61,14 @@ TARGET_LINK_LIBRARIES(SalomeKernelHelpersTest ${SalomeKernelHelpersTest_LIBS})
 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)
index 708836437443cb1d762a4f248afd61ae3209fdd1..ad3c1675740d98de0d2d9502bf079a9c222d572f 100644 (file)
@@ -28,17 +28,17 @@ INCLUDE_DIRECTORIES(
   ${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})
@@ -46,25 +46,6 @@ IF(SALOME_USE_LIBBATCH)
   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
@@ -78,46 +59,65 @@ SET(Launcher_SOURCES
   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
@@ -132,11 +132,16 @@ SET(COMMON_HEADERS_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)
index 1d4e6cd15c8ab9368ff7adbc77d234f5d96302ea..75d39e3858099a92308ff57ac099c170d8a68fa2 100644 (file)
 
 # --- 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)
index aca101e7cdd4268777f52671d5cf1cfad17b72f3..daa22035c9820ba70a3a4a40600f243af05b117b 100644 (file)
 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()
index a98274e97bd9233a66a171e1b46c134c0f9f9ae7..bd3a4315c6531647562525d1f539ef7e86b8dc90 100644 (file)
 
 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)
index 501e8e44133f4cafca01a9561aedc734d7a0df4b..bfffdbbc35bc80fefa451b7195ddb4edbe6995b0 100644 (file)
 # --- 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()
index a89195de98911893a519dbcdee92d10808e05d9e..b9b51862c10185167c34f57b936322567331c74a 100644 (file)
@@ -21,24 +21,30 @@ INCLUDE_DIRECTORIES(
   ${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
@@ -49,21 +55,39 @@ SET(COMMON_LIBS
   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()
index e3e400fbc0a6656de8b25b9984f9058909f3c8f2..da6e1bb6a63318dcc8a0c60db1f000b8a78eb80d 100644 (file)
 
 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
@@ -45,33 +52,38 @@ SET(COMMON_LIBS
   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)
index 6284fff27295dd428e3ea434478c5cde07611365..b279730d69fb239d8f8307be40ffa129c8a70fa9 100644 (file)
 
 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()
index 2d301c50cf10ce1ab1dff6ebf07efae8e3afeaff..6ed61b64e6c78548bb3b254d23b41d9ebbc1e922 100644 (file)
@@ -17,7 +17,6 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-# Scripts to be installed
 SET(SCRIPTS
   LifeCycleCORBA_SWIGTest.py
   testresourcemanager.py
@@ -27,7 +26,11 @@ SET(SCRIPTS
 )
 
 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)
index fa5a540bcd0af522b85605ea731df5107b86443f..edcdca2df4d4cccc56df30e067695942087d8837 100644 (file)
 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()
index bc856b1a83a09d6ffae85564bf142e2e137d84d9..99ca5bbd18ffefd532f56e6c95dd3b4d50330569 100644 (file)
@@ -22,20 +22,25 @@ INCLUDE_DIRECTORIES(
   ${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
@@ -46,29 +51,31 @@ SET(COMMON_LIBS
   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)
index 3c8a47a224df2dbbe56a4f34f3dfb196196ccb80..325d68451121b0d8e73cab02899239da7377a033 100644 (file)
@@ -21,23 +21,26 @@ INCLUDE_DIRECTORIES(
   ${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
@@ -46,29 +49,33 @@ 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)
diff --git a/src/ModuleCatalog/PathPrefix.hxx b/src/ModuleCatalog/PathPrefix.hxx
deleted file mode 100644 (file)
index ccc8f7a..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-// 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
index c4c4c592ac10b3a5f7eba30dbe1920812158d61b..8f35cedb700d2eac5fecbd3bfc5f2a0023332e39 100644 (file)
 
 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)
@@ -43,16 +52,13 @@ ELSE()
   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)
index 797ddeb858df86202987993abdeebe600c9047cf..5043b0392e5acc66a657a771ebced47917576388 100644 (file)
 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()
diff --git a/src/NamingService/SALOME_NamingService.i b/src/NamingService/SALOME_NamingService.i
deleted file mode 100644 (file)
index c18b451..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-// 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);
-};
-
index 0487f6f91dde86b300acac23c4e984c00d719548..a5115e0f1a106648f89e83d24fe9464bcd9b2c88 100644 (file)
 
 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)
index 1673b599a4e4b01315f194d22175b95576a15a0d..c45a6d4a05f6e26fbf7263dd346717f553047e0e 100644 (file)
 #
 
 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
@@ -39,12 +43,20 @@ 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)
index e92ca7821e7da26065e7bbaed8b13a546d405d5c..3332466159a156e3b4ab3c3a69db46c7a6eacdc5 100644 (file)
@@ -22,22 +22,29 @@ INCLUDE_DIRECTORIES(
   ${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
@@ -45,9 +52,6 @@ SET(COMMON_LIBS
   SalomeHDFPersist
   SalomeParallelIDLKernel
   SalomeIDLKernel
-  ${OMNIORB_LIBRARIES}
-  ${PACO_LIBRARIES}
-  ${PYTHON_LIBRARIES}
 )
 
 SET(SalomeParallelContainer_SOURCES
@@ -58,42 +62,40 @@ 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)
index 541eaa28a8ff216aaf2ee704a2ef49e6c28407d1..84fc991ea952a574ad8b5c9e6786d5ea047489e1 100644 (file)
 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)
index a32527cb4b03eeb85ce5cbd578b0ab9555e61e58..0ffe136d7db58f76b5703f5e88651647ee663cd2 100644 (file)
 #
 
 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
@@ -71,5 +83,12 @@ SET(COMMON_HEADERS_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)
index 5423648ec385d9eb5b1bf9af2a543f8270b0f149..af93474898fab338d988ad6b283121bed34ed79d 100644 (file)
@@ -22,21 +22,21 @@ INCLUDE_DIRECTORIES(
   ${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})
@@ -44,7 +44,11 @@ IF(WIN32)
   ADD_DEFINITIONS(-DNOGDI)
 ENDIF(WIN32)
 
-SET(COMMON_LIBS
+SET(_link_LIBRARIES
+  ${PLATFORM_LIBS}
+  ${PTHREAD_LIBRARIES}
+  ${HDF5_C_LIBRARIES}
+  ${OMNIORB_LIBRARIES}
   TOOLSDS
   SalomeNS
   OpUtil
@@ -58,7 +62,6 @@ SET(COMMON_LIBS
   SalomeLifeCycleCORBA
   SalomeIDLKernel
   SalomeDSClient
-  ${HDF5_C_LIBRARIES}
 )
 
 SET(SalomeDS_SOURCES
@@ -146,25 +149,23 @@ 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
@@ -179,4 +180,13 @@ SET(COMMON_HEADERS_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()
index bec056549c3c3b8dbcfdac9047dcecfcbaa7f6af..ed1d3dbc5cab047a2ece25a124a98fe8e2fdabdb 100644 (file)
@@ -22,72 +22,65 @@ INCLUDE_DIRECTORIES(
   ${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)
index 23157cbef5ac25c53dd4f7388063ac3a49fa5313..acc030240864e714671be19802e8043977377e8c 100644 (file)
 // 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'
index 8b17fb7cf3488d88bb617a2fd3b98bbc6b800847..8e79158759f79a47948fc418c07347ed0c1d8c2f 100644 (file)
 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)
index 7362489c24ec2e128bf0706cc550c4f914f09b4b..790723413ae4a47d6774d61cc5bde62058200b28 100644 (file)
@@ -21,22 +21,24 @@ INCLUDE_DIRECTORIES(
   ${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
@@ -90,20 +92,77 @@ 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()
index 33b649df4a3966fc0979a47bfe5a17bd431021e1..5fc71020f5d1dd2e345d9e7427adbeaa19e4924f 100644 (file)
 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)
index e89103367d5e715c8808ff516a91cda95c3f2147..9b6ad9e041a964d95a2ae9c75479fcc77a4e131a 100644 (file)
@@ -27,7 +27,6 @@
 #include <string>
 #include <vector>
 #include <cstdlib>
-#include "utilities.h"
 
 #include "SALOMEDSImpl_AttributeParameter.hxx"
 #include "SALOMEDSImpl_Study.hxx"
index bb523aa186de2a31467a6b6af2c987b95180417e..1777942645786f316b565a12fef170b43fff6c8d 100644 (file)
 
 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()
index 949fd1546c1d4e2f4c40f976e5c4c412154f1b46..dc4da619479b43d2a2fad0b79150ae4b6b8146bf 100644 (file)
@@ -39,7 +39,7 @@
 #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
index 76bb3d9d73de6b5eeb02689b37f8f0a7f65b131e..d947d808cee9d8ed473d99f5a2b8259a06ccdde5 100644 (file)
 #
 
 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)
index 3df01a4dd2ab4bbdf95a0b68451ad19389b41fdc..daf8fef94c6875915a84e6159ea5115f8649d86b 100644 (file)
@@ -23,7 +23,6 @@
 
 import sys, signal,string,subprocess
 import subprocess
-import runSalome
 import setenv
 
 # get SALOME environment :
index 737f21eecf1db1ffffe830c4d4440dd49b4668a8..1a2ccf8d841d4ff04ddf9ab81debd872971ed059 100644 (file)
@@ -22,18 +22,26 @@ INCLUDE_DIRECTORIES(
   ${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
@@ -50,19 +58,48 @@ SET(SalomeSDS_SOURCES
   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)
index f5dda20ca06d0c7b3da778ae12a650c7a3e0ecec..724c2230101d634567e01a9d50b7e0b3a1045fe8 100644 (file)
 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()
index f862a85788e51d2a24c19e32a166701ccc3decc7..6eb684dd50f87ac1eede2c0b2701b231cdc526f7 100644 (file)
 #
 
 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)
index 81520c256c9b81899d42091f98525715f3b4294c..a849cf0f509aa18bb05f946bf4e71d38821b2137 100644 (file)
 
 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)
index 9a0db6e2c1451e4610ae82e14ed05c55e341917f..e509bbba164d68e7fbcb3cea2483637eef3ae7fb 100644 (file)
@@ -28,7 +28,6 @@
 //
 #include "SALOMEDS_Tool.hxx"
 
-#include "utilities.h"
 #include "Basics_DirUtils.hxx"
 #include "Basics_Utils.hxx"
 
index 034da0748d8da875fe1d784b7f1f656acb3b38dc..057187ad86044a028d7e2d96d48a111ce93daa83 100644 (file)
 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
@@ -51,25 +50,32 @@ SET(COMMON_LIBS
   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)
index aa5498e6b46a3cd094af3768feb6f784352a6cd8..ffed8d22718248f2d4f08a9bfc040566e1ef24bb 100644 (file)
 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
@@ -48,16 +52,14 @@ SET(COMMON_LIBS
   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)
index 3b2ea81dbf34d6ce486fb8cd6e1b43d2f72a1433..aea59592d1a3b862e6c52574d6739cbd047975e7 100644 (file)
 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
@@ -51,27 +41,27 @@ SET(COMMON_LIBS
 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
@@ -88,14 +78,19 @@ IF(NOT SALOME_LIGHT_ONLY)
     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)
index b218f7dc64dafa37a6e1c1d2c7f17cf506d3cf0e..cb74b14742b5117cb87aeefeb969d5aa111db9a8 100644 (file)
 # 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()
index 233168882eeb5d49ae393d4a013eac9293450d96..56ae715119301d0cd8bd4369a9ad074dbfe79cd9 100644 (file)
 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)
index 76ed68a249e70548e4288fd0b13f207cdecfd259..9998612e23b8800cc074f8b265ed5c896be3f596 100644 (file)
 // --- 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
index afe207fdd53b510c279bb594d9c25b492be7ffec..d7ba5ce4f170a6f7dc4b477a48f0d979adfc0222 100644 (file)
@@ -23,9 +23,6 @@
 
 import sys, os,signal,string,subprocess
 import subprocess
-import runSalome
-import orbmodule
-import TestKiller
 import setenv
 
 # get SALOME environment :
@@ -33,23 +30,10 @@ import setenv
 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)