]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Following Cotech 49 decision : update CMakeFiles
authornge <nge>
Wed, 16 Jan 2013 18:01:24 +0000 (18:01 +0000)
committernge <nge>
Wed, 16 Jan 2013 18:01:24 +0000 (18:01 +0000)
Documentatuion from A. Geay will be updated by N. Geimer soon.

56 files changed:
CMakeLists.txt
idl/CMakeLists.txt
salome_adm/cmake_files/FindOMNIORB.cmake
salome_adm/cmake_files/FindPLATFORM.cmake
salome_adm/cmake_files/UseOMNIORB.cmake
src/Basics/CMakeLists.txt
src/CMakeLists.txt
src/Communication/CMakeLists.txt
src/Communication/SALOME_Comm_i.cxx
src/Communication_SWIG/CMakeLists.txt
src/Container/CMakeLists.txt
src/DF/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/CorbaTypeManipulator.hxx
src/DSC/DSC_User/Datastream/Palm/CMakeLists.txt
src/DSC/DSC_User/Datastream/Palm/PalmCouplingPolicy.hxx
src/DSC/ParallelDSC/CMakeLists.txt
src/GenericObj/CMakeLists.txt
src/HDFPersist/CMakeLists.txt
src/KERNEL_PY/CMakeLists.txt
src/KernelHelpers/CMakeLists.txt
src/KernelHelpers/Test/CMakeLists.txt
src/Launcher/CMakeLists.txt
src/LifeCycleCORBA/CMakeLists.txt
src/LifeCycleCORBA/Test/CMakeLists.txt
src/LifeCycleCORBA_SWIG/CMakeLists.txt
src/Logger/CMakeLists.txt
src/MPIContainer/CMakeLists.txt
src/ModuleCatalog/CMakeLists.txt
src/NOTIFICATION_SWIG/CMakeLists.txt
src/NamingService/CMakeLists.txt
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/SALOMEDSClient/CMakeLists.txt
src/SALOMEDSImpl/CMakeLists.txt
src/SALOMEDSImpl/Test/CMakeLists.txt
src/SALOMELocalTrace/CMakeLists.txt
src/SALOMELocalTrace/Test/CMakeLists.txt
src/SALOMETraceCollector/CMakeLists.txt
src/SALOMETraceCollector/Test/CMakeLists.txt
src/TOOLSDS/CMakeLists.txt
src/TestContainer/CMakeLists.txt
src/TestMPIContainer/CMakeLists.txt
src/UnitTests/CMakeLists.txt
src/Utils/CMakeLists.txt
src/Utils/Test/CMakeLists.txt

index 61bf57ba7dfaeddc0467c70ea2c19d25f395fe38..b19bb1384fec1ac9cb780903e99c83a435658f1d 100755 (executable)
@@ -23,6 +23,15 @@ IF(COMMAND cmake_policy)
   cmake_policy(SET CMP0003 NEW)
 ENDIF(COMMAND cmake_policy)
 
+INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake)
+
+IF(APPLE)
+  SET(CMAKE_C_COMPILER gcc)
+  SET(CMAKE_CXX_COMPILER g++)
+  # because default is clang(llvm) with mountain lion at least
+ENDIF(APPLE)
+
+
 # Temporary step instead Find Calcium.cmake
 SET(CALCIUM_IDL_INT_F77 long)
 SET(CALCIUM_CORBA_INT_F77 CORBA::Long)
@@ -40,23 +49,84 @@ ENABLE_TESTING()
 SET(VERSION "6.6.0")
 SET(VERSION_DEV "1")
 
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPYTHON.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindMPI.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindHDF5.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindBOOST.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindSWIG.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindLIBBATCH.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindSPHINX.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/SalomeMacros.cmake)
+SET(BUILD_SHARED_LIBS true)
+
+#Defining all options first
+option(SALOME_USE_MPI "Use MPI containers" OFF)
+option(SALOME_USE_CORBA "Use distribute application with components" ON)
+option(SALOME_USE_DOC "Generate documentation" ON)
+option(SALOME_USE_TEST "Generate test" OFF)
+option(SALOME_USE_LIBBATCH "Generate Launcher" OFF)
+
+
+# Threads
+SET(CMAKE_THREAD_PREFER_PTHREAD)
+find_package(Threads REQUIRED)
+
+
+# Python
+find_package(PythonInterp REQUIRED)
+find_package(PythonLibs REQUIRED)
+set(PYLOGLEVEL WARNING)
+
+# Swig
+find_package(SWIG REQUIRED)
+
+# LIBXML2
+find_package(LibXml2 REQUIRED)
+
+
+# HDF5
+find_package(HDF5 COMPONENTS C REQUIRED)
+if (HDF5_FOUND)
+  set(HDF5_DEFINITIONS "-DH5_USE_16_API -D_HDF5USEDLL_ ${HDF5_DEFINITIONS}" )
+endif(HDF5_FOUND)
+
+# MPI
+if(SALOME_USE_MPI OR HDF5_IS_PARALLEL)
+  find_package(MPI REQUIRED)
+  if(HDF5_IS_PARALLEL)
+    set(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS} ${MPI_C_INCLUDE_PATH} ${MPI_CXX_INCLUDE_PATH} )
+    set(HDF5_LIBRARIES ${HDF5_LIBRARIES} ${MPI_C_LIBRARIES} ${MPI_CXX_LIBRARIES})
+  endif(HDF5_IS_PARALLEL)
+endif(SALOME_USE_MPI OR HDF5_IS_PARALLEL)
+
+# Omniorb
+if(SALOME_USE_CORBA)
+  INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake)
+endif(SALOME_USE_CORBA)
+
+# Boost
+set(Boost_USE_STATIC_LIBS       OFF)
+set(Boost_USE_MULTITHREADED      ON)
+set(Boost_USE_STATIC_RUNTIME    OFF)
+#find_package( Boost 1.49 REQUIRED  )#COMPONENTS thread date_time signals filesystem system)
+find_package( Boost REQUIRED  )#COMPONENTS thread date_time signals filesystem system)
+if(WINDOWS)
+  set(BOOST_DEFINITIONS -DBOOST_DISABLE_ASSERTS)
+endif(WINDOWS)
+
+# CPPUNIT
+if(SALOME_USE_TEST)
+  INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake)
+endif(SALOME_USE_TEST)
+
+# Doxygen
+if(SALOME_USE_DOC)
+  find_package(Doxygen)
+endif(SALOME_USE_DOC)
+
+# Libbatch
+if(SALOME_USE_LIBBATCH)
+  INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindLIBBATCH.cmake)
+endif(SALOME_USE_LIBBATCH)
+
+# Sphinx
+if(SALOME_USE_DOC)
+  INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindSPHINX.cmake)
+endif(SALOME_USE_DOC)
 
-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; t=sys.argv[-1].split(\".\") ; t[:]=(int(elt) for elt in t) ; sys.stdout.write(\"0x%02x%02x%02x\"%tuple(t))" ${VERSION}
-  OUTPUT_VARIABLE XVERSION)
+INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/SalomeMacros.cmake)
 
 SET(KERNEL_salomebin_BINS bin/salome)
 
@@ -80,7 +150,7 @@ SET(KERNEL_appliskel_SCRIPTS bin/salome/appliskel)
 
 SET(KERNEL_appliskel_PYTHON bin/salome/appliskel)
 
-SET(KERNEL_pythondir lib/python${PYTHON_VERSION}/site-packages)
+SET(KERNEL_pythondir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
 
 SET(KERNEL_salomepythondir ${KERNEL_pythondir}/salome)
 
@@ -88,9 +158,9 @@ SET(KERNEL_sharedpkgpython_PYTHON ${KERNEL_salomepythondir}/shared_modules)
 
 SET(KERNEL_salomeadmcmake salome_adm/cmake_files)
 
-IF(CORBA_GEN)
+IF(SALOME_USE_CORBA)
   ADD_SUBDIRECTORY(idl)
-ENDIF(CORBA_GEN)
+ENDIF(SALOME_USE_CORBA)
 
 ADD_SUBDIRECTORY(src)
 ADD_SUBDIRECTORY(resources)
@@ -98,9 +168,12 @@ ADD_SUBDIRECTORY(resources)
 IF(NOT WITHONLYLAUNCHER)
   ADD_SUBDIRECTORY(bin)
   ADD_SUBDIRECTORY(salome_adm)
-  ADD_SUBDIRECTORY(doc)
 ENDIF(NOT WITHONLYLAUNCHER)
 
+IF(SALOME_USE_DOC)
+  ADD_SUBDIRECTORY(doc)
+ENDIF(SALOME_USE_DOC)
+
 SET(input ${CMAKE_CURRENT_SOURCE_DIR}/KERNEL_version.h.in)
 SET(output ${CMAKE_CURRENT_BINARY_DIR}/KERNEL_version.h)
 MESSAGE(STATUS "Creation of ${output}")
index 8dc0b75a957c6b73819daa5915a18afb37d624b6..d1392bd21ddc05bc93de7fe5c438e8cb7cead2d7 100755 (executable)
@@ -20,7 +20,7 @@
 INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/UseOMNIORB.cmake)
 
 INCLUDE_DIRECTORIES(
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_CURRENT_BINARY_DIR}
 )
 
@@ -54,16 +54,16 @@ SET(SalomeIDLKernel_IDLSOURCES
   ${CMAKE_CURRENT_BINARY_DIR}/Calcium_Ports.idl
 )
 
-IF(MPI_IS_OK)
+IF(SALOME_USE_MPI)
   SET(SalomeIDLKernel_IDLSOURCES ${SalomeIDLKernel_IDLSOURCES} SALOME_MPIContainer.idl SALOME_TestMPIComponent.idl)
-ENDIF(MPI_IS_OK)
+ENDIF(SALOME_USE_MPI)
 
 SET(IDL_INCLUDE_DIRS
   ${CMAKE_CURRENT_SOURCE_DIR}
   ${CMAKE_CURRENT_BINARY_DIR}
 )
 
-SET(COMMON_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+SET(COMMON_FLAGS ${OMNIORB_DEFINITIONS})
 SET(TYPE)
 IF(WINDOWS)
   SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOGDI")
@@ -73,8 +73,8 @@ ELSE(WINDOWS)
 ENDIF(WINDOWS)
 
 OMNIORB_ADD_MODULE(SalomeIDLKernel "${SalomeIDLKernel_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" ${TYPE})
-TARGET_LINK_LIBRARIES(SalomeIDLKernel ${CORBA_LIBS})
-SET_TARGET_PROPERTIES(SalomeIDLKernel PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
+ADD_DEFINITIONS(${COMMON_FLAGS})
+TARGET_LINK_LIBRARIES(SalomeIDLKernel ${OMNIORB_LIBRARIES})
 
 INSTALL(TARGETS SalomeIDLKernel DESTINATION ${KERNEL_salomelib_LIBS})
 
@@ -88,8 +88,7 @@ IF(WITH_PACO_PARALLEL)
     SALOME_GenericObjPaCO.idl
   )
   OMNIORB_ADD_MODULE(SalomeParallelIDLKernel "${SalomeIDLKernel_IDLSOURCES}" "${IDL_INCLUDE_DIRS}")
-  TARGET_LINK_LIBRARIES(SalomeParallelIDLKernel ${CORBA_LIBS})
-  SET_TARGET_PROPERTIES(SalomeParallelIDLKernel PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
+  TARGET_LINK_LIBRARIES(SalomeParallelIDLKernel ${OMNIORB_LIBRARIES})
 
   INSTALL(TARGETS SalomeParallelIDLKernel DESTINATION ${KERNEL_salomelib_LIBS})
 ENDIF(WITH_PACO_PARALLEL)
index df341c48d8a64fa3860c43e132684425c144dc75..0ea5cd06064708bea68cca948aff80824df274e5 100644 (file)
-# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+# Find OmniORB4 cmake module
 #
-# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# sets the following variables:
+# OMNIORB_FOUND        - TRUE if OmniORB4 installation has been found
+# OMNIORB_INCLUDE_DIR  - OmniORB4 headers path
+# OMNIORB_LIBRARIES    - OmniORB4 libraries 
+# OMNIORB_VERSION      - OmniORB4 version
+# OMNIORB_IDL_COMPILER - OmniORB4 idl compiler command (omniidl)
+# OMNIORB_NAMESERVER   - OmniORB4 CORBA naming service (omniNames)
 #
-# 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.
+# optional variables:
+# OMNIORB_DIR          - OmniORB4 local installation path
 #
-# 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
+# This module could use OMNIORB_DIR environment variable is set
+# WARNING: The precedence order is the following:
+#   1. OMNIORB_DIR cmake variable
+#   2. OMNIORB_DIR environment variable
+#   3. default cmake search paths
+# NOTE: this goes against cmake default behavior for Find* macros, 
+# more on this issue: 
+# http://www.mail-archive.com/kde-buildsystem@kde.org/msg00589.html
 #
 
-# ------
-
-MESSAGE(STATUS "Check for omniorb ...")
-
-# ------
-
-IF(OMNIORB_IS_MANDATORY STREQUAL 0)
-  SET(OMNIORB_IS_MANDATORY 0)
-  SET(OMNIORB_IS_OPTIONAL 1)
-ENDIF(OMNIORB_IS_MANDATORY STREQUAL 0)
-IF(OMNIORB_IS_OPTIONAL STREQUAL 0)
-  SET(OMNIORB_IS_MANDATORY 1)
-  SET(OMNIORB_IS_OPTIONAL 0)
-ENDIF(OMNIORB_IS_OPTIONAL STREQUAL 0)
-IF(NOT OMNIORB_IS_MANDATORY AND NOT OMNIORB_IS_OPTIONAL)
-  SET(OMNIORB_IS_MANDATORY 1)
-  SET(OMNIORB_IS_OPTIONAL 0)
-ENDIF(NOT OMNIORB_IS_MANDATORY AND NOT OMNIORB_IS_OPTIONAL)
-
-# ------
-
-SET(OMNIORB_STATUS 1)
-IF(WITHOUT_OMNIORB OR WITH_OMNIORB STREQUAL 0)
-  SET(OMNIORB_STATUS 0)
-  MESSAGE(STATUS "omniorb disabled from command line.")
-ENDIF(WITHOUT_OMNIORB OR WITH_OMNIORB STREQUAL 0)
-
-# ------
-
-IF(OMNIORB_STATUS)
-  IF(WITH_OMNIORB)
-    SET(OMNIORB_ROOT_USER ${WITH_OMNIORB})
-  ENDIF(WITH_OMNIORB)
-  IF(NOT OMNIORB_ROOT_USER)
-    SET(OMNIORB_ROOT_USER $ENV{OMNIORB_ROOT})
-  ENDIF(NOT OMNIORB_ROOT_USER)
-  IF(NOT OMNIORB_ROOT_USER)
-    SET(OMNIORB_ROOT_USER $ENV{OMNIORBHOME})
-  ENDIF(NOT OMNIORB_ROOT_USER)
-ENDIF(OMNIORB_STATUS)
-
-# ------
-
-IF(OMNIORB_STATUS)
-  SET(OMNIIDL_EXECUTABLE_TO_FIND omniidl)
-  IF(OMNIORB_ROOT_USER)
-    FIND_PROGRAM(OMNIIDL_EXECUTABLE ${OMNIIDL_EXECUTABLE_TO_FIND} PATHS ${OMNIORB_ROOT_USER}/bin)
-  ELSE(OMNIORB_ROOT_USER)
-    FIND_PROGRAM(OMNIIDL_EXECUTABLE ${OMNIIDL_EXECUTABLE_TO_FIND})
-  ENDIF(OMNIORB_ROOT_USER)
-  IF(OMNIIDL_EXECUTABLE)
-    MESSAGE(STATUS "${OMNIIDL_EXECUTABLE_TO_FIND} found: ${OMNIIDL_EXECUTABLE}")
-    IF(OMNIORB_EXECUTABLE STREQUAL /usr/bin/${OMNIIDL_EXECUTABLE_TO_FIND})
-    ELSE(OMNIORB_EXECUTABLE STREQUAL /usr/bin/${OMNIIDL_EXECUTABLE_TO_FIND})
-      SET(OMNIORB_ROOT_USER ${OMNIIDL_EXECUTABLE})
-      GET_FILENAME_COMPONENT(OMNIORB_ROOT_USER ${OMNIORB_ROOT_USER} PATH)
-      IF(WINDOWS)
-       GET_FILENAME_COMPONENT(OMNIORB_ROOT_USER ${OMNIORB_ROOT_USER} PATH)
-      ENDIF(WINDOWS)
-      GET_FILENAME_COMPONENT(OMNIORB_ROOT_USER ${OMNIORB_ROOT_USER} PATH)
-    ENDIF(OMNIORB_EXECUTABLE STREQUAL /usr/bin/${OMNIIDL_EXECUTABLE_TO_FIND})
-  ELSE(OMNIIDL_EXECUTABLE)
-    MESSAGE(STATUS "${OMNIIDL_EXECUTABLE_TO_FIND} not found, try to use WITH_OMNIORB option or OMNIORBHOME environment variable")
-    SET(OMNIORB_STATUS 0)
-  ENDIF(OMNIIDL_EXECUTABLE)
-ENDIF(OMNIORB_STATUS)
-
-# ------
-
-IF(OMNIORB_STATUS)
-  IF(OMNIORB_ROOT_USER)
-    SET(OMNIORB_FIND_PATHS_OPTION NO_DEFAULT_PATH)
-  ELSE(OMNIORB_ROOT_USER)
-    SET(OMNIORB_FIND_PATHS_OPTION)
-  ENDIF(OMNIORB_ROOT_USER)
-ENDIF(OMNIORB_STATUS)
-
-# ------
-
-IF(OMNIORB_STATUS)
-  SET(OMNIORB_INCLUDES) # to be removed
-  SET(OMNIORB_INCLUDE_DIRS)
-ENDIF(OMNIORB_STATUS)
-IF(OMNIORB_STATUS)
-  IF(OMNIORB_ROOT_USER)
-    SET(OMNIORB_INCLUDE_PATHS ${OMNIORB_ROOT_USER}/include)
-  ELSE(OMNIORB_ROOT_USER)
-    SET(OMNIORB_INCLUDE_PATHS)
-  ENDIF(OMNIORB_ROOT_USER)
-  SET(OMNIORB_INCLUDE_TO_FIND omniORB4/CORBA.h)
-  FIND_PATH(OMNIORB_INCLUDE_DIR1 ${OMNIORB_INCLUDE_TO_FIND} PATHS ${OMNIORB_INCLUDE_PATHS} ${OMNIORB_FIND_PATHS_OPTION})
-  IF(OMNIORB_INCLUDE_DIR1)
-    SET(OMNIORB_INCLUDES ${OMNIORB_INCLUDES} -I${OMNIORB_INCLUDE_DIR1}) # to be removed
-    SET(OMNIORB_INCLUDE_DIRS ${OMNIORB_INCLUDE_DIR1})
-    MESSAGE(STATUS "${OMNIORB_INCLUDE_TO_FIND} found in ${OMNIORB_INCLUDE_DIR1}")
-  ELSE(OMNIORB_INCLUDE_DIR1)
-    SET(OMNIORB_STATUS 0)
-    IF(OMNIORB_ROOT_USER)
-      MESSAGE(STATUS "${OMNIORB_INCLUDE_TO_FIND} not found in ${OMNIORB_INCLUDE_PATHS}, check your OMNIORB installation.")
-    ELSE(OMNIORB_ROOT_USER)
-      MESSAGE(STATUS "${OMNIORB_INCLUDE_TO_FIND} not found on system, try to use WITH_OMNIORB option or OMNIORB_ROOT environment variable.")
-    ENDIF(OMNIORB_ROOT_USER)
-  ENDIF(OMNIORB_INCLUDE_DIR1)
-ENDIF(OMNIORB_STATUS)
-IF(OMNIORB_STATUS)
-  IF(OMNIORB_ROOT_USER)
-    SET(OMNIORB_INCLUDE_PATHS ${OMNIORB_ROOT_USER}/include/omniORB4)
-  ELSE(OMNIORB_ROOT_USER)
-    SET(OMNIORB_INCLUDE_PATHS /usr/include/omniORB4)
-  ENDIF(OMNIORB_ROOT_USER)
-  SET(OMNIORB_INCLUDE_TO_FIND CORBA.h)
-  FIND_PATH(OMNIORB_INCLUDE_DIR2 ${OMNIORB_INCLUDE_TO_FIND} PATHS ${OMNIORB_INCLUDE_PATHS} ${OMNIORB_FIND_PATHS_OPTION})
-  IF(OMNIORB_INCLUDE_DIR2)
-    SET(OMNIORB_INCLUDES ${OMNIORB_INCLUDES} -I${OMNIORB_INCLUDE_DIR2}) # to be removed
-    SET(OMNIORB_INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OMNIORB_INCLUDE_DIR2})
-    MESSAGE(STATUS "${OMNIORB_INCLUDE_TO_FIND} found in ${OMNIORB_INCLUDE_DIR2}")
-  ELSE(OMNIORB_INCLUDE_DIR2)
-    SET(OMNIORB_STATUS 0)
-    MESSAGE(STATUS "${OMNIORB_INCLUDE_TO_FIND} not found in ${OMNIORB_INCLUDE_PATHS}, check your OMNIORB installation.")
-  ENDIF(OMNIORB_INCLUDE_DIR2)
-ENDIF(OMNIORB_STATUS)
-
-# ------
-
-IF(OMNIORB_STATUS)
-  SET(OMNIORB_CXXFLAGS) # to be removed
-  # SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -DOMNIORB_VERSION=4)
-  SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D__x86__) # to be removed
-  SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -DCOMP_CORBA_DOUBLE) # to be removed
-  SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -DCOMP_CORBA_LONG) # to be removed
-  SET(OMNIORB_DEFINITIONS "-D__x86__ -DCOMP_CORBA_DOUBLE -DCOMP_CORBA_LONG")
-  IF(WINDOWS)
-    SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D__WIN32__) # to be removed
-    SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__WIN32__")
-    #    #  #  # SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D_WIN32_WINNT=0x0400)
-    #    SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D__NT__)
-    #    SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D__OSVERSION__=4)
-    #  ELSE(WINDOWS)
-    #    SET(OMNIORB_CXXFLAGS ${OMNIORB_CXXFLAGS} -D__linux__)
-  ENDIF(WINDOWS)
-  #  IF(WINDOWS)
-  #    SET(OMNIORB_LIBS ws2_32.lib mswsock.lib advapi32.lib ${OMNIORB_LIBS})
-  #  ENDIF(WINDOWS)
-ENDIF(OMNIORB_STATUS)
-
-# ----
-
-IF(OMNIORB_STATUS)
-  IF(OMNIORB_ROOT_USER)
-    IF(WINDOWS)
-      SET(OMNIORB_LIB_PATHS ${OMNIORB_ROOT_USER}/lib/x86_win32)
-    ELSE(WINDOWS)
-      SET(OMNIORB_LIB_PATHS ${OMNIORB_ROOT_USER}/lib)
-    ENDIF(WINDOWS)
-  ELSE(OMNIORB_ROOT_USER)
-    SET(OMNIORB_LIB_PATHS)
-  ENDIF(OMNIORB_ROOT_USER)
-ENDIF(OMNIORB_STATUS)
-
-IF(OMNIORB_STATUS)
-  IF(WINDOWS)
-    IF(CMAKE_BUILD_TYPE STREQUAL Release)
-      SET(OMNIORB_LIB_SUFFIX _rt)
-    ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
-      SET(OMNIORB_LIB_SUFFIX _rtd)
-    ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
-  ELSE(WINDOWS)
-    SET(OMNIORB_LIB_SUFFIX)
-  ENDIF(WINDOWS)
-ENDIF(OMNIORB_STATUS)
-
-SET(OMNIORB_LIBS)
-FOREACH(lib omniORB4 omniDynamic4 COS4 COSDynamic4 omnithread)
-  IF(OMNIORB_STATUS)
-    FIND_LIBRARY(${lib}${OMNIORB_LIB_SUFFIX} ${lib}${OMNIORB_LIB_SUFFIX} PATHS ${OMNIORB_LIB_PATHS} ${OMNIORB_FIND_PATHS_OPTION})
-    IF(${lib}${OMNIORB_LIB_SUFFIX})
-      SET(OMNIORB_LIBS ${OMNIORB_LIBS} ${${lib}${OMNIORB_LIB_SUFFIX}})
-      MESSAGE(STATUS "${lib}${OMNIORB_LIB_SUFFIX} lib found: ${${lib}${OMNIORB_LIB_SUFFIX}}")
-    ELSE(${lib}${OMNIORB_LIB_SUFFIX})
-      SET(OMNIORB_STATUS 0)
-      IF(OMNIORB_ROOT_USER)
-       MESSAGE(STATUS "${lib}${OMNIORB_LIB_SUFFIX} lib not found in ${OMNIORB_LIB_PATHS}, check your OMNIORB installation.")
-      ELSE(OMNIORB_ROOT_USER)
-       MESSAGE(STATUS "${lib}${OMNIORB_LIB_SUFFIX} lib not found on system, try to use WITH_OMNIORB option or OMNIORB_ROOT environment variable.")
-      ENDIF(OMNIORB_ROOT_USER)
-    ENDIF(${lib}${OMNIORB_LIB_SUFFIX})
-  ENDIF(OMNIORB_STATUS)
-ENDFOREACH(lib omniORB4 omniDynamic4 COS4 COSDynamic4 omnithread)
-
-# ----------------
-
-IF(OMNIORB_STATUS)
-  SET(OMNIORB_IDL_PYTHON $ENV{OMNIIDL_PYTHON})
-  IF(NOT OMNIORB_IDL_PYTHON)
-    SET(OMNIORB_IDL_PYTHON ${OMNIIDL_EXECUTABLE})
-  ENDIF(NOT OMNIORB_IDL_PYTHON)
-ENDIF(OMNIORB_STATUS)
-
-# ----
-
-IF(OMNIORB_STATUS)
-  SET(CORBA_GEN 1)
-  SET(OMNIORB_IDL ${OMNIIDL_EXECUTABLE})
-  SET(CORBA_INCLUDES ${OMNIORB_INCLUDES})
-  SET(CORBA_CXXFLAGS ${OMNIORB_CXXFLAGS})# to be removed
-  SET(CORBA_DEFINITIONS ${OMNIORB_DEFINITIONS})
-  SET(CORBA_LIBS ${OMNIORB_LIBS})
+# minimum OmniORB4 supported version
+# 4.0.6 has known bug float/double marshalling using CORBA::Any
+set(OMNIORB_MINIMUM_VERSION "4.1.2")
+set(OMNIORB_DIR $ENV{OMNIORB_DIR} CACHE PATH "Path to OmniORB directory")
+
+##############################################################################
+# find headers
+##############################################################################
+find_path(OMNIORB_INCLUDE_DIR omniORB4/CORBA.h
+  PATHS "${OMNIORB_DIR}/include" "$ENV{OMNIORB_DIR}/include"
+  NO_DEFAULT_PATH)
+
+find_path(OMNIORB_INCLUDE_DIR omniORB4/CORBA.h)
+
+
+##############################################################################
+# find libraries
+##############################################################################
+if (WIN32)
+  find_library(OMNIORB_LIBRARY_omniORB4
+       NAMES
+       ${CMAKE_STATIC_LIBRARY_PREFIX}omniORB4${CMAKE_STATIC_LIBRARY_SUFFIX}
+       PATHS ${OMNIORB_DIR}/lib/x86_win32 $ENV{OMNIORB_DIR}/lib/x86_win32
+       NO_DEFAULT_PATH
+  )
+  find_library(OMNIORB_LIBRARY_omniORB4 NAMES
+    ${CMAKE_STATIC_LIBRARY_PREFIX}omniORB4${CMAKE_STATIC_LIBRARY_SUFFIX}
+  )
+else (WIN32)
+  find_library(OMNIORB_LIBRARY_omniORB4
+    NAMES omniORB4
+    PATHS "${OMNIORB_DIR}/lib${LIB_SUFFIX}" "$ENV{OMNIORB_DIR}/lib${LIB_SUFFIX}"
+    NO_DEFAULT_PATH)
+
+  find_library(OMNIORB_LIBRARY_omniORB4
+    NAMES omniORB4)
+endif (WIN32)   
+  
+if (WIN32)
+  FIND_LIBRARY( OMNIORB_LIBRARY_omnithread
+       NAMES
+       ${CMAKE_STATIC_LIBRARY_PREFIX}omnithread${CMAKE_STATIC_LIBRARY_SUFFIX}
+       PATHS ${OMNIORB_DIR}/lib/x86_win32 $ENV{OMNIORB_DIR}/lib/x86_win32
+       NO_DEFAULT_PATH
+  )
+
+  FIND_LIBRARY( OMNIORB_LIBRARY_omnithread
+       NAMES
+       ${CMAKE_STATIC_LIBRARY_PREFIX}omnithread${CMAKE_STATIC_LIBRARY_SUFFIX}
+  )
+else (WIN32)
+  find_library(OMNIORB_LIBRARY_omnithread
+    NAMES omnithread
+    PATHS "${OMNIORB_DIR}/lib${LIB_SUFFIX}" "$ENV{OMNIORB_DIR}/lib${LIB_SUFFIX}"
+    NO_DEFAULT_PATH)
+
+  find_library(OMNIORB_LIBRARY_omnithread
+    NAMES omnithread)
+endif (WIN32)
+
+
+if (WIN32)
+  FIND_LIBRARY( OMNIORB_LIBRARY_omniDynamic4
+    NAMES
+      ${CMAKE_STATIC_LIBRARY_PREFIX}omniDynamic4${CMAKE_STATIC_LIBRARY_SUFFIX}
+    PATHS ${OMNIORB_DIR}/lib/x86_win32 $ENV{OMNIORB_DIR}/lib/x86_win32
+    NO_DEFAULT_PATH
+  )
+
+  FIND_LIBRARY( OMNIORB_LIBRARY_omniDynamic4
+    NAMES
+      ${CMAKE_STATIC_LIBRARY_PREFIX}omniDynamic4${CMAKE_STATIC_LIBRARY_SUFFIX}
+  )
+else (WIN32)
+  find_library(OMNIORB_LIBRARY_omniDynamic4
+    NAMES omniDynamic4
+    PATHS "${OMNIORB_DIR}/lib${LIB_SUFFIX}" "$ENV{OMNIORB_DIR}/lib${LIB_SUFFIX}"
+    NO_DEFAULT_PATH)
+
+  find_library(OMNIORB_LIBRARY_omniDynamic4
+    NAMES omniDynamic4)
+endif (WIN32)    
+
+# optional libraries
+
+if (WIN32)
+  FIND_LIBRARY( OMNIORB_LIBRARY_COS4
+    NAMES
+      ${CMAKE_STATIC_LIBRARY_PREFIX}COS4${CMAKE_STATIC_LIBRARY_SUFFIX}
+    PATHS ${OMNIORB_DIR}/lib/x86_win32 $ENV{OMNIORB_DIR}/lib/x86_win32
+    NO_DEFAULT_PATH 
+  )
+
+  FIND_LIBRARY( OMNIORB_LIBRARY_COS4
+    NAMES
+      ${CMAKE_STATIC_LIBRARY_PREFIX}COS4${CMAKE_STATIC_LIBRARY_SUFFIX}
+  )
+else (WIN32)
+  find_library(OMNIORB_LIBRARY_COS4
+    NAMES COS4
+    PATHS "${OMNIORB_DIR}/lib${LIB_SUFFIX}" "$ENV{OMNIORB_DIR}/lib${LIB_SUFFIX}"
+    NO_DEFAULT_PATH)
+
+  find_library(OMNIORB_LIBRARY_COS4
+    NAMES COS4)
+endif (WIN32)
+
+if (WIN32)
+  FIND_LIBRARY( OMNIORB_LIBRARY_COSDynamic4
+    NAMES
+      ${CMAKE_STATIC_LIBRARY_PREFIX}COSDynamic4${CMAKE_STATIC_LIBRARY_SUFFIX}
+    PATHS ${OMNIORB_DIR}/lib/x86_win32 $ENV{OMNIORB_DIR}/lib/x86_win32
+    NO_DEFAULT_PATH
+  )
+
+  FIND_LIBRARY( OMNIORB_LIBRARY_COSDynamic4
+    NAMES
+      ${CMAKE_STATIC_LIBRARY_PREFIX}COSDynamic4${CMAKE_STATIC_LIBRARY_SUFFIX}
+  )
+
+else (WIN32)
+  find_library(OMNIORB_LIBRARY_COSDynamic4
+    NAMES COSDynamic4
+    PATHS "${OMNIORB_DIR}/lib${LIB_SUFFIX}" "$ENV{OMNIORB_DIR}/lib${LIB_SUFFIX}"
+    NO_DEFAULT_PATH)
+
+  find_library(OMNIORB_LIBRARY_COSDynamic4
+    NAMES COSDynamic4)
+endif (WIN32)
+##############################################################################
+# find command line tools
+##############################################################################
+IF (WIN32)
+FIND_PROGRAM( OMNIORB_IDL_COMPILER
+  NAMES omniidl
+  PATHS ${OMNIORB_DIR}/bin/x86_win32 $ENV{OMNIORB_DIR}/bin/x86_win32
+  DOC "What is the path where omniidl (the idl compiler) can be found"
+  NO_DEFAULT_PATH
+)
+FIND_PROGRAM( OMNIORB_IDL_COMPILER
+  NAMES omniidl
+  DOC "What is the path where omniidl (the idl compiler) can be found"
+)
+
+FIND_PROGRAM( OMNIORB_OMNINAMES_COMMAND
+  NAMES omniNames
+  PATHS ${OMNIORB_DIR}/bin/x86_win32 $ENV{OMNIORB_DIR}/bin/x86_win32
+  DOC "What is the path where omniNames (the ORB server) can be found"
+  NO_DEFAULT_PATH
+)
+FIND_PROGRAM( OMNIORB_OMNINAMES_COMMAND
+  NAMES omniNames
+  DOC "What is the path where omniNames (the ORB server) can be found"
+)
+ELSE(WIN32)
+  find_program(OMNIORB_IDL_COMPILER
+    NAMES omniidl
+    PATHS "${OMNIORB_DIR}/bin" "$ENV{OMNIORB_DIR}/bin"
+    NO_DEFAULT_PATH)
+    
+  find_program(OMNIORB_IDL_COMPILER
+    NAMES omniidl)
+
+  find_program(OMNIORB_NAMESERVER
+    NAMES omniNames
+    PATHS "${OMNIORB_DIR}/bin" "$ENV{OMNIORB_DIR}/bin"
+    NO_DEFAULT_PATH)
+    
+  find_program(OMNIORB_NAMESERVER
+    NAMES omniNames)
+ENDIF (WIN32)
+
+##############################################################################
+# find python back-end
+##############################################################################
+FIND_PATH( OMNIORB_PYTHON_BACKEND
+  NAMES python.py
+  PATHS ${OMNIORB_DIR} ${OMNIORBPY_DIR}
+  DOC "Path to python-backend directory (omniidl_be) including python.py file"
+  NO_DEFAULT_PATH )
+
+##############################################################################
+# cook our stuff
+##############################################################################
+set(OMNIORB_FOUND "FALSE")
+
+if(OMNIORB_INCLUDE_DIR AND
+    OMNIORB_LIBRARY_omniORB4 AND
+    OMNIORB_LIBRARY_omnithread AND
+    OMNIORB_LIBRARY_omniDynamic4 AND
+
+    OMNIORB_IDL_COMPILER)
+  set(OMNIORB_FOUND "TRUE")
+  mark_as_advanced(OMNIORB_DIR)
+  mark_as_advanced(OMNIORB_INCLUDE_DIR)
+  mark_as_advanced(OMNIORB_LIBRARY_omniORB4)
+  mark_as_advanced(OMNIORB_LIBRARY_omnithread)
+  mark_as_advanced(OMNIORB_LIBRARY_omniDynamic4)
+  mark_as_advanced(OMNIORB_IDL_COMPILER)
+  mark_as_advanced(OMNIORB_NAMESERVER)
+  mark_as_advanced(OMNIORB_VERSION)
+  mark_as_advanced(OMNIORB_LIBRARY_COS4)
+  mark_as_advanced(OMNIORB_LIBRARY_COSDynamic4)
+
+  set(OMNIORB_LIBRARIES
+    ${OMNIORB_LIBRARY_omniORB4}
+    ${OMNIORB_LIBRARY_omnithread}
+    ${OMNIORB_LIBRARY_omniDynamic4})
+
+  if(OMNIORB_LIBRARY_COS4)
+    set(OMNIORB_LIBRARIES ${OMNIORB_LIBRARIES} ${OMNIORB_LIBRARY_COS4})
+  endif()
+  if(OMNIORB_LIBRARY_COSDynamic4)
+    set(OMNIORB_LIBRARIES ${OMNIORB_LIBRARIES} ${OMNIORB_LIBRARY_COSDynamic4})
+  endif()
+
+  # Optionaly, extract the the version number from the acconfig.h file:
+  if( EXISTS ${OMNIORB_INCLUDE_DIR}/omniORB4/acconfig.h )
+    file( READ ${OMNIORB_INCLUDE_DIR}/omniORB4/acconfig.h OMNIORB_ACCONFIG_H )
+    string( REGEX MATCH "#define[\t ]+PACKAGE_VERSION[\t ]+\"([0-9]+.[0-9]+.[0-9]+)\"" OMNIORB_ACCONFIG_H "${OMNIORB_ACCONFIG_H}" )
+    string( REGEX REPLACE ".*\"([0-9]+.[0-9]+.[0-9]+)\".*" "\\1" OMNIORB_VERSION "${OMNIORB_ACCONFIG_H}" )
+
+    if( ${OMNIORB_VERSION} VERSION_LESS ${OMNIORB_MINIMUM_VERSION} )
+      message( "WARNING: your version of omniORB is older than the minimum required one (${OMNIORB_MINIMUM_VERSION}), using DIET with this version may result in undetermined behaviors." )
+    endif()
+
+
+  else( EXISTS ${OMNIORB_INCLUDE_DIR}/omniORB4/acconfig.h )
+    set( OMNIORB_VERSION "NOT-FOUND" )
+  endif( EXISTS ${OMNIORB_INCLUDE_DIR}/omniORB4/acconfig.h )
+  set( OMNIORB_VERSION ${OMNIORB_VERSION}
+      CACHE STRING "OmniORB version number." )
+  
   SET(OMNIORB_IDLCXXFLAGS -Wba -nf)
   SET(OMNIORB_IDLPYFLAGS -bpython)
+  IF (OMNIORB_PYTHON_BACKEND) 
+    SET(OMNIORB_IDLPYFLAGS "-p ${OMNIORB_PYTHON_BACKEND} ${OMNIORB_IDLPYFLAGS}")
+    MESSAGE("Backend python for omniidl :" ${OMNIORB_IDLPYFLAGS})
+  ENDIF(OMNIORB_PYTHON_BACKEND)
   SET(IDLCXXFLAGS ${OMNIORB_IDLCXXFLAGS})
   SET(IDLPYFLAGS ${OMNIORB_IDLPYFLAGS})
   SET(IDL_CLN_H .hh)
   SET(IDL_SRV_H .hh)
-ELSE(OMNIORB_STATUS)
-  SET(CORBA_GEN 0)
-  IF(OMNIORB_IS_MANDATORY)
-    MESSAGE(FATAL_ERROR "omniorb not found ... mandatory ... abort")
-  ELSE(OMNIORB_IS_MANDATORY)
-    MESSAGE(STATUS "omniorb not found ... optional ... disabled")
-  ENDIF(OMNIORB_IS_MANDATORY)
-ENDIF(OMNIORB_STATUS)
-
-# ----
+  SET(OMNIORB_DEFINITIONS "-D__x86__ -DCOMP_CORBA_DOUBLE -DCOMP_CORBA_LONG")
+  IF(WINDOWS)
+    SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__WIN32__")
+  ENDIF(WINDOWS)
+  IF(APPLE)
+    SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__macos__")#for omnithread.h to be checked...
+  ENDIF(APPLE)
+
+else()
+  message(FATAL_ERROR "OmniORB is required, please define OMNIORB_DIR as environment or cmake variable")
+endif()
index fa06d0ec3b343041ebc5b6d59611342819d5a6e6..6b21c22383e28806de810c34b1fed257583be6a5 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-MARK_AS_ADVANCED(ISSUE)
-FIND_FILE(ISSUE issue /etc)
-IF(ISSUE)
-  SET(WINDOWS 0)
-ELSE()
-  SET(WINDOWS 1)
-ENDIF(ISSUE)
-
 IF(WINDOWS)
   SET(MACHINE WINDOWS)
 ELSE(WINDOWS)
   SET(MACHINE PCLINUX)
 ENDIF(WINDOWS)
 
-SET(CMAKE_INSTALL_PREFIX_ENV $ENV{CMAKE_INSTALL_PREFIX})
-IF(CMAKE_INSTALL_PREFIX_ENV)
-  SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX_ENV} CACHE PATH "installation prefix" FORCE)
-ENDIF(CMAKE_INSTALL_PREFIX_ENV)
-
 IF(NOT CMAKE_BUILD_TYPE)
   SET(CMAKE_BUILD_TYPE $ENV{CMAKE_BUILD_TYPE})
 ENDIF(NOT CMAKE_BUILD_TYPE)
@@ -44,8 +31,8 @@ IF(NOT CMAKE_BUILD_TYPE)
   SET(CMAKE_BUILD_TYPE Release)
 ENDIF(NOT CMAKE_BUILD_TYPE)
 
-IF(WINDOWS)
-ELSE(WINDOWS)
+IF(WINDOWS OR APPLE)
+ELSE(WINDOWS OR APPLE)
   SET(ADD_WERROR ON)
   SET(NAMES ACCEPT_SALOME_WARNINGS ACCEPT_${MODULE}_WARNINGS I_AM_A_TROLL_I_DO_NOT_FIX_${MODULE}_WARNINGS)
   FOREACH(name ${NAMES})
@@ -58,10 +45,10 @@ ELSE(WINDOWS)
     ENDIF(X${VAL} STREQUAL X1)
   ENDFOREACH(name ${NAMES})
   IF(ADD_WERROR)
-    SET(CMAKE_C_FLAGS "-Werror")
-    SET(CMAKE_CXX_FLAGS "-Werror")
+#    SET(CMAKE_C_FLAGS "-Werror")
+#    SET(CMAKE_CXX_FLAGS "-Werror")
   ENDIF(ADD_WERROR)
-ENDIF(WINDOWS)
+ENDIF(WINDOWS OR APPLE)
 
 IF(CMAKE_BUILD_TYPE)
   IF(WINDOWS)
@@ -79,24 +66,10 @@ IF(CMAKE_BUILD_TYPE)
   ENDIF(WINDOWS)
 ENDIF(CMAKE_BUILD_TYPE)
 
-SET(PLATFORM_CPPFLAGS) # to be removed
-SET(PLATFORM_LDFLAGS) # to be removed
-SET(PLATFORM_LIBADD) # to be removed
-
 SET(PLATFORM_LIBS)
 SET(PLATFORM_DEFINITIONS)
 
 IF(WINDOWS)
-  SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} /W0) # to be removed
-  SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_CRT_SECURE_NO_WARNINGS)  # To disable windows warnings for strcpy, fopen, ... # to be removed
-  SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_SCL_SECURE_NO_WARNINGS)  # To disable windows warnings std::copy, std::transform, ... # to be removed
-  SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DWNT) # to be removed
-  SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DPPRO_NT) # For medfile # to be removed
-  SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_USE_MATH_DEFINES) # At least for MEDMEM # to be removed
-  SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_WIN32_WINNT=0x0500) # Windows 2000 or later API is required # to be removed
-  SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} Ws2_32.lib) # to be removed
-  SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} Userenv.lib) # At least for GEOM suit # to be removed
-
   SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} /W0")
   SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_CRT_SECURE_NO_WARNINGS")  # To disable windows warnings for strcpy, fopen, ...
   SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_SCL_SECURE_NO_WARNINGS")  # To disable windows warnings std::copy, std::transform, ...
@@ -112,12 +85,6 @@ IF(WINDOWS)
     SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0 -D_HAS_ITERATOR_DEBUGGING=0") # To avoid runtime error during checking iterators 
   ENDIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
 ELSE(WINDOWS)
-  # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wparentheses)
-  # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wreturn-type)
-  # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wmissing-declarations)
-  # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wunused)
-  # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wall)
-  SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} -ldl) # to be removed
   SET(PLATFORM_LIBS ${PLATFORM_LIBS} -ldl)
 ENDIF(WINDOWS)
 
@@ -126,22 +93,6 @@ IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8"  AND WINDOWS) # if it platform Windows 64
   SET(SIZE_OF_LONG "4")                             # set sizeof(long) to 4 byte
 ENDIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8"  AND WINDOWS)
 
-SET(PLATFORM_CPPFLAGS "${PLATFORM_CPPFLAGS} -DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_LONG=${SIZE_OF_LONG} -DSIZEOF_INT=4") # to be removed
 SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_LONG=${SIZE_OF_LONG} -DSIZEOF_INT=4")
-
+ADD_DEFINITIONS(${PLATFORM_DEFINITIONS})
 SET(COMPILATION_WITH_CMAKE ON)
-
-#  SET(PLATFORM_CPPFLAGS)
-#  #  #  SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DWNT -D_CRT_SECURE_NO_WARNINGS)
-#  #  SET(RM del)
-#ELSE(WINDOWS)
-#  #  SET(RM /bin/rm)
-#ENDIF(WINDOWS)
-
-### SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_DEBUG_)
-
-##SET(RCP rcp)
-##SET(RSH rsh)
-##SET(RCP rcp)
-
-## MESSAGE(FATAL_ERROR "ZZZZZZZ")
index d6f8e6f9ce9ee2b33a0fbd23556c63264ea51c28..d9a41526ca4634666933ac4a5678e10ea9d11e3c 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INSTALL(CODE "SET(INSTALL_PYIDL_DIR lib/python${PYTHON_VERSION}/site-packages/salome)") # R1 CHECK
-  IF(WINDOWS)
-    INSTALL(CODE "SET(INSTALL_PYIDL_DIR bin/salome)") # R1 CHECK
-  ENDIF(WINDOWS)
+INSTALL( CODE "
+SET(INSTALL_PYIDL_DIR lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/salome) # R1 CHECK
+IF(WINDOWS)
+  SET(INSTALL_PYIDL_DIR bin/salome) # R1 CHECK
+ENDIF(WINDOWS)
 
-INSTALL(CODE "MACRO(OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL MYOMNIORBIDLPYTHON MYIDLPYFLAGS MYIDLFILE MYFULLDIR)
+MACRO(OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL MYOMNIORBIDLPYTHON MYIDLPYFLAGS MYIDLFILE MYFULLDIR)
   FILE(MAKE_DIRECTORY \${MYFULLDIR})
   STRING(REPLACE \" \" \";\" MYIDLPYFLAGS2 \${MYIDLPYFLAGS})
   MESSAGE(STATUS \"Compiling \${MYIDLFILE} into \${MYFULLDIR}\")
   EXECUTE_PROCESS(COMMAND \${MYOMNIORBIDLPYTHON} \${MYIDLPYFLAGS2} -C\${MYFULLDIR} \${MYIDLFILE})
-ENDMACRO(OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL)")
+ENDMACRO(OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL)
+")
 
 # This MACRO uses the following vars
 # - OMNIORB_IDL : the idl tool (given by default by FindOMNIORB.cmake)
@@ -64,7 +66,7 @@ MACRO(OMNIORB_ADD_MODULE MYMODULE MYIDLFILES MYIDLCXXFLAGS TYPE)
       SET(flags ${flags} "-I${f}")
     ENDFOREACH(f ${MYIDLCXXFLAGS})
     ADD_CUSTOM_COMMAND(OUTPUT ${outputs}
-      COMMAND ${OMNIORB_IDL} ${flags} ${input}
+      COMMAND ${OMNIORB_IDL_COMPILER} ${flags} ${input}
       MAIN_DEPENDENCY ${input})
     SET(IDLPYFLAGS ${flags})
     INSTALL(FILES ${input} DESTINATION idl/salome)
@@ -80,7 +82,10 @@ MACRO(OMNIORB_ADD_MODULE MYMODULE MYIDLFILES MYIDLCXXFLAGS TYPE)
     ENDIF(NOT ISBPYTHON)
     SET(IDLPYFLAGS ${flags})
     STRING(REPLACE "\\" "/" IDLPYFLAGS ${IDLPYFLAGS})
-    INSTALL(CODE "OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL( \"${OMNIORB_IDL_PYTHON}\" \"${IDLPYFLAGS}\" \"${input}\" \"${CMAKE_INSTALL_PREFIX}/\${INSTALL_PYIDL_DIR}\" )")
+    IF(OMNIORB_PYTHON_BACKEND)
+      SET(IDLPYFLAGS "${IDLPYFLAGS} -p${OMNIORB_PYTHON_BACKEND}")
+      INSTALL(CODE "OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL( \"${OMNIORB_IDL_COMPILER}\" \"${IDLPYFLAGS}\" \"${input}\" \"${CMAKE_INSTALL_PREFIX}/\${INSTALL_PYIDL_DIR}\" )")
+    ENDIF(OMNIORB_PYTHON_BACKEND)
   ENDFOREACH(input ${MYIDLFILES})
   ADD_LIBRARY(${MYMODULE} ${TYPE} ${MYSOURCES})
 
index 0ba895b591aa356ccc6f2afd81a1460c9ef3a734..3fc35ff982581f2974aa1a9b06408a2bc3ea49a6 100755 (executable)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INCLUDE_DIRECTORIES(
-  ${PTHREAD_INCLUDE_DIRS}
-)
-
 SET(SALOMEBasics_SOURCES
   BasicsGenericDestructor.cxx
   Basics_Utils.cxx
@@ -31,11 +27,10 @@ SET(SALOMEBasics_SOURCES
   Basics_DirUtils.hxx
 )
 
-ADD_LIBRARY(SALOMEBasics SHARED ${SALOMEBasics_SOURCES})
+ADD_LIBRARY(SALOMEBasics ${SALOMEBasics_SOURCES})
 INSTALL(TARGETS SALOMEBasics DESTINATION ${KERNEL_salomelib_LIBS})
 
-SET_TARGET_PROPERTIES(SALOMEBasics PROPERTIES COMPILE_FLAGS "${PTHREAD_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOMEBasics ${PTHREAD_LIBS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(SALOMEBasics ${CMAKE_THREAD_LIBS_INIT} ${PLATFORM_LIBS})
 
 FILE(GLOB SALOMEBasics_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${SALOMEBasics_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
\ No newline at end of file
+INSTALL(FILES ${SALOMEBasics_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
index 931de8be9f067cba158e98afb38f64d588c1dd3c..7ad8522afe658260ef8bfdf3e599dde40a6df5f2 100755 (executable)
@@ -79,32 +79,32 @@ ELSE(WITHONLYLAUNCHER)
   SET(SUBDIRS ${SUBDIR_BASE})
 ENDIF(WITHONLYLAUNCHER)
 
-IF(CORBA_GEN)
+IF(SALOME_USE_CORBA)
   SET(SUBDIRS ${SUBDIRS} ${SUBDIR_CORBA})
-ENDIF(CORBA_GEN)
+ENDIF(SALOME_USE_CORBA)
 
-IF(MPI_IS_OK)
+IF(SALOME_USE_MPI)
   SET(SUBDIRS
     ${SUBDIRS}
     ${SUBDIR_MPI}
   )
-ENDIF(MPI_IS_OK)
+ENDIF(SALOME_USE_MPI)
 
 IF(CPPUNIT_IS_OK)
-  IF(CORBA_GEN)
+  IF(SALOME_USE_CORBA)
     SET(SUBDIRS
       ${SUBDIRS}
       ${SUBDIR_CPPUNIT_BASE}
       ${SUBDIR_CPPUNIT_CORBA}
       ${SUBDIR_CPPUNIT_GENERAL}
     )
-  ELSE(CORBA_GEN)
+  ELSE(SALOME_USE_CORBA)
     SET(SUBDIRS
       ${SUBDIRS}
       ${SUBDIR_CPPUNIT_BASE}
       ${SUBDIR_CPPUNIT_GENERAL}
     )
-  ENDIF(CORBA_GEN)
+  ENDIF(SALOME_USE_CORBA)
 ENDIF(CPPUNIT_IS_OK)
 
 IF(WITH_PACO_PARALLEL)
index 796ffddedbe2150a4dddc025d7597c1bd7a80662..bafc0d96e09e7ea33a0943be1deeb218f8ef1dfb 100755 (executable)
@@ -19,8 +19,8 @@
 
 INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
-  ${MPI_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
+  ${MPI_CXX_INCLUDE_PATH}
   ${PYTHON_INCLUDE_DIRS}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
@@ -33,6 +33,8 @@ SET(COMMON_LIBS
   OpUtil
   SALOMELocalTrace
   SalomeIDLKernel
+  ${PYTHON_LIBRARIES}
+  ${MPI_CXX_LIBRARIES}
 )
 
 SET(SalomeCommunication_SOURCES
@@ -54,9 +56,10 @@ SET(SalomeCommunication_SOURCES
   Receiver.hxx
 )
 
-ADD_LIBRARY(SalomeCommunication SHARED ${SalomeCommunication_SOURCES})
-SET_TARGET_PROPERTIES(SalomeCommunication PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeCommunication ${COMMON_LIBS} ${PYTHON_LIBS} ${MPI_LIBS})
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${MPI_CXX_COMPILE_FLAGS})
+
+ADD_LIBRARY(SalomeCommunication ${SalomeCommunication_SOURCES})
+TARGET_LINK_LIBRARIES(SalomeCommunication ${COMMON_LIBS})
 INSTALL(TARGETS SalomeCommunication DESTINATION ${KERNEL_salomelib_LIBS})
 
 SET(COMMON_HEADERS_HXX
index 98f60f5c3b353f241895d7b8cc1c34adf4300fe1..12427214465756743129b0b796c0b64efdb6c10e 100644 (file)
 
 #include "SALOME_Comm_i.hxx"
 #ifndef WIN32
+#ifndef __APPLE__
 #include <rpc/xdr.h>
 #endif
+#endif
 #include "omniORB4/poa.h"
 #include "omnithread.h"
 #include "Utils_SINGLETON.hxx"
index 8683fa5bdb7c8f7f893f070fd9a4974335bfd59f..6741aa09b925de86cfc4b8bd80e6d10d5319f9ed 100755 (executable)
@@ -17,7 +17,6 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-FIND_PACKAGE(SWIG REQUIRED)
 INCLUDE(${SWIG_USE_FILE})
 
 SET_SOURCE_FILES_PROPERTIES(libSALOME_Comm.i PROPERTIES CPLUSPLUS ON)
@@ -25,7 +24,7 @@ SET_SOURCE_FILES_PROPERTIES(libSALOME_Comm.i PROPERTIES SWIG_DEFINITIONS "-shado
 
 INCLUDE_DIRECTORIES(
   ${PYTHON_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}
   ${CMAKE_CURRENT_SOURCE_DIR}/../Communication
@@ -34,29 +33,29 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
   ${CMAKE_BINARY_DIR}/idl
 )
-SET(_libSALOME_Comm_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
 SET(_libSALOME_Comm_LIBS
   SalomeCommunication
-  ${PYTHON_LIBS}
+  ${PYTHON_LIBRARIES}
 )
 
-IF(MPI_IS_OK)
-  INCLUDE_DIRECTORIES(${MPI_INCLUDE_DIRS})
+IF(SALOME_USE_MPI)
+  INCLUDE_DIRECTORIES(${MPI_CXX_INCLUDE_PATH})
 
-  SET(_libSALOME_Comm_FLAGS "${_libSALOME_Comm_FLAGS} ${MPI_DEFINITIONS}"
+  ADD_DEFINITIONS(${MPI_CXX_COMPILE_FLAGS}
   SET(_libSALOME_Comm_LIBS
     ${_libSALOME_Comm_LIBS}
-    ${MPI_LIBS}
+    ${MPI_CXX_LIBRARIES}
   )
-ENDIF(MPI_IS_OK)
+ENDIF(SALOME_USE_MPI)
 
 SWIG_ADD_MODULE(libSALOME_Comm python libSALOME_Comm.i)
 SWIG_LINK_LIBRARIES(libSALOME_Comm ${_libSALOME_Comm_LIBS})
-SET_TARGET_PROPERTIES(_libSALOME_Comm PROPERTIES COMPILE_FLAGS "${_libSALOME_Comm_FLAGS}")
 
 IF(${MACHINE} STREQUAL WINDOWS)
   SET_TARGET_PROPERTIES(_libSALOME_Comm PROPERTIES DEBUG_OUTPUT_NAME _libSALOME_Comm_d)
 ENDIF(${MACHINE} STREQUAL WINDOWS)
 
 INSTALL(TARGETS _libSALOME_Comm DESTINATION ${KERNEL_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_Comm.py DESTINATION ${KERNEL_salomepythondir})
\ No newline at end of file
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_Comm.py DESTINATION ${KERNEL_salomepythondir})
index 541775c36de184d2b9326e3e0e10f796e5934e02..85c623d95261a47cf1a3968bf6deebb8ebd438cb 100755 (executable)
@@ -19,9 +19,9 @@
 
 INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${HDF5_INCLUDE_DIRS}
-  ${LIBXML_INCLUDE_DIRS}
+  ${LIBXML2_INCLUDE_DIR}
   ${PYTHON_INCLUDE_DIRS}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
@@ -43,7 +43,7 @@ SET(SCRIPTS
   SALOME_ContainerPy.py
 )
 
-SET(COMMON_FLAGS "${HDF5_DEFINITIONS} ${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS})
 SET(COMMON_LIBS
   Registry
   SalomeNotification
@@ -56,27 +56,19 @@ SET(COMMON_LIBS
   SalomeHDFPersist
   SalomeGenericObj
   SalomeIDLKernel
-  ${CORBA_LIBS}
-  ${PYTHON_LIBS}
+  ${OMNIORB_LIBRARIES}
+  ${PYTHON_LIBRARIES}
 )
 
 IF(WITH_MPI_SEQ_CONTAINER)
-  SET(COMMON_FLAGS
-    ${COMMON_FLAGS}
-    ${MPI_DEFINITIONS}
-  )
+  ADD_DEFINITIONS(${MPI_CXX_COMPILE_FLAGS})
   SET(COMMON_LIBS
-    ${COMMON_LIBS}
-    ${MPI_LIBS}
+    ${MPI_CXX_LIBRARIES}
   )
 ENDIF(WITH_MPI_SEQ_CONTAINER)
 
 IF(WITH_PACO_PARALLEL)
-  SET(COMMON_FLAGS
-    ${COMMON_FLAGS}
-    -DWITH_PACO_PARALLEL
-    ${PACO_DEFINITIONS}
-  )
+  ADD_DEFINITIONS(-DWITH_PACO_PARALLEL ${PACO_DEFINITIONS})
   SET(COMMON_LIBS
     ${COMMON_LIBS}
     ${PACO_LIBS}
@@ -93,8 +85,7 @@ SET(SalomeContainer_SOURCES
   Salome_file_i.cxx
 )
 
-ADD_LIBRARY(SalomeContainer SHARED ${SalomeContainer_SOURCES})
-SET_TARGET_PROPERTIES(SalomeContainer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
+ADD_LIBRARY(SalomeContainer ${SalomeContainer_SOURCES})
 TARGET_LINK_LIBRARIES(SalomeContainer ${COMMON_LIBS})
 INSTALL(TARGETS SalomeContainer DESTINATION ${KERNEL_salomelib_LIBS})
 
@@ -102,17 +93,16 @@ SET(SALOME_Container_LIBS
   SalomeContainer
   SALOMEBasics
   ${COMMON_LIBS}
-  ${HDF5_LIBS}
+  ${HDF5_LIBRARIES}
 )
 
 ADD_EXECUTABLE(SALOME_Container SALOME_Container.cxx SALOME_Container_SignalsHandler.cxx)
-SET_TARGET_PROPERTIES(SALOME_Container PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
 TARGET_LINK_LIBRARIES(SALOME_Container ${SALOME_Container_LIBS})
 
-ADD_EXECUTABLE(TestSalome_file TestSalome_file.cxx)
-SET_TARGET_PROPERTIES(TestSalome_file PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(TestSalome_file SALOMETraceCollectorTest ${SALOME_Container_LIBS})
-
+IF(SALOME_USE_TEST)
+  ADD_EXECUTABLE(TestSalome_file TestSalome_file.cxx)
+  TARGET_LINK_LIBRARIES(TestSalome_file SALOMETraceCollectorTest ${SALOME_Container_LIBS})
+ENDIF(SALOME_USE_TEST)
 INSTALL(TARGETS SALOME_Container DESTINATION ${KERNEL_salomebin_BINS})
 
 # Executable scripts to be installed
index 013773a91420ecd273b4f431e989112e3a1cfebf..6dfba2a5f27b194af67dc0657e1adbf700966732 100755 (executable)
@@ -18,8 +18,9 @@
 #
 
 INCLUDE_DIRECTORIES(
-  ${BOOST_INCLUDE_DIRS}
+  ${Boost_INCLUDE_DIRS}
 )
+ADD_DEFINITIONS(${BOOST_DEFINITIONS})
 
 SET(DF_SOURCES
   DF_Attribute.cxx
@@ -37,12 +38,10 @@ SET(DF_SOURCES
   DF_definitions.hxx
 )
 
-ADD_LIBRARY(DF SHARED ${DF_SOURCES})
-SET_TARGET_PROPERTIES(DF PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS}")
+ADD_LIBRARY(DF ${DF_SOURCES})
 INSTALL(TARGETS DF DESTINATION ${KERNEL_salomelib_LIBS})
 
 ADD_EXECUTABLE(testDF testDF.cxx)
-SET_TARGET_PROPERTIES(testDF PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(testDF DF)
 INSTALL(TARGETS testDF DESTINATION ${KERNEL_salomebin_BINS})
 
index 2889e061386b9932c30814b877855250af0b8acf..678fa89a8b3fc84ae716451092ffa729992dfed6 100755 (executable)
@@ -19,7 +19,7 @@
 
 INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_SOURCE_DIR}/src/Container
   ${CMAKE_SOURCE_DIR}/src/GenericObj
@@ -37,9 +37,10 @@ SET(SalomeDSCContainer_SOURCES
   PortProperties_i.cxx
 )
 
-ADD_LIBRARY(SalomeDSCContainer SHARED ${SalomeDSCContainer_SOURCES})
-SET_TARGET_PROPERTIES(SalomeDSCContainer PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeDSCContainer SalomeContainer ${OMNIORB_LIBS})
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+
+ADD_LIBRARY(SalomeDSCContainer ${SalomeDSCContainer_SOURCES})
+TARGET_LINK_LIBRARIES(SalomeDSCContainer SalomeContainer ${OMNIORB_LIBRARIES})
 INSTALL(TARGETS SalomeDSCContainer DESTINATION ${KERNEL_salomelib_LIBS})
 
 SET(SALOME_ConnectionManagerServer_SOURCES
@@ -52,11 +53,10 @@ SET(SALOME_ConnectionManagerServer_LIBS
   SalomeNS
   SALOMELocalTrace
   SalomeContainer 
-  ${OMNIORB_LIBS}
+  ${OMNIORB_LIBRARIES}
 )
 
 ADD_EXECUTABLE(SALOME_ConnectionManagerServer ${SALOME_ConnectionManagerServer_SOURCES})
-SET_TARGET_PROPERTIES(SALOME_ConnectionManagerServer PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(SALOME_ConnectionManagerServer ${SALOME_ConnectionManagerServer_LIBS})
 INSTALL(TARGETS SALOME_ConnectionManagerServer DESTINATION ${KERNEL_salomebin_BINS})
 
index 2b83e1961f5840a89cd33a2a77218fc77839980b..ac17d4daa07c126d3b813e1be79b5ad983f7dd48 100755 (executable)
@@ -22,12 +22,12 @@ INCLUDE(${SWIG_USE_FILE})
 
 SET_SOURCE_FILES_PROPERTIES(calcium.i PROPERTIES CPLUSPLUS ON)
 SET(CMAKE_SWIG_FLAGS "-noexcept")
-SET_SOURCE_FILES_PROPERTIES(calciumPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS})
 
 INCLUDE_DIRECTORIES(
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${PYTHON_INCLUDE_DIRS}
-  ${BOOST_INCLUDE_DIRS}
+  ${Boost_INCLUDE_DIRS}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User
   ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream
@@ -52,12 +52,11 @@ SET(_calcium_LIBS
   SalomeDSCSuperv
   SalomeDSCContainer
   SalomeContainer
-  ${CORBA_LIBS}
+  ${OMNIORB_LIBRARIES}
 )
 
 SWIG_ADD_MODULE(calcium python calcium.i)
 SWIG_LINK_LIBRARIES(calcium ${_calcium_LIBS})
-SET_TARGET_PROPERTIES(_calcium PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS}")
 INSTALL(TARGETS _calcium DESTINATION ${KERNEL_salomepythondir})
 
 SET(SCRIPTS
index 3a2808cbb996eb9a2e58cc1bc6dffca930903253..a99692bdced9bc083d3b42e4ca6a09f3c64d529d 100755 (executable)
@@ -18,7 +18,7 @@
 #
 
 INCLUDE_DIRECTORIES(
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}/idl
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_SOURCE_DIR}/src/DSC/DSC_Basic
@@ -36,8 +36,8 @@ SET(SalomeDSCSupervBasic_SOURCES
   data_short_port_provides.cxx
 )
 
-ADD_LIBRARY(SalomeDSCSupervBasic SHARED ${SalomeDSCSupervBasic_SOURCES})
-SET_TARGET_PROPERTIES(SalomeDSCSupervBasic PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+ADD_LIBRARY(SalomeDSCSupervBasic ${SalomeDSCSupervBasic_SOURCES})
 TARGET_LINK_LIBRARIES(SalomeDSCSupervBasic SalomeDSCSuperv)
 INSTALL(TARGETS SalomeDSCSupervBasic DESTINATION ${KERNEL_salomelib_LIBS})
 
index 779f143305fb5f91ce47151fed762679bb207ed4..ba42135493274399d550d4d645662aa9e4d30694 100755 (executable)
@@ -21,8 +21,8 @@ ADD_SUBDIRECTORY(Basic)
 ADD_SUBDIRECTORY(Datastream)
 
 INCLUDE_DIRECTORIES(
-  ${BOOST_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${Boost_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_SOURCE_DIR}/src/Container
   ${CMAKE_SOURCE_DIR}/src/GenericObj
@@ -34,10 +34,8 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_BINARY_DIR}/idl
 )
 
-SET(COMMON_FLAGS
-  ${OMNIORB_DEFINITIONS}
-  ${BOOST_DEFINITIONS}
-)
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS})
+
 SET(SalomeDSCSuperv_SOURCES
   base_port.cxx
   uses_port.cxx
@@ -45,14 +43,12 @@ SET(SalomeDSCSuperv_SOURCES
   Superv_Component_i.cxx
 )
 
-ADD_LIBRARY(SalomeDSCSuperv SHARED ${SalomeDSCSuperv_SOURCES})
-SET_TARGET_PROPERTIES(SalomeDSCSuperv PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS} ${PLATFORM_DEFINITIONS}")
+ADD_LIBRARY(SalomeDSCSuperv ${SalomeDSCSuperv_SOURCES})
 TARGET_LINK_LIBRARIES(SalomeDSCSuperv SalomeDSCContainer ${PLATFORM_LIBS})
 INSTALL(TARGETS SalomeDSCSuperv DESTINATION ${KERNEL_salomelib_LIBS})
 
 ADD_EXECUTABLE(test_DSC_Exception test_DSC_Exception.cxx)
-SET_TARGET_PROPERTIES(test_DSC_Exception PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(test_DSC_Exception OpUtil SALOMELocalTrace ${OMNIORB_FLAGS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(test_DSC_Exception OpUtil SALOMELocalTrace ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
 INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
index 99c0dac48da7b1723738fae7f5f23601d7497ab0..ba4970b48f5c42e5db81ac92e1a9c3a14b77e07f 100755 (executable)
@@ -21,7 +21,7 @@ ADD_SUBDIRECTORY(Palm)
 ADD_SUBDIRECTORY(Calcium)
 
 INCLUDE_DIRECTORIES(
-  ${BOOST_INCLUDE_DIRS}
+  ${Boost_INCLUDE_DIRS}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User
   ${CMAKE_BINARY_DIR}/src/DSC/DSC_User/Datastream/Palm
@@ -36,8 +36,9 @@ SET(COMMON_LIBS
   SalomeDSCSuperv
 )
 
-ADD_LIBRARY(SalomeDatastream SHARED fake.cc)
-SET_TARGET_PROPERTIES(SalomeDatastream PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS}")
+ADD_DEFINITIONS(${BOOST_DEFINITIONS})
+
+ADD_LIBRARY(SalomeDatastream fake.cc)
 TARGET_LINK_LIBRARIES(SalomeDatastream ${COMMON_LIBS})
 INSTALL(TARGETS SalomeDatastream DESTINATION ${KERNEL_salomelib_LIBS})
 
index f0613a763ad90bf5a34ed43253a91d1067665405..f45baf42aede4e217dfc3023099bcdfafc465cc3 100755 (executable)
@@ -18,8 +18,8 @@
 #
 
 INCLUDE_DIRECTORIES(
-  ${BOOST_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${Boost_INCLUDE_DIR}
+  ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User
@@ -52,23 +52,23 @@ SET(SalomeCalcium_SOURCES
   Calcium.cxx
   calcium_destructors_port_uses.cxx
 )
-ADD_LIBRARY(SalomeCalcium SHARED ${SalomeCalcium_SOURCES})
-SET_TARGET_PROPERTIES(SalomeCalcium PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeCalcium ${PTHREAD_LIBS} ${CORBA_LIBS} ${PLATFORM_LIBS})
+
+ADD_DEFINITIONS(${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+
+ADD_LIBRARY(SalomeCalcium ${SalomeCalcium_SOURCES})
+TARGET_LINK_LIBRARIES(SalomeCalcium SalomeDSCSuperv SalomeContainer ${CMAKE_THREAD_LIBS_INIT} ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS})
 
 SET(CalciumC_SOURCES
   CalciumC.c
   Calcium.cxx
   calciumf.c
 )
-ADD_LIBRARY(CalciumC SHARED ${CalciumC_SOURCES})
-SET_TARGET_PROPERTIES(CalciumC PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_LIBRARY(CalciumC ${CalciumC_SOURCES})
 
 INSTALL(TARGETS CalciumC DESTINATION ${KERNEL_salomelib_LIBS})
 
 ADD_EXECUTABLE(test_DataIdContainer test_DataIdContainer.cxx)
-SET_TARGET_PROPERTIES(test_DataIdContainer PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(test_DataIdContainer SalomeDSCSuperv SalomeContainer SalomeCalcium OpUtil SALOMELocalTrace ${CORBA_LIBS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(test_DataIdContainer SalomeDSCSuperv SalomeContainer SalomeCalcium OpUtil SALOMELocalTrace ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS})
 
 CONFIGURE_FILE(calcium_integer_port_uses.hxx.in calcium_integer_port_uses.hxx @ONLY)
 CONFIGURE_FILE(CalciumProvidesPort.hxx.in CalciumProvidesPort.hxx @ONLY)
index b7364cd5b151af9807bef51747c11e60cafd52f9..d026200e53d0750d983a2a3e44b44394124dc4d8 100644 (file)
@@ -32,7 +32,7 @@
 
 #include <iostream>
 #include <cstring>
-#include <CORBA.h>
+#include <omniORB4/CORBA.h>
 
 //#define MYDEBUG
 
index 4976d94df3bc8d9ca6575a6c51db1cc3830d8e1a..bf17efedb33b946d52a67580e9af6df899bebc95 100755 (executable)
@@ -18,7 +18,7 @@
 #
 
 INCLUDE_DIRECTORIES(
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User
   ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream
@@ -32,12 +32,12 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_BINARY_DIR}/idl
 )
 
-ADD_LIBRARY(SalomePalm SHARED palm_port_factory.cxx)
-SET_TARGET_PROPERTIES(SalomePalm PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+
+ADD_LIBRARY(SalomePalm palm_port_factory.cxx)
 
 ADD_EXECUTABLE(test_DataIdContainer test_DataIdContainer.cxx)
-SET_TARGET_PROPERTIES(test_DataIdContainer PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(test_DataIdContainer ${OMNIORB_LIBS})
+TARGET_LINK_LIBRARIES(test_DataIdContainer ${OMNIORB_LIBRARIES})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
 INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
index f41fc138bcb8a982d04a0df07a0eb9cb740e7646..5703e90871c899405bb6f5c362414c5fd90de4fd 100644 (file)
@@ -32,7 +32,7 @@
 
 #include <SALOMEconfig.h>
 
-#include <CORBA.h>
+#include <omniORB4/CORBA.h>
 #include <vector>
 #include "DataIdFilter.hxx"
 #include "DisplayPair.hxx"
index bb64c831343d026c99f3a429cb089d189ce94699..34b56ef9690ada8a00525143071b0924aa8bdfa4 100755 (executable)
@@ -18,9 +18,9 @@
 #
 
 INCLUDE_DIRECTORIES(
-  ${MPI_INCLUDE_DIRS}
+  ${MPI_CXX_INCLUDE_PATH}
   ${PACO_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_SOURCE_DIR}/src/Container
   ${CMAKE_SOURCE_DIR}/src/ParallelContainer
   ${CMAKE_SOURCE_DIR}/src/Notification
@@ -37,7 +37,7 @@ INCLUDE_DIRECTORIES(
 
 SET(COMMON_FLAGS
   ${OMNIORB_DEFINITIONS}
-  ${MPI_DEFINITIONS}
+  ${MPI_CXX_COMPILE_FLAGS}
   ${PACO_DEFINITIONS}
 )
 SET(SalomeParallelDSCContainer_SOURCES
@@ -46,7 +46,7 @@ SET(SalomeParallelDSCContainer_SOURCES
     Param_Double_Port_uses_i.cxx
 )
 
-ADD_LIBRARY(SalomeParallelDSCContainer SHARED ${SalomeParallelDSCContainer_SOURCES})
+ADD_LIBRARY(SalomeParallelDSCContainer ${SalomeParallelDSCContainer_SOURCES})
 SET_TARGET_PROPERTIES(SalomeParallelDSCContainer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
 INSTALL(TARGETS SalomeParallelDSCContainer DESTINATION ${KERNEL_salomelib_LIBS})
 
index 423d1eb39723105cea2bc8ac1c4405e5642f5148..27346b6844b9619b59bb07d84204f60f2b8bef01 100755 (executable)
@@ -18,7 +18,7 @@
 #
 
 INCLUDE_DIRECTORIES(
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${PTHREAD_INCLUDE_DIRS}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
@@ -26,8 +26,8 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_BINARY_DIR}/idl
 )
 
-ADD_LIBRARY(SalomeGenericObj SHARED SALOME_GenericObj_i.cc)
-SET_TARGET_PROPERTIES(SalomeGenericObj PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+ADD_LIBRARY(SalomeGenericObj SALOME_GenericObj_i.cc)
 TARGET_LINK_LIBRARIES(SalomeGenericObj SALOMELocalTrace SalomeIDLKernel)
 INSTALL(TARGETS SalomeGenericObj DESTINATION ${KERNEL_salomelib_LIBS})
 
index 30aef7f00de22cd8b3b0e40da3baf175852843a9..ef9411f1a582e0dc2124308da365f5ce0b31cb38 100755 (executable)
@@ -21,58 +21,14 @@ INCLUDE_DIRECTORIES(
   ${HDF5_INCLUDE_DIRS}
 )
 
-SET(SalomeHDFPersist_SOURCES
-  HDFfileCreate.c
-  HDFfileClose.c
-  HDFfileOpen.c
-  HDFfileMount.c
-  HDFfileUmount.c
-  HDFgroupCreate.c
-  HDFgroupOpen.c
-  HDFgroupClose.c
-  HDFdatasetOpen.c
-  HDFdatasetClose.c
-  HDFdatasetCreate.c
-  HDFdatasetWrite.c
-  HDFdatasetRead.c
-  HDFdatasetGetDim.c
-  HDFdatasetGetSize.c
-  HDFdatasetGetType.c
-  HDFdatasetGetnDim.c
-  HDFdatasetGetOrder.c
-  HDFarrayGetType.c
-  HDFarrayGetTypeId.c
-  HDFarrayCreate.c
-  HDFarrayClose.c
-  HDFarrayGetnDim.c
-  HDFarrayGetDim.c
-  HDFattrOpen.c
-  HDFattrClose.c
-  HDFattrWrite.c
-  HDFattrCreate.c
-  HDFattrRead.c
-  HDFattrGetType.c
-  HDFattrGetSize.c
-  HDFerrorModeLock.c
-  HDFnObjects.c
-  HDFobjectIdentify.c
-  HDFobjectType.c
-  HDFobject.cc
-  HDFarray.cc
-  HDFinternalObject.cc
-  HDFattribute.cc
-  HDFcontainerObject.cc
-  HDFdataset.cc
-  HDFfile.cc
-  HDFgroup.cc
-  HDFexplorer.cc
-  HDFconvert.cc
-  HDFascii.cc
-)
 
-ADD_LIBRARY(SalomeHDFPersist SHARED ${SalomeHDFPersist_SOURCES})
-SET_TARGET_PROPERTIES(SalomeHDFPersist PROPERTIES COMPILE_FLAGS "-D${MACHINE} ${HDF5_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeHDFPersist ${HDF5_LIBS} ${PLATFORM_LIBS})
+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})
+
+ADD_LIBRARY(SalomeHDFPersist ${SalomeHDFPersist_SOURCES})
+TARGET_LINK_LIBRARIES(SalomeHDFPersist ${HDF5_LIBRARIES} ${PLATFORM_LIBS})
 INSTALL(TARGETS SalomeHDFPersist DESTINATION ${KERNEL_salomelib_LIBS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
index 676b5842ea21492be26e5f6078991f5158351215..f33511203d066e0d38a98b419bfbeb7c250d7fc5 100755 (executable)
@@ -25,7 +25,7 @@ SET(salomepython_PYTHON
   omnipatch.py
 )
 
-IF(CORBA_GEN)
+IF(SALOME_USE_CORBA)
   SET(salomepython_PYTHON
     ${salomepython_PYTHON}
     Help.py
@@ -42,7 +42,7 @@ IF(CORBA_GEN)
     salome_pynode.py
     salome_genericobj.py
   )
-ENDIF(CORBA_GEN)
+ENDIF(SALOME_USE_CORBA)
 
 SALOME_INSTALL_SCRIPTS("${salomepython_PYTHON}" ${KERNEL_salomepythondir})
 SALOME_INSTALL_SCRIPTS(kernel_shared_modules.py ${KERNEL_sharedpkgpython_PYTHON})
index 09e211bb370e2fadc0a15e08c528b6e295741e1f..9f25eb6bb206ce9aeac9591d112c5eb6ccaba01d 100755 (executable)
@@ -19,7 +19,7 @@
 
 INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
@@ -33,7 +33,7 @@ INCLUDE_DIRECTORIES(
 )
 
 SET(SalomeKernelHelpers_LIBS
-  ${OMNIORB_LIBS}
+  ${OMNIORB_LIBRARIES}
   SalomeNS
   SALOMELocalTrace
   SALOMEBasics
@@ -51,13 +51,13 @@ SET(SalomeKernelHelpers_SOURCES
   SALOMEDS_DriverDefaultImpl.cxx
 )
 
-ADD_LIBRARY(SalomeKernelHelpers SHARED ${SalomeKernelHelpers_SOURCES})
-SET_TARGET_PROPERTIES(SalomeKernelHelpers PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+
+ADD_LIBRARY(SalomeKernelHelpers ${SalomeKernelHelpers_SOURCES})
 TARGET_LINK_LIBRARIES(SalomeKernelHelpers ${SalomeKernelHelpers_LIBS})
 INSTALL(TARGETS SalomeKernelHelpers DESTINATION ${KERNEL_salomelib_LIBS})
 
 ADD_EXECUTABLE(KernelHelpersUseCases KernelHelpersUseCases.cxx)
-SET_TARGET_PROPERTIES(KernelHelpersUseCases PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(KernelHelpersUseCases SalomeKernelHelpers ${SalomeKernelHelpers_LIBS})
 INSTALL(TARGETS KernelHelpersUseCases DESTINATION ${KERNEL_salomebin_BINS})
 
index f0291aaf5453c8ea474cb05fb4b69aff0ff1e831..2bef6951ffdf1c734af8e86710d5df7436c84a76 100755 (executable)
@@ -19,8 +19,7 @@
 
 INCLUDE_DIRECTORIES(
   ${CPPUNIT_INCLUDE_DIRS}
-  ${PTHREAD_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_SOURCE_DIR}/src/Basics/Test
   ${CMAKE_CURRENT_SOURCE_DIR}/..
@@ -38,7 +37,7 @@ INCLUDE_DIRECTORIES(
 SET(SalomeKernelHelpersTest_LIBS
   ${CPPUNIT_LIBS}
   SalomeKernelHelpers
-  ${OMNIORB_LIBS}
+  ${OMNIORB_LIBRARIES}
   SalomeNS
   SALOMELocalTrace
   SALOMEBasics
@@ -50,13 +49,13 @@ SET(SalomeKernelHelpersTest_LIBS
   SalomeIDLKernel
 )
 
-ADD_LIBRARY(SalomeKernelHelpersTest SHARED KernelHelpersUnitTests.cxx)
-SET_TARGET_PROPERTIES(SalomeKernelHelpersTest PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+
+ADD_LIBRARY(SalomeKernelHelpersTest KernelHelpersUnitTests.cxx)
 TARGET_LINK_LIBRARIES(SalomeKernelHelpersTest ${SalomeKernelHelpersTest_LIBS})
 INSTALL(TARGETS SalomeKernelHelpersTest DESTINATION ${KERNEL_salomelib_LIBS})
 
 ADD_EXECUTABLE(TestKernelHelpers TestKernelHelpers.cxx)
-SET_TARGET_PROPERTIES(TestKernelHelpers PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(TestKernelHelpers SalomeKernelHelpersTest ${SalomeKernelHelpersTest_LIBS})
 ADD_TEST(TestKernelHelpers TestKernelHelpers)
 INSTALL(TARGETS TestKernelHelpers DESTINATION ${KERNEL_salomebin_BINS})
index b314fdcc1cc5e00482ae8e329087796db5aa0c0d..f8ee6e1b857317793a57280c6ec3600db1fb37bc 100755 (executable)
 #
 
 INCLUDE_DIRECTORIES(
-  ${LIBXML_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${LIBXML2_INCLUDE_DIR}
+  ${OMNIORB_INCLUDE_DIR}
   ${PYTHON_INCLUDE_DIRS}
   ${PTHREAD_INCLUDE_DIRS}
-  ${MPI_INCLUDE_DIRS}
-  ${LIBBATCH_INCLUDE_DIRS}
+  ${MPI_CXX_INCLUDE_PATH}
+  ${LIBBATCH_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
@@ -35,13 +35,11 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager
   ${CMAKE_BINARY_DIR}/idl
 )
-SET(WITH_LIBBATCH_FLAG)
-IF(WITH_LIBBATCH)
-  SET(WITH_LIBBATCH_FLAG "-DWITH_LIBBATCH")
-ENDIF(WITH_LIBBATCH)
 
-# This local variable defines the list of FLAGS common to all target in this package.
-SET(COMMON_FLAGS "${MPI_DEFINITIONS} ${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${WITH_LIBBATCH_FLAG} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${MPI_CXX_COMPILE_FLAGS} ${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+IF(SALOME_USE_LIBBATCH)
+  ADD_DEFINITIONS(-DWITH_LIBBATCH)
+ENDIF(SALOME_USE_LIBBATCH)
 
 # This local variable defines the list of dependant libraries common to all target in this package.
 SET(COMMON_LIBS
@@ -55,10 +53,10 @@ SET(COMMON_LIBS
   SALOMEBasics
   SalomeIDLKernel
   ${LIBBATCH_LIBS}
-  ${MPI_LIBS}
-  ${OMNIORB_LIBS}
-  ${LIBXML_LIBS}
-  ${PYTHON_LIBS}
+  ${MPI_CXX_LIBRARIES}
+  ${OMNIORB_LIBRARIES}
+  ${LIBXML2_LIBRARIES}
+  ${PYTHON_LIBRARIES}
 )
 
 SET(Launcher_SOURCES
@@ -72,15 +70,13 @@ SET(Launcher_SOURCES
   Launcher_Job_YACSFile.cxx
   Launcher.cxx
 )
-SET(Launcher_FLAGS "${MPI_DEFINITIONS} ${LIBXML_DEFINITIONS} ${LIBBATCH_DEFINITIONS} ${WITH_LIBBATCH_FLAG} ${PLATFORM_DEFINITIONS}")
 
-ADD_LIBRARY(Launcher SHARED ${Launcher_SOURCES})
-SET_TARGET_PROPERTIES(Launcher PROPERTIES COMPILE_FLAGS "${Launcher_FLAGS}")
-TARGET_LINK_LIBRARIES(Launcher ResourcesManager ${LIBBATCH_LIBS} ${MPI_LIBS} ${LIBXML_LIBS})
+ADD_LIBRARY(Launcher ${Launcher_SOURCES})
+TARGET_LINK_LIBRARIES(Launcher ResourcesManager ${LIBBATCH_LIBS} ${MPI_CXX_LIBRARIES} ${LIBXML2_LIBS})
 INSTALL(TARGETS Launcher DESTINATION ${KERNEL_salomelib_LIBS})
 
 SET(TestLauncher_LIBS
-  ${LIBXML_LIBS}
+  ${LIBXML2_LIBRARIES}
   ResourcesManager
   Launcher
   OpUtil
@@ -88,13 +84,11 @@ SET(TestLauncher_LIBS
 )
 
 ADD_EXECUTABLE(TestLauncher TestLauncher.cxx)
-SET_TARGET_PROPERTIES(TestLauncher PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${LIBBATCH_DEFINITIONS} ${WITH_LIBBATCH_FLAG} ${PLATFORM_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(TestLauncher ${TestLauncher_LIBS})
 INSTALL(TARGETS TestLauncher DESTINATION ${KERNEL_salomebin_BINS})
 
 IF(NOT WITHONLYLAUNCHER)
-  ADD_LIBRARY(SalomeLauncher SHARED BatchTest.cxx SALOME_Launcher.cxx)
-  SET_TARGET_PROPERTIES(SalomeLauncher PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
+  ADD_LIBRARY(SalomeLauncher BatchTest.cxx SALOME_Launcher.cxx)
   TARGET_LINK_LIBRARIES(SalomeLauncher Launcher ${COMMON_LIBS})
   INSTALL(TARGETS SalomeLauncher DESTINATION ${KERNEL_salomelib_LIBS})
   
@@ -104,16 +98,15 @@ IF(NOT WITHONLYLAUNCHER)
     SALOMEBasics
     SALOMELocalTrace
     ${LIBBATCH_LIBS}
-    ${MPI_LIBS}
-    ${OMNIORB_LIBS}
-    ${LIBXML_LIBS}
-    ${PYTHON_LIBS}
+    ${MPI_CXX_LIBRARIES}
+    ${OMNIORB_LIBRARIES}
+    ${LIBXML2_LIBRARIES}
+    ${PYTHON_LIBRARIES}
   )
 
   
 
   ADD_EXECUTABLE(SALOME_LauncherServer SALOME_LauncherServer.cxx)
-  SET_TARGET_PROPERTIES(SALOME_LauncherServer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
   TARGET_LINK_LIBRARIES(SALOME_LauncherServer ${SALOME_LauncherServer_LIBS})
   INSTALL(TARGETS SALOME_LauncherServer DESTINATION ${KERNEL_salomebin_BINS})
 ENDIF(NOT WITHONLYLAUNCHER)
index a635b40619ad25376fe31a96e201e80f92e00006..335d15b220bfc1a4e49b7384c7de8572e99a3df9 100755 (executable)
@@ -18,8 +18,8 @@
 #
 
 INCLUDE_DIRECTORIES(
-  ${LIBXML_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${LIBXML2_INCLUDE_DIR}
+  ${OMNIORB_INCLUDE_DIR}
   ${PTHREAD_INCLUDE_DIRS}
   ${PYTHON_INCLUDE_DIRS}
   ${CMAKE_BINARY_DIR}/salome_adm
@@ -48,18 +48,17 @@ SET(COMMON_LIBS
   SalomeIDLKernel
 )
 
-ADD_LIBRARY(SalomeLifeCycleCORBA SHARED SALOME_LifeCycleCORBA.cxx SALOME_FileTransferCORBA.cxx)
-SET_TARGET_PROPERTIES(SalomeLifeCycleCORBA PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+
+ADD_LIBRARY(SalomeLifeCycleCORBA SALOME_LifeCycleCORBA.cxx SALOME_FileTransferCORBA.cxx)
 TARGET_LINK_LIBRARIES(SalomeLifeCycleCORBA ${COMMON_LIBS})
 INSTALL(TARGETS SalomeLifeCycleCORBA DESTINATION ${KERNEL_salomelib_LIBS})
 
 ADD_EXECUTABLE(Test_LifeCycleCORBA Test_LifeCycleCORBA.cxx)
-SET_TARGET_PROPERTIES(Test_LifeCycleCORBA PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(Test_LifeCycleCORBA SalomeLifeCycleCORBA Registry SalomeNotification SalomeContainer ${COMMON_LIBS} ${OMNIORB_LIBS})
+TARGET_LINK_LIBRARIES(Test_LifeCycleCORBA SalomeLifeCycleCORBA Registry SalomeNotification SalomeContainer ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
 
 ADD_EXECUTABLE(TestContainerManager TestContainerManager.cxx)
-SET_TARGET_PROPERTIES(TestContainerManager PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestContainerManager SalomeLifeCycleCORBA Registry SalomeNotification SalomeContainer ${COMMON_LIBS} ${OMNIORB_LIBS})
+TARGET_LINK_LIBRARIES(TestContainerManager SalomeLifeCycleCORBA Registry SalomeNotification SalomeContainer ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
 
 INSTALL(TARGETS Test_LifeCycleCORBA TestContainerManager DESTINATION ${KERNEL_salomebin_BINS})
 
index 47c04bd740c67ce3f97036b469a8a5eaab043fde..e23a2dbbe2c6788fd54efb4a8bf72eff6894f285 100755 (executable)
@@ -20,7 +20,7 @@
 INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIRS}
   ${CPPUNIT_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
   ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test
@@ -52,16 +52,16 @@ SET(COMMON_LIBS
   SALOMETraceCollectorTest
   SalomeIDLKernel
   SalomeLifeCycleCORBA
-  ${OMNIORB_LIBS}
+  ${OMNIORB_LIBRARIES}
 )
 
-ADD_LIBRARY(LifeCycleCORBATest SHARED LifeCycleCORBATest.cxx)
-SET_TARGET_PROPERTIES(LifeCycleCORBATest PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+
+ADD_LIBRARY(LifeCycleCORBATest LifeCycleCORBATest.cxx)
 TARGET_LINK_LIBRARIES(LifeCycleCORBATest ${COMMON_LIBS})
 INSTALL(TARGETS LifeCycleCORBATest DESTINATION ${KERNEL_salomelib_LIBS})
 
 ADD_EXECUTABLE(TestLifeCycleCORBA TestLifeCycleCORBA.cxx)
-SET_TARGET_PROPERTIES(TestLifeCycleCORBA PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(TestLifeCycleCORBA LifeCycleCORBATest NamingServiceTest SalomeLifeCycleCORBA ${COMMON_LIBS})
 INSTALL(TARGETS TestLifeCycleCORBA DESTINATION ${KERNEL_salomebin_BINS})
 
index 57da32c3481a59e0f8eb47202267926f6feb2551..3c8725edfa00b8b58324ce53ede19b149e71f1f6 100755 (executable)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-FIND_PACKAGE(SWIG REQUIRED)
 INCLUDE(${SWIG_USE_FILE})
 
 SET_SOURCE_FILES_PROPERTIES(libSALOME_LifeCycleCORBA.i PROPERTIES CPLUSPLUS ON)
 SET_SOURCE_FILES_PROPERTIES(libSALOME_LifeCycleCORBA.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-SET_SOURCE_FILES_PROPERTIES(libSALOME_LifeCycleCORBAPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
 
 INCLUDE_DIRECTORIES(
   ${PYTHON_INCLUDE_DIRS}
   ${PTHREAD_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}
   ${CMAKE_CURRENT_BINARY_DIR}
@@ -40,9 +39,8 @@ INCLUDE_DIRECTORIES(
   )
 
 SWIG_ADD_MODULE(libSALOME_LifeCycleCORBA python libSALOME_LifeCycleCORBA.i)
-SWIG_LINK_LIBRARIES(libSALOME_LifeCycleCORBA ${PYTHON_LIBS} SalomeLifeCycleCORBA)
-SET_TARGET_PROPERTIES(_libSALOME_LifeCycleCORBA PROPERTIES COMPILE_FLAGS "${PLATFORM_LIBS}")
-SET_TARGET_PROPERTIES(_libSALOME_LifeCycleCORBA PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}")
+SWIG_LINK_LIBRARIES(libSALOME_LifeCycleCORBA ${PYTHON_LIBRARIES} SalomeLifeCycleCORBA)
+TARGET_LINK_LIBRARIES(_libSALOME_LifeCycleCORBA ${PLATFORM_LIBS})
 
 IF(${MACHINE} STREQUAL WINDOWS)
   SET_TARGET_PROPERTIES(_libSALOME_LifeCycleCORBA PROPERTIES DEBUG_OUTPUT_NAME _libSALOME_LifeCycleCORBA_d)
index 6b7c86d3c2494bfb8997f8a67a48b98e860ae895..61f3fb6bea48089d5fe8e686087c806e65acbc05 100755 (executable)
 #
 
 INCLUDE_DIRECTORIES(
-  ${PTHREAD_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
   ${CMAKE_BINARY_DIR}/idl
 )
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
 
-ADD_LIBRARY(SalomeLoggerServer SHARED SALOME_Trace.cxx SALOME_Logger_Server.cxx)
-SET_TARGET_PROPERTIES(SalomeLoggerServer PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeLoggerServer SalomeIDLKernel ${OMNIORB_LIBS} ${PLATFORM_LIBS})
+ADD_LIBRARY(SalomeLoggerServer SALOME_Trace.cxx SALOME_Logger_Server.cxx)
+TARGET_LINK_LIBRARIES(SalomeLoggerServer SalomeIDLKernel ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS})
 INSTALL(TARGETS SalomeLoggerServer DESTINATION ${KERNEL_salomelib_LIBS})
 
 SET(SALOME_Logger_Server_SOURCES
@@ -39,11 +38,10 @@ SET(SALOME_Logger_Server_SOURCES
 SET(SALOME_Logger_Server_LIBS
   SalomeLoggerServer
   SalomeIDLKernel
-  ${OMNIORB_LIBS}
+  ${OMNIORB_LIBRARIES}
 )
 
 ADD_EXECUTABLE(SALOME_Logger_Server ${SALOME_Logger_Server_SOURCES})
-SET_TARGET_PROPERTIES(SALOME_Logger_Server PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(SALOME_Logger_Server ${SALOME_Logger_Server_LIBS})
 INSTALL(TARGETS SALOME_Logger_Server DESTINATION ${KERNEL_salomebin_BINS})
 
index 89011806004bbbf88f5c3ef6cf9b0fa7c987d80c..cdd6330406e16c59758228a824e4d5522d60ae5e 100755 (executable)
@@ -18,9 +18,9 @@
 #
 
 INCLUDE_DIRECTORIES(
-  ${MPI_INCLUDE_DIRS}
+  ${MPI_CXX_INCLUDE_PATH}
   ${PYTHON_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
@@ -45,21 +45,20 @@ SET(COMMON_LIBS
   SalomeContainer
   SalomeGenericObj
   SalomeIDLKernel
-  ${CORBA_LIBS}
+  ${OMNIORB_LIBRARIES}
 )
 
-ADD_LIBRARY(SalomeMPIContainer SHARED MPIObject_i.cxx MPIContainer_i.cxx)
-SET_TARGET_PROPERTIES(SalomeMPIContainer PROPERTIES COMPILE_FLAGS "${MPI_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
+ADD_DEFINITIONS(${MPI_CXX_COMPILE_FLAGS} ${OMNIORB_DEFINITIONS})
+
+ADD_LIBRARY(SalomeMPIContainer MPIObject_i.cxx MPIContainer_i.cxx)
 TARGET_LINK_LIBRARIES(SalomeMPIContainer ${COMMON_LIBS})
 INSTALL(TARGETS SalomeMPIContainer DESTINATION ${KERNEL_salomelib_LIBS})
 
 ADD_EXECUTABLE(SALOME_MPIContainer SALOME_MPIContainer.cxx)
-SET_TARGET_PROPERTIES(SALOME_MPIContainer PROPERTIES COMPILE_FLAGS "${MPI_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOME_MPIContainer SalomeMPIContainer ${COMMON_LIBS} ${PYTHON_LIBS} ${MPI_LIBS})
+TARGET_LINK_LIBRARIES(SALOME_MPIContainer SalomeMPIContainer ${COMMON_LIBS} ${PYTHON_LIBRARIES} ${MPI_CXX_LIBRARIES})
 
 ADD_EXECUTABLE(testMPI2 testMPI2.cxx)
-SET_TARGET_PROPERTIES(testMPI2 PROPERTIES COMPILE_FLAGS "${MPI_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(testMPI2 ${MPI_LIBS})
+TARGET_LINK_LIBRARIES(testMPI2 ${MPI_CXX_LIBRARIES})
 
 INSTALL(TARGETS SALOME_MPIContainer testMPI2 DESTINATION ${KERNEL_salomebin_BINS})
 
index 3e8f048effd3a1cf27dbb5688f1498f4e2455a41..922f4b5b0c6e77d558329fd5962b4168567d1087 100755 (executable)
@@ -19,8 +19,8 @@
 
 INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
-  ${LIBXML_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
+  ${LIBXML2_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
@@ -36,7 +36,7 @@ SET(COMMON_LIBS
   SALOMELocalTrace
   SALOMEBasics
   SalomeIDLKernel
-  ${LIBXML_LIBS}
+  ${LIBXML2_LIBRARIES}
 )
 
 SET(SalomeCatalog_SOURCES
@@ -45,19 +45,17 @@ SET(SalomeCatalog_SOURCES
   SALOME_ModuleCatalog_impl.cxx
   SALOME_ModuleCatalog_Acomponent_impl.cxx
 )
+ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS})
 
-ADD_LIBRARY(SalomeCatalog SHARED ${SalomeCatalog_SOURCES})
-SET_TARGET_PROPERTIES(SalomeCatalog PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_LIBRARY(SalomeCatalog ${SalomeCatalog_SOURCES})
 TARGET_LINK_LIBRARIES(SalomeCatalog ${COMMON_LIBS})
 INSTALL(TARGETS SalomeCatalog DESTINATION ${KERNEL_salomelib_LIBS})
 
 ADD_EXECUTABLE(SALOME_ModuleCatalog_Server SALOME_ModuleCatalog_Server.cxx)
-SET_TARGET_PROPERTIES(SALOME_ModuleCatalog_Server PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOME_ModuleCatalog_Server SalomeCatalog ${COMMON_LIBS} ${OMNIORB_LIBS})
+TARGET_LINK_LIBRARIES(SALOME_ModuleCatalog_Server SalomeCatalog ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
 
 ADD_EXECUTABLE(SALOME_ModuleCatalog_Client SALOME_ModuleCatalog_Client.cxx)
-SET_TARGET_PROPERTIES(SALOME_ModuleCatalog_Client PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOME_ModuleCatalog_Client SalomeCatalog ${COMMON_LIBS} ${OMNIORB_LIBS})
+TARGET_LINK_LIBRARIES(SALOME_ModuleCatalog_Client SalomeCatalog ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
 
 INSTALL(TARGETS SALOME_ModuleCatalog_Server SALOME_ModuleCatalog_Client DESTINATION ${KERNEL_salomebin_BINS})
 
index 8d22ebc635bf385119b570aa160919d637eb96ef..f50803bc78a7a6624726c2fc5aa9f4d4a6dd2db8 100755 (executable)
@@ -17,7 +17,6 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-FIND_PACKAGE(SWIG REQUIRED)
 INCLUDE(${SWIG_USE_FILE})
 
 SET_SOURCE_FILES_PROPERTIES(NOTIFICATION.i PROPERTIES CPLUSPLUS ON)
@@ -27,7 +26,7 @@ SET_SOURCE_FILES_PROPERTIES(NOTIFICATIONPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS
 INCLUDE_DIRECTORIES(
   ${PYTHON_INCLUDE_DIRS}
   ${PTHREAD_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_CURRENT_SOURCE_DIR}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../Notification
@@ -36,8 +35,8 @@ INCLUDE_DIRECTORIES(
   )
 
 SWIG_ADD_MODULE(libNOTIFICATION python NOTIFICATION.i NOTIFICATION_Swig.cxx)
-SWIG_LINK_LIBRARIES(libNOTIFICATION ${PYTHON_LIBS} SalomeNotification)
-SET_TARGET_PROPERTIES(_libNOTIFICATION PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+SWIG_LINK_LIBRARIES(libNOTIFICATION ${PYTHON_LIBRARIES} SalomeNotification)
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS})
 
 IF(${MACHINE} STREQUAL WINDOWS)
   SET_TARGET_PROPERTIES(_libNOTIFICATION PROPERTIES DEBUG_OUTPUT_NAME _libNOTIFICATION_d)
@@ -47,4 +46,4 @@ INSTALL(TARGETS _libNOTIFICATION DESTINATION ${KERNEL_salomepythondir})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
 INSTALL(FILES ${COMON_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libNOTIFICATION.py DESTINATION ${KERNEL_salomepythondir})
\ No newline at end of file
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libNOTIFICATION.py DESTINATION ${KERNEL_salomepythondir})
index b2542217b333e21ec85c361ff4309b78cf615426..8859acd399bc1ffffd4dbfeab469b92f3e2576b6 100755 (executable)
@@ -18,7 +18,7 @@
 #
 
 INCLUDE_DIRECTORIES(
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${PTHREAD_INCLUDE_DIRS}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
@@ -33,8 +33,8 @@ SET(SalomeNS_SOURCES
   NamingService_WaitForServerReadiness.cxx
 )
 
-ADD_LIBRARY(SalomeNS SHARED ${SalomeNS_SOURCES})
-SET_TARGET_PROPERTIES(SalomeNS PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+ADD_LIBRARY(SalomeNS ${SalomeNS_SOURCES})
 TARGET_LINK_LIBRARIES(SalomeNS OpUtil)
 INSTALL(TARGETS SalomeNS DESTINATION ${KERNEL_salomelib_LIBS})
 
index 6f675c91d209abd9488baa64dd48f485cf0e580a..ad43dbd1c2f4ce618a276bce4ccd71cb452625fd 100755 (executable)
@@ -20,7 +20,7 @@
 INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIRS}
   ${CPPUNIT_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../../NamingService
   ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
@@ -37,12 +37,14 @@ INCLUDE_DIRECTORIES(
 SET(COMMON_LIBS
     ${CPPUNIT_LIBS}
     SalomeNS
-    ${OMNIORB_LIBS}
+    ${OMNIORB_LIBRARIES}
+    ${PLATFORM_LIBS}
 )
 
-ADD_LIBRARY(NamingServiceTest SHARED NamingServiceTest.cxx)
-SET_TARGET_PROPERTIES(NamingServiceTest PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(NamingServiceTest ${COMMON_LIBS} ${PLATFORM_LIBS})
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+
+ADD_LIBRARY(NamingServiceTest NamingServiceTest.cxx)
+TARGET_LINK_LIBRARIES(NamingServiceTest ${COMMON_LIBS})
 INSTALL(TARGETS NamingServiceTest DESTINATION ${KERNEL_salomelib_LIBS})
 
 SET(TestNamingService_LIBS
@@ -59,8 +61,7 @@ SET(TestNamingService_LIBS
 )
 
 ADD_EXECUTABLE(TestNamingService TestNamingService.cxx)
-SET_TARGET_PROPERTIES(TestNamingService PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestNamingService ${TestNamingService_LIBS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(TestNamingService ${TestNamingService_LIBS})
 INSTALL(TARGETS TestNamingService DESTINATION ${KERNEL_salomebin_BINS})
 
 # Executable scripts to be installed
index 571ff7814e1a67aeb1f62a0dc04b7ce4674a37c5..e143f759eeff2d057c16bc0e75e09e3fca904ab7 100755 (executable)
@@ -18,7 +18,7 @@
 #
 
 INCLUDE_DIRECTORIES(
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${PTHREAD_INCLUDE_DIRS}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
@@ -30,7 +30,7 @@ SET(COMMON_LIBS
   OpUtil
   SALOMELocalTrace
   SALOMEBasics
-  ${OMNIORB_LIBS}
+  ${OMNIORB_LIBRARIES}
 )
 
 SET(SalomeNotification_SOURCES
@@ -39,8 +39,9 @@ SET(SalomeNotification_SOURCES
   NOTIFICATION_Consumer.cxx
 )
 
-ADD_LIBRARY(SalomeNotification SHARED ${SalomeNotification_SOURCES}) 
-SET_TARGET_PROPERTIES(SalomeNotification PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS})
+
+ADD_LIBRARY(SalomeNotification ${SalomeNotification_SOURCES}) 
 TARGET_LINK_LIBRARIES(SalomeNotification ${COMMON_LIBS})
 INSTALL(TARGETS SalomeNotification DESTINATION ${KERNEL_salomelib_LIBS})
 
index bbaad6bfc0b3ccb638014f7c9d9716fc812edfb9..f17c1e472ef14fb996942a2dd75424c83c9e09d7 100755 (executable)
@@ -18,8 +18,8 @@
 #
 
 INCLUDE_DIRECTORIES(
-  ${OMNIORB_INCLUDE_DIRS}
-  ${MPI_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
+  ${MPI_CXX_INCLUDE_PATH}
   ${PYTHON_INCLUDE_DIRS}
   ${PACO_INCLUDE_DIRS}
   ${CMAKE_BINARY_DIR}/salome_adm
@@ -46,9 +46,9 @@ SET(COMMON_LIBS
   SalomeHDFPersist
   SalomeParallelIDLKernel
   SalomeIDLKernel
-  ${CORBA_LIBS}
+  ${OMNIORB_LIBRARIES}
   ${PACO_LIBS}
-  ${PYTHON_LIBS}
+  ${PYTHON_LIBRARIES}
 )
 
 SET(SalomeParallelContainer_SOURCES
@@ -59,30 +59,29 @@ SET(SalomeParallelContainer_SOURCES
   SALOME_ParallelGlobalProcessVar_i.cxx
 )
 
-ADD_LIBRARY(SalomeParallelContainer SHARED ${SalomeParallelContainer_SOURCES})
-SET_TARGET_PROPERTIES(SalomeParallelContainer PROPERTIES COMPILE_FLAGS "${ONMIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PACO_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeParallelContainer ${COMMON_LIBS} ${MPI_LIBS})
+ADD_DEFINITIONS(${ONMIORB_DEFINITIONS} ${MPI_CXX_COMPILE_FLAGS} ${PACO_DEFINITIONS})
+
+ADD_LIBRARY(SalomeParallelContainer ${SalomeParallelContainer_SOURCES})
+TARGET_LINK_LIBRARIES(SalomeParallelContainer ${COMMON_LIBS} ${MPI_CXX_LIBRARIES})
 INSTALL(TARGETS Registry DESTINATION ${KERNEL_salomelib_LIBS})
 
-IF(MPI_IS_OK)
+IF(SALOME_USE_MPI)
   SET(SALOME_ParallelContainerProxyMpi_LIBS
     SalomeParallelContainer
     ${PaCO_dummy}
     ${PaCO_mpi}
     ${PaCO_omnithread}
-    ${MPI_LIBS}
+    ${MPI_CXX_LIBRARIES}
     ${COMMON_LIBS}
   )
   ADD_EXECUTABLE(SALOME_ParallelContainerProxyMpi SALOME_Registry_Server.cxx)
-  SET_TARGET_PROPERTIES(SALOME_ParallelContainerProxyMpi PROPERTIES COMPILE_FLAGS "${ONMIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PACO_DEFINITIONS}")
   TARGET_LINK_LIBRARIES(SALOME_ParallelContainerProxyMpi ${SALOME_ParallelContainerProxyMpi_LIBS})
 
   ADD_EXECUTABLE(SALOME_ParallelContainerNodeMpi SALOME_ParallelContainerNodeMpi.cxx)
-  SET_TARGET_PROPERTIES(SALOME_ParallelContainerNodeMpi PROPERTIES COMPILE_FLAGS "${ONMIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PACO_DEFINITIONS}")
   TARGET_LINK_LIBRARIES(SALOME_ParallelContainerNodeMpi ${SALOME_ParallelContainerProxyMpi_LIBS})
 
   INSTALL(TARGETS SALOME_ParallelContainerProxyMpi SALOME_ParallelContainerNodeMpi DESTINATION ${KERNEL_salomebin_BINS})
-ENDIF(MPI_IS_OK)
+ENDIF(SALOME_USE_MPI)
 
 SET(SALOME_ParallelContainerProxyDummy_LIBS
   SalomeParallelContainer
@@ -92,11 +91,9 @@ SET(SALOME_ParallelContainerProxyDummy_LIBS
 )
 
 ADD_EXECUTABLE(SALOME_ParallelContainerProxyDummy SALOME_ParallelContainerProxyDummy.cxx)
-SET_TARGET_PROPERTIES(SALOME_ParallelContainerProxyDummy PROPERTIES COMPILE_FLAGS "${ONMIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PACO_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(SALOME_ParallelContainerProxyDummy ${SALOME_ParallelContainerProxyDummy_LIBS})
 
 ADD_EXECUTABLE(SALOME_ParallelContainerNodeDummy SALOME_ParallelContainerNodeDummy.cxx)
-SET_TARGET_PROPERTIES(SALOME_ParallelContainerNodeDummy PROPERTIES COMPILE_FLAGS "${ONMIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PACO_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(SALOME_ParallelContainerNodeDummy ${SALOME_ParallelContainerProxyDummy_LIBS})
 
 INSTALL(TARGETS SALOME_ParallelContainerNodeDummy SALOME_ParallelContainerProxyDummy DESTINATION ${KERNEL_salomebin_BINS})
index 15488067246aa779430651e6f126ad4a78c0147e..64ca0359bcd73a261e9698c8f050662766981eb2 100755 (executable)
@@ -19,7 +19,7 @@
 
 INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
@@ -28,8 +28,8 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_BINARY_DIR}/idl
 )
 
-ADD_LIBRARY(Registry SHARED RegistryConnexion.cxx RegistryService.cxx)
-SET_TARGET_PROPERTIES(Registry PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_LIBRARY(Registry RegistryConnexion.cxx RegistryService.cxx)
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
 TARGET_LINK_LIBRARIES(Registry SalomeNS OpUtil SALOMELocalTrace SalomeIDLKernel ${PLATFORM_LIBS})
 INSTALL(TARGETS Registry DESTINATION ${KERNEL_salomelib_LIBS})
 
@@ -40,12 +40,10 @@ SET(SALOME_Registry_Server_LIBS
  OpUtil
  SALOMELocalTrace
  SALOMEBasics
- ${OMNIORB_LIBS}
  ${PLATFORM_LIBS}
 )
 
 ADD_EXECUTABLE(SALOME_Registry_Server SALOME_Registry_Server.cxx)
-SET_TARGET_PROPERTIES(SALOME_Registry_Server PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(SALOME_Registry_Server ${SALOME_Registry_Server_LIBS})
 INSTALL(TARGETS SALOME_Registry_Server DESTINATION ${KERNEL_salomebin_BINS})
 
index 10cb294ad2d5b228773aae952727f487266cad37..4d949021c84c464c946b7e856e65dcc04f0b1a03 100755 (executable)
@@ -18,9 +18,9 @@
 #
 
 INCLUDE_DIRECTORIES(
-  ${LIBXML_INCLUDE_DIRS}
+  ${LIBXML2_INCLUDE_DIR}
   ${PTHREAD_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
@@ -29,8 +29,6 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_BINARY_DIR}/idl
 )
 
-# This local variable defines the list of FLAGS common to all target in this package.
-SET(COMMON_FLAGS "${OMNIORB_DEFINITIONS} ${LIBXML_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 
 # This local variable defines the list of dependant libraries common to all target in this package.
 SET(COMMON_LIBS
@@ -38,7 +36,7 @@ SET(COMMON_LIBS
   OpUtil
   SALOMEBasics
   SalomeIDLKernel
-  ${LIBXML_LIBS}
+  ${LIBXML2_LIBRARIES}
 )
 
 SET(ResourcesManager_SOURCES
@@ -48,14 +46,14 @@ SET(ResourcesManager_SOURCES
     ResourcesManager.cxx
 )
 
-ADD_LIBRARY(ResourcesManager SHARED ${ResourcesManager_SOURCES})
-SET_TARGET_PROPERTIES(ResourcesManager PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(ResourcesManager SALOMEBasics OpUtil ${LIBXML_LIBS})
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${LIBXML2_DEFINITIONS} ${PLATFORM_DEFINITIONS})
+
+ADD_LIBRARY(ResourcesManager ${ResourcesManager_SOURCES})
+TARGET_LINK_LIBRARIES(ResourcesManager SALOMEBasics OpUtil ${LIBXML2_LIBRARIES})
 INSTALL(TARGETS ResourcesManager DESTINATION ${KERNEL_salomelib_LIBS})
 
 IF(NOT WITHONLYLAUNCHER)
-  ADD_LIBRARY(SalomeResourcesManager SHARED SALOME_ResourcesManager.cxx)
-  SET_TARGET_PROPERTIES(SalomeResourcesManager PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
+  ADD_LIBRARY(SalomeResourcesManager SALOME_ResourcesManager.cxx)
   TARGET_LINK_LIBRARIES(SalomeResourcesManager ResourcesManager ${COMMON_LIBS})
   INSTALL(TARGETS SalomeResourcesManager DESTINATION ${KERNEL_salomelib_LIBS})
 ENDIF(NOT WITHONLYLAUNCHER)
index 11a5dbaf0ba8c356992cf60c99928cd85959b341..7d6201b2a01ce7cb4222eebf256968f4834c8cb6 100755 (executable)
@@ -19,9 +19,9 @@
 
 INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${HDF5_INCLUDE_DIRS}
-  ${BOOST_INCLUDE_DIRS}
+  ${Boost_INCLUDE_DIRS}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../HDFPersist
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
@@ -36,7 +36,11 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_BINARY_DIR}/idl
 )
 
-SET(COMMON_FLAGS "${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS})
+IF(WINDOWS)
+  ADD_DEFINITIONS(-DNOGDI)
+ENDIF(WINDOWS)
+
 SET(COMMON_LIBS
   TOOLSDS
   SalomeNS
@@ -49,7 +53,7 @@ SET(COMMON_LIBS
   SalomeGenericObj
   SalomeLifeCycleCORBA
   SalomeIDLKernel
-  ${HDF5_LIBS}
+  ${HDF5_C_LIBRARIES}
 )
 
 SET(SalomeDS_SOURCES
@@ -137,114 +141,18 @@ SET(SalomeDS_SOURCES
   SALOMEDS_AttributeParameter.cxx
   SALOMEDS_AttributeString.cxx
   SALOMEDS_IParameters.cxx
-  SALOMEDS_AttLong_i.hxx
-  SALOMEDS_AttReal_i.hxx
-  SALOMEDS_AttributeComment.hxx
-  SALOMEDS_AttributeComment_i.hxx
-  SALOMEDS_AttributeDrawable.hxx
-  SALOMEDS_AttributeDrawable_i.hxx
-  SALOMEDS_AttributeExpandable.hxx
-  SALOMEDS_AttributeExpandable_i.hxx
-  SALOMEDS_AttributeExternalFileDef.hxx
-  SALOMEDS_AttributeExternalFileDef_i.hxx
-  SALOMEDS_AttributeFileType.hxx
-  SALOMEDS_AttributeFileType_i.hxx
-  SALOMEDS_AttributeFlags.hxx
-  SALOMEDS_AttributeFlags_i.hxx
-  SALOMEDS_AttributeGraphic.hxx
-  SALOMEDS_AttributeGraphic_i.hxx
-  SALOMEDS_AttributeInteger.hxx
-  SALOMEDS_AttributeInteger_i.hxx
-  SALOMEDS_AttributeIOR.hxx
-  SALOMEDS_AttributeIOR_i.hxx
-  SALOMEDS_AttributeLocalID.hxx
-  SALOMEDS_AttributeLocalID_i.hxx
-  SALOMEDS_AttributeName.hxx
-  SALOMEDS_AttributeName_i.hxx
-  SALOMEDS_AttributeOpened.hxx
-  SALOMEDS_AttributeOpened_i.hxx
-  SALOMEDS_AttributePersistentRef.hxx
-  SALOMEDS_AttributePersistentRef_i.hxx
-  SALOMEDS_AttributePixMap.hxx
-  SALOMEDS_AttributePixMap_i.hxx
-  SALOMEDS_AttributePythonObject.hxx
-  SALOMEDS_AttributePythonObject_i.hxx
-  SALOMEDS_AttributeReal.hxx
-  SALOMEDS_AttributeReal_i.hxx
-  SALOMEDS_AttributeSelectable.hxx
-  SALOMEDS_AttributeSelectable_i.hxx
-  SALOMEDS_AttributeSequenceOfInteger.hxx
-  SALOMEDS_AttributeSequenceOfInteger_i.hxx
-  SALOMEDS_AttributeSequenceOfReal.hxx
-  SALOMEDS_AttributeSequenceOfReal_i.hxx
-  SALOMEDS_Attributes.hxx
-  SALOMEDS_AttributeStudyProperties.hxx
-  SALOMEDS_AttributeStudyProperties_i.hxx
-  SALOMEDS_AttributeTableOfInteger.hxx
-  SALOMEDS_AttributeTableOfInteger_i.hxx
-  SALOMEDS_AttributeTableOfReal.hxx
-  SALOMEDS_AttributeTableOfReal_i.hxx
-  SALOMEDS_AttributeTableOfString.hxx
-  SALOMEDS_AttributeTableOfString_i.hxx
-  SALOMEDS_AttributeTarget.hxx
-  SALOMEDS_AttributeTarget_i.hxx
-  SALOMEDS_AttributeTextColor.hxx
-  SALOMEDS_AttributeTextColor_i.hxx
-  SALOMEDS_AttributeTextHighlightColor.hxx
-  SALOMEDS_AttributeTextHighlightColor_i.hxx
-  SALOMEDS_AttributeTreeNode.hxx
-  SALOMEDS_AttributeTreeNode_i.hxx
-  SALOMEDS_AttributeUserID.hxx
-  SALOMEDS_AttributeUserID_i.hxx
-  SALOMEDS_BasicAttributeFactory.hxx
-  SALOMEDS_BasicAttribute_i.hxx
-  SALOMEDS_Callback_i.hxx
-  SALOMEDS_ChildIterator.hxx
-  SALOMEDS_ChildIterator_i.hxx
-  SALOMEDS_ClientAttributes.hxx
-  SALOMEDS_Driver_i.hxx
-  SALOMEDS_GenericAttribute.hxx
-  SALOMEDS_GenericAttribute_i.hxx
-  SALOMEDS.hxx
-  SALOMEDS_SComponent.hxx
-  SALOMEDS_SComponent_i.hxx
-  SALOMEDS_SComponentIterator.hxx
-  SALOMEDS_SComponentIterator_i.hxx
-  SALOMEDS_SObject.hxx
-  SALOMEDS_SObject_i.hxx
-  SALOMEDS_StudyBuilder.hxx
-  SALOMEDS_StudyBuilder_i.hxx
-  SALOMEDS_Study.hxx
-  SALOMEDS_Study_i.hxx
-  SALOMEDS_StudyManager.hxx
-  SALOMEDS_StudyManager_i.hxx
-  SALOMEDS_UseCaseBuilder.hxx
-  SALOMEDS_UseCaseBuilder_i.hxx
-  SALOMEDS_UseCaseIterator.hxx
-  SALOMEDS_UseCaseIterator_i.hxx
-  SALOMEDS_AttributeParameter.hxx
-  SALOMEDS_AttributeParameter_i.hxx
-  SALOMEDS_AttributeString.hxx
-  SALOMEDS_AttributeString_i.hxx
-  SALOMEDS_TMPFile_i.hxx
 )
 
-IF(WINDOWS)
-  SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOGDI")
-ENDIF(WINDOWS)
 
-ADD_LIBRARY(SalomeDS SHARED ${SalomeDS_SOURCES})
-SET_TARGET_PROPERTIES(SalomeDS PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
+ADD_LIBRARY(SalomeDS ${SalomeDS_SOURCES})
 TARGET_LINK_LIBRARIES(SalomeDS ${COMMON_LIBS})
 INSTALL(TARGETS SalomeDS DESTINATION ${KERNEL_salomelib_LIBS})
 
 ADD_EXECUTABLE(SALOMEDS_Server SALOMEDS_Server.cxx)
-SET_TARGET_PROPERTIES(SALOMEDS_Server PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(SALOMEDS_Server SalomeDS SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBS})
+TARGET_LINK_LIBRARIES(SALOMEDS_Server SalomeDS SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
 
 ADD_EXECUTABLE(SALOMEDS_Client SALOMEDS_Client.cxx)
-SET_TARGET_PROPERTIES(SALOMEDS_Client PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(SALOMEDS_Client SalomeDS SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBS})
+TARGET_LINK_LIBRARIES(SALOMEDS_Client SalomeDS SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
 
 INSTALL(TARGETS SALOMEDS_Server SALOMEDS_Client DESTINATION ${KERNEL_salomebin_BINS})
 
index 0693852569b897ccba059479bad690296900fbd3..32247f24bfb32845b34befeaa42cfd9ba86bb770 100755 (executable)
@@ -18,9 +18,8 @@
 #
 
 INCLUDE_DIRECTORIES(
-  ${PTHREAD_INCLUDE_DIRS}
   ${CPPUNIT_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${BOOST_INCLUDE_DIRS}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
@@ -65,19 +64,18 @@ SET(COMMON_LIBS
  SalomeIDLKernel
 )
 
-SET(COMMON_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS})
+
 IF(WINDOWS)
-  SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOGDI")
+  ADD_DEFINITIONS(-DNOGDI)
 ENDIF(WINDOWS)
 
-ADD_LIBRARY(SALOMEDSTest SHARED SALOMEDSTest.cxx)
-SET_TARGET_PROPERTIES(SALOMEDSTest PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
+ADD_LIBRARY(SALOMEDSTest SALOMEDSTest.cxx)
 TARGET_LINK_LIBRARIES(SALOMEDSTest ${COMMON_LIBS})
 INSTALL(TARGETS SALOMEDSTest DESTINATION ${KERNEL_salomelib_LIBS})
 
 ADD_EXECUTABLE(TestSALOMEDS TestSALOMEDS.cxx)
-SET_TARGET_PROPERTIES(TestSALOMEDS PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestSALOMEDS SALOMEDSTest SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBS})
+TARGET_LINK_LIBRARIES(TestSALOMEDS SALOMEDSTest SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
 INSTALL(TARGETS TestSALOMEDS DESTINATION ${KERNEL_salomebin_BINS})
 
 # Executable scripts to be installed
index 84df7a3836767a14798ecc78d38a9ec5e9cb65cb..1f70b295a78d5f17810f33fe1ddd090ba60e9bba 100755 (executable)
 #
 
 INCLUDE_DIRECTORIES(
-  ${OMNIORB_INCLUDE_DIRS}
-  ${BOOST_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
+  ${Boost_INCLUDE_DIRS}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_BINARY_DIR}/idl
 )
 
-ADD_LIBRARY(SalomeDSClient SHARED SALOMEDSClient_ClientFactory.cxx)
-SET_TARGET_PROPERTIES(SalomeDSClient PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+
+ADD_LIBRARY(SalomeDSClient SALOMEDSClient_ClientFactory.cxx)
 TARGET_LINK_LIBRARIES(SalomeDSClient SalomeIDLKernel)
 INSTALL(TARGETS SalomeDSClient DESTINATION ${KERNEL_salomelib_LIBS})
 
index 1ee316e87227908f4df606a9c473a93a160016b3..e8a96c6750ad12a79524b40cb8a38e28534ed028 100755 (executable)
 #
 
 INCLUDE_DIRECTORIES(
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${PTHREAD_INCLUDE_DIRS}
   ${HDF5_INCLUDE_DIRS}
-  ${BOOST_INCLUDE_DIRS}
+  ${Boost_INCLUDE_DIRS}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
@@ -31,14 +31,14 @@ INCLUDE_DIRECTORIES(
 )
 
 # This local variable defines the list of FLAGS common to all target in this package.
-SET(COMMON_FLAGS "${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS})
 
 # This local variable defines the list of dependant libraries common to all target in this package.  
 SET(COMMON_LIBS
   SALOMEBasics
   SalomeHDFPersist
   DF
-  ${HDF5_LIBS}
+  ${HDF5_C_LIBRARIES}
 )
 
 SET(SalomeDSImpl_SOURCES
@@ -144,13 +144,11 @@ SET(SalomeDSImpl_SOURCES
   SALOMEDSImpl_ScalarVariable.hxx
 ) 
 
-ADD_LIBRARY(SalomeDSImpl SHARED ${SalomeDSImpl_SOURCES})
-SET_TARGET_PROPERTIES(SalomeDSImpl PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
+ADD_LIBRARY(SalomeDSImpl ${SalomeDSImpl_SOURCES})
 TARGET_LINK_LIBRARIES(SalomeDSImpl SALOMELocalTrace ${COMMON_LIBS} ${PLATFORM_LIBS})
 INSTALL(TARGETS SalomeDSImpl DESTINATION ${KERNEL_salomelib_LIBS})
 
 ADD_EXECUTABLE(testDS testDS.cxx)
-SET_TARGET_PROPERTIES(testDS PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
 TARGET_LINK_LIBRARIES(testDS SalomeDSImpl ${COMMON_LIBS} ${PLATFORM_LIBS})
 INSTALL(TARGETS testDS DESTINATION ${KERNEL_salomebin_BINS})
 
index d5397c2f07cc61d3eb6471e92442e678d4a812fe..112f533edcf9a536e3f44fd30bd02ab4f4725dae 100755 (executable)
@@ -18,9 +18,8 @@
 #
 
 INCLUDE_DIRECTORIES(
-  ${PTHREAD_INCLUDE_DIRS}
   ${CPPUNIT_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${BOOST_INCLUDE_DIRS}
   ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
   ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test
@@ -39,9 +38,6 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_BINARY_DIR}/idl
 )
 
-# This local variable defines the list of FLAGS common to all target in this package.
-SET(COMMON_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-
 # This local variable defines the list of dependant libraries common to all target in this package.
 SET(COMMON_LIBS
   ${CPPUNIT_LIBS}
@@ -62,13 +58,13 @@ SET(COMMON_LIBS
   SalomeIDLKernel
 )  
 
-ADD_LIBRARY(SALOMEDSImplTest SHARED SALOMEDSImplTest.cxx)
-SET_TARGET_PROPERTIES(SALOMEDSImplTest PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS})
+
+ADD_LIBRARY(SALOMEDSImplTest SALOMEDSImplTest.cxx)
 TARGET_LINK_LIBRARIES(SALOMEDSImplTest ${COMMON_LIBS})
 INSTALL(TARGETS SALOMEDSImplTest DESTINATION ${KERNEL_salomelib_LIBS})
 
 ADD_EXECUTABLE(TestSALOMEDSImpl TestSALOMEDSImpl.cxx)
-SET_TARGET_PROPERTIES(TestSALOMEDSImpl PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
 TARGET_LINK_LIBRARIES(TestSALOMEDSImpl SALOMEDSImplTest SalomeDSImpl NamingServiceTest ${COMMON_LIBS})
 INSTALL(TARGETS TestSALOMEDSImpl DESTINATION ${KERNEL_salomebin_BINS})
 
index 6ac53683f96d6eb3f240fb76ed4d2783ed3dad04..aff069241c168c360a0e39179edbe8076eee1b35 100755 (executable)
@@ -19,7 +19,6 @@
 
 INCLUDE_DIRECTORIES(
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
-  ${PTHREAD_INCLUDE_DIRS}
 )
 
 SET(COMMON_HEADERS
@@ -41,9 +40,8 @@ SET(SALOMELocalTrace_SOURCES
   SALOME_LocalTrace.hxx
 )
 
-ADD_LIBRARY(SALOMELocalTrace SHARED ${SALOMELocalTrace_SOURCES})
-SET_TARGET_PROPERTIES(SALOMELocalTrace PROPERTIES COMPILE_FLAGS "${PTHREAD_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOMELocalTrace SALOMEBasics ${PLATFORM_LIBS} ${PTHREAD_LIBS})
+ADD_LIBRARY(SALOMELocalTrace ${SALOMELocalTrace_SOURCES})
+TARGET_LINK_LIBRARIES(SALOMELocalTrace SALOMEBasics ${PLATFORM_LIBS} ${CMAKE_THREAD_LIBS_INIT})
 INSTALL(TARGETS SALOMELocalTrace DESTINATION ${KERNEL_salomelib_LIBS})
 
 INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${KERNEL_salomeinclude_HEADERS})
index a80528ca37ec235080e61a8f7255d003cdadb3c7..8725d2c9c9da088ac0b537ab2f41f6dac22a2393 100755 (executable)
 
 INCLUDE_DIRECTORIES(
   ${CPPUNIT_INCLUDE_DIRS}
-  ${PTHREAD_INCLUDE_DIRS}
   ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
   ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test
   ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace
 )
 
-ADD_LIBRARY(SALOMELocalTraceTest SHARED SALOMELocalTraceTest.cxx)
-SET_TARGET_PROPERTIES(SALOMELocalTraceTest PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PTHREAD_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOMELocalTraceTest SALOMELocalTrace ${CPPUNIT_LIBS} ${PTHREAD_LIBS} ${PLATFORM_LIBS})
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS})
+
+ADD_LIBRARY(SALOMELocalTraceTest SALOMELocalTraceTest.cxx)
+TARGET_LINK_LIBRARIES(SALOMELocalTraceTest SALOMELocalTrace ${CPPUNIT_LIBS} ${CMAKE_THREAD_LIBS_INIT} ${PLATFORM_LIBS})
 INSTALL(TARGETS SALOMELocalTraceTest DESTINATION ${KERNEL_salomelib_LIBS})
 
 ADD_EXECUTABLE(TestSALOMELocalTrace TestSALOMELocalTrace.cxx)
-SET_TARGET_PROPERTIES(TestSALOMELocalTrace PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(TestSALOMELocalTrace SALOMELocalTraceTest SALOMELocalTrace SALOMEBasics ${CPPUNIT_LIBS} ${PLATFORM_LIBS})
 INSTALL(TARGETS TestSALOMELocalTrace DESTINATION ${KERNEL_salomebin_BINS})
 
index 6e9ea5bfe3bf49e395a87547e77ae898909e5f42..f8da03724d57dd8e8fbebb10a0013ff0af347de6 100755 (executable)
@@ -18,7 +18,7 @@
 #
 
 INCLUDE_DIRECTORIES(
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${PTHREAD_INCLUDE_DIRS}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
@@ -26,10 +26,10 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_BINARY_DIR}/idl
 )
 
-ADD_LIBRARY(with_loggerTraceCollector SHARED SALOMETraceCollector.cxx TraceCollector_WaitForServerReadiness.cxx)
-SET_TARGET_PROPERTIES(with_loggerTraceCollector PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PTHREAD_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${PTHREAD_DEFINITIONS})
+ADD_LIBRARY(with_loggerTraceCollector SALOMETraceCollector.cxx TraceCollector_WaitForServerReadiness.cxx)
 
-TARGET_LINK_LIBRARIES(with_loggerTraceCollector SALOMELocalTrace SalomeIDLKernel ${OMNIORB_LIBS} ${PTHREAD_LIBS})
+TARGET_LINK_LIBRARIES(with_loggerTraceCollector SALOMELocalTrace SalomeIDLKernel ${OMNIORB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
 INSTALL(TARGETS with_loggerTraceCollector DESTINATION ${KERNEL_salomelib_LIBS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
index 570a8595d9a534f9619023573cf86eee05be341a..f5896f4b6ae6fcd5c742105d83735b454120d02f 100755 (executable)
@@ -19,7 +19,6 @@
 
 INCLUDE_DIRECTORIES(
   ${CPPUNIT_INCLUDE_DIRS}
-  ${PTHREAD_INCLUDE_DIRS}
   ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
   ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test
   ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace
@@ -31,17 +30,17 @@ SET(COMMON_LIBS
   SALOMELocalTraceTest
   SALOMELocalTrace
   SALOMEBasics
-  ${PTHREAD_LIBS}
+  ${CMAKE_THREAD_LIBS_INIT}
   ${PLATFORM_LIBS}
 )
 
-ADD_LIBRARY(SALOMETraceCollectorTest SHARED SALOMETraceCollectorTest.cxx)
-SET_TARGET_PROPERTIES(SALOMETraceCollectorTest PROPERTIES COMPILE_FLAGS "${PTHREAD_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS})
+
+ADD_LIBRARY(SALOMETraceCollectorTest SALOMETraceCollectorTest.cxx)
 TARGET_LINK_LIBRARIES(SALOMETraceCollectorTest ${COMMON_LIBS})
 INSTALL(TARGETS SALOMETraceCollectorTest DESTINATION ${KERNEL_salomelib_LIBS})
 
 ADD_EXECUTABLE(TestSALOMETraceCollector TestSALOMETraceCollector.cxx)
-SET_TARGET_PROPERTIES(TestSALOMETraceCollector PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(TestSALOMETraceCollector SALOMETraceCollectorTest ${COMMON_LIBS})
 INSTALL(TARGETS TestSALOMETraceCollector DESTINATION ${KERNEL_salomebin_BINS})
 
index 496d9a42d2aa55efdf1a14d9c5fde05e0a88f384..7b000e2832744d6296c5e86a23f6b43df6f4def4 100755 (executable)
 #
 
 INCLUDE_DIRECTORIES(
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${HDF5_INCLUDE_DIRS}
   ${PTHREAD_INCLUDE_DIRS}
-  ${BOOST_INCLUDE_DIRS}
+  ${Boost_INCLUDE_DIRS}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
@@ -29,9 +29,9 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_BINARY_DIR}/idl
 )
 
-ADD_LIBRARY(TOOLSDS SHARED SALOMEDS_Tool.cxx)
-SET_TARGET_PROPERTIES(TOOLSDS PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TOOLSDS OpUtil SalomeIDLKernel ${OMNIORB_LIBS})
+ADD_LIBRARY(TOOLSDS SALOMEDS_Tool.cxx)
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS})
+TARGET_LINK_LIBRARIES(TOOLSDS OpUtil SalomeIDLKernel ${OMNIORB_LIBRARIES})
 INSTALL(TARGETS TOOLSDS DESTINATION ${KERNEL_salomelib_LIBS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
index d881e5e94a93e81bb8aa85e8ba0b2818698db721..32cd5bc8423bf2fb34f87d23881a95bd0cb3d446 100755 (executable)
@@ -19,7 +19,7 @@
 
 INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
@@ -51,18 +51,19 @@ SET(COMMON_LIBS
   SalomeIDLKernel
 )
 
-ADD_LIBRARY(SalomeTestComponentEngine SHARED ${SalomeTestComponentEngine_SOURCES})
-SET_TARGET_PROPERTIES(SalomeTestComponentEngine PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
+
+ADD_LIBRARY(SalomeTestComponentEngine ${SalomeTestComponentEngine_SOURCES})
 TARGET_LINK_LIBRARIES(SalomeTestComponentEngine ${COMMON_LIBS})
+
 INSTALL(TARGETS SalomeTestComponentEngine DESTINATION ${KERNEL_salomelib_LIBS})
 
 ADD_EXECUTABLE(TestLogger TestLogger.cxx)
-SET_TARGET_PROPERTIES(TestLogger PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestLogger SalomeTestComponentEngine SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBS})
+TARGET_LINK_LIBRARIES(TestLogger SalomeTestComponentEngine SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
 
 ADD_EXECUTABLE(TestContainer TestContainer.cxx)
-SET_TARGET_PROPERTIES(TestContainer PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestContainer SalomeTestComponentEngine SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBS})
+TARGET_LINK_LIBRARIES(TestContainer SalomeTestComponentEngine SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
+
 INSTALL(TARGETS TestLogger TestContainer DESTINATION ${KERNEL_salomebin_BINS})
 
 # Executable scripts to be installed
index 65038b42f2bb495317f83c09db475367a40aa7ad..8380cb94231142128a18e95b2491853efb23b106 100755 (executable)
@@ -18,8 +18,8 @@
 #
 
 INCLUDE_DIRECTORIES(
-  ${MPI_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIRS}
+  ${MPI_CXX_INCLUDE_PATH}
+  ${OMNIORB_INCLUDE_DIR}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
@@ -34,7 +34,7 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_BINARY_DIR}/idl
 )
 
-SET(COMMON_FLAGS "${OMNIORB_DEFINITIONS} ${MPI_DEFINITIONS}")
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${MPI_CXX_COMPILE_FLAGS})
 
 SET(COMMON_LIBS
   Registry
@@ -48,17 +48,15 @@ SET(COMMON_LIBS
   SalomeMPIContainer
   SalomeGenericObj
   SalomeIDLKernel
-  ${OMNIORB_LIBS}
+  ${OMNIORB_LIBRARIES}
 )
 
-ADD_LIBRARY(SalomeTestMPIComponentEngine SHARED TestMPIComponentEngine.cxx)
-SET_TARGET_PROPERTIES(SalomeTestMPIComponentEngine PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
+ADD_LIBRARY(SalomeTestMPIComponentEngine TestMPIComponentEngine.cxx)
 TARGET_LINK_LIBRARIES(SalomeTestMPIComponentEngine ${COMMON_LIBS})
 INSTALL(TARGETS SalomeTestMPIComponentEngine DESTINATION ${KERNEL_salomelib_LIBS})
 
 ADD_EXECUTABLE(TestMPIContainer TestMPIContainer.cxx)
-SET_TARGET_PROPERTIES(TestMPIContainer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(TestMPIContainer SalomeTestMPIComponentEngine ${COMMON_LIBS} ${MPI_LIBS})
+TARGET_LINK_LIBRARIES(TestMPIContainer SalomeTestMPIComponentEngine ${COMMON_LIBS} ${MPI_CXX_LIBRARIES})
 INSTALL(TARGETS TestMPIContainer DESTINATION ${KERNEL_salomebin_BINS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
index 11545cfff63aec6a81cf382cb1636545931e1a55..bc824a803686b2276d7f33458515885f0a84d1f3 100755 (executable)
@@ -18,7 +18,6 @@
 #
 
 INCLUDE_DIRECTORIES(
-  ${PTHREAD_INCLUDE_DIRS}
   ${CPPUNIT_INCLUDE_DIRS}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
@@ -38,7 +37,8 @@ SALOME_INSTALL_SCRIPTS(UnitTests.py ${KERNEL_salomescript_SCRIPTS})
 # Executables targets
 # ===============================================================
 
-SET(COMMON_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS})
+
 SET(COMMON_LIBS
   ${CPPUNIT_LIBS}
   SALOMEBasics
@@ -46,9 +46,9 @@ SET(COMMON_LIBS
   SALOMELocalTraceTest
 )
 
-IF(CORBA_GEN)
+IF(SALOME_USE_CORBA)
   INCLUDE_DIRECTORIES(
-    ${OMNIORB_INCLUDE_DIRS}
+    ${OMNIORB_INCLUDE_DIR}
     ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMETraceCollector
     ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMETraceCollector/Test
     ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
@@ -66,7 +66,7 @@ IF(CORBA_GEN)
     ${CMAKE_CURRENT_SOURCE_DIR}/../Notification
     ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager
   )
-  SET(COMMON_FLAGS "${COMMON_FLAGS} -DWITH_CORBA ${OMNIORB_DEFINITIONS}")
+  ADD_DEFINITIONS(-DWITH_CORBA ${OMNIORB_DEFINITIONS})
 
   SET(COMMON_LIBS
     ${COMMON_LIBS}
@@ -86,11 +86,10 @@ IF(CORBA_GEN)
     SalomeDS
     SALOMEDSTest
     SalomeIDLKernel
-    ${OMNIORB_LIBS}
+    ${OMNIORB_LIBRARIES}
   )
-ENDIF(CORBA_GEN)
+ENDIF(SALOME_USE_CORBA)
 
 ADD_EXECUTABLE(UnitTests UnitTests.cxx)
-SET_TARGET_PROPERTIES(UnitTests PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
 TARGET_LINK_LIBRARIES(UnitTests ${COMMON_LIBS})
 INSTALL(TARGETS UnitTests DESTINATION ${KERNEL_salomebin_BINS})
index 269d62c59f244fc8f37b30b3a18fcbe4f9cc3cc8..8d36c6458e9bf5d1a514d209f769a8f24326bb68 100755 (executable)
@@ -18,7 +18,7 @@
 #
 
 INCLUDE_DIRECTORIES(
-  ${OMNIORB_INCLUDE_DIRS}
+  ${OMNIORB_INCLUDE_DIR}
   ${PTHREAD_INCLUDE_DIRS}
   ${CMAKE_BINARY_DIR}/salome_adm
   ${CMAKE_CURRENT_SOURCE_DIR}
@@ -38,9 +38,9 @@ SET(OpUtil_SOURCES
   Utils_Mutex.cxx
 )
 
-ADD_LIBRARY(OpUtil SHARED ${OpUtil_SOURCES})
-SET_TARGET_PROPERTIES(OpUtil PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PTHREAD_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(OpUtil SALOMELocalTrace SalomeIDLKernel ${OMNIORB_LIBS} ${PTHREAD_LIBS})
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${PTHREAD_DEFINITIONS})
+ADD_LIBRARY(OpUtil ${OpUtil_SOURCES})
+TARGET_LINK_LIBRARIES(OpUtil SALOMELocalTrace SalomeIDLKernel ${OMNIORB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
 INSTALL(TARGETS OpUtil DESTINATION ${KERNEL_salomelib_LIBS})
 
 SET(COMMON_SCRIPTS
index 73f5f6bfec7c977cdecbd504cf87e5ed6a833351..998bc199cc6ecf0d50b29e7b74b47569eac0e635 100755 (executable)
@@ -37,16 +37,18 @@ SET(COMMON_LIBS
   SALOMELocalTrace
   SALOMETraceCollectorTest
   SALOMEBasics
+  ${PLATFORM_LIBS}
 )
 
-ADD_LIBRARY(UtilsTest SHARED UtilsTest.cxx)
-SET_TARGET_PROPERTIES(UtilsTest PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(UtilsTest ${COMMON_LIBS} ${PLATFORM_LIBS})
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS})
+
+ADD_LIBRARY(UtilsTest UtilsTest.cxx)
+TARGET_LINK_LIBRARIES(UtilsTest ${COMMON_LIBS} )
 INSTALL(TARGETS UtilsTest DESTINATION ${KERNEL_salomelib_LIBS})
 
 ADD_EXECUTABLE(TestUtils TestUtils.cxx)
 SET_TARGET_PROPERTIES(TestUtils PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestUtils ${COMMON_LIBS} UtilsTest ${OMNIORB_LIBS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(TestUtils ${COMMON_LIBS} UtilsTest ${OMNIORB_LIBRARIES})
 INSTALL(TARGETS TestUtils DESTINATION ${KERNEL_salomebin_BINS})
 
 SALOME_INSTALL_SCRIPTS(TestUtils.py ${KERNEL_salomescript_PYTHON})