From 4b1d610050bf388dcb54e1f80d8f04b3defb7b87 Mon Sep 17 00:00:00 2001 From: nge Date: Wed, 16 Jan 2013 18:01:24 +0000 Subject: [PATCH] Following Cotech 49 decision : update CMakeFiles Documentatuion from A. Geay will be updated by N. Geimer soon. --- CMakeLists.txt | 113 +++- idl/CMakeLists.txt | 15 +- salome_adm/cmake_files/FindOMNIORB.cmake | 500 ++++++++++-------- salome_adm/cmake_files/FindPLATFORM.cmake | 61 +-- salome_adm/cmake_files/UseOMNIORB.cmake | 21 +- src/Basics/CMakeLists.txt | 11 +- src/CMakeLists.txt | 14 +- src/Communication/CMakeLists.txt | 13 +- src/Communication/SALOME_Comm_i.cxx | 2 + src/Communication_SWIG/CMakeLists.txt | 21 +- src/Container/CMakeLists.txt | 38 +- src/DF/CMakeLists.txt | 7 +- src/DSC/DSC_Basic/CMakeLists.txt | 12 +- src/DSC/DSC_Python/CMakeLists.txt | 9 +- src/DSC/DSC_User/Basic/CMakeLists.txt | 6 +- src/DSC/DSC_User/CMakeLists.txt | 16 +- src/DSC/DSC_User/Datastream/CMakeLists.txt | 7 +- .../Datastream/Calcium/CMakeLists.txt | 18 +- .../Datastream/CorbaTypeManipulator.hxx | 2 +- .../DSC_User/Datastream/Palm/CMakeLists.txt | 10 +- .../Datastream/Palm/PalmCouplingPolicy.hxx | 2 +- src/DSC/ParallelDSC/CMakeLists.txt | 8 +- src/GenericObj/CMakeLists.txt | 6 +- src/HDFPersist/CMakeLists.txt | 58 +- src/KERNEL_PY/CMakeLists.txt | 4 +- src/KernelHelpers/CMakeLists.txt | 10 +- src/KernelHelpers/Test/CMakeLists.txt | 11 +- src/Launcher/CMakeLists.txt | 47 +- src/LifeCycleCORBA/CMakeLists.txt | 15 +- src/LifeCycleCORBA/Test/CMakeLists.txt | 10 +- src/LifeCycleCORBA_SWIG/CMakeLists.txt | 10 +- src/Logger/CMakeLists.txt | 12 +- src/MPIContainer/CMakeLists.txt | 17 +- src/ModuleCatalog/CMakeLists.txt | 16 +- src/NOTIFICATION_SWIG/CMakeLists.txt | 9 +- src/NamingService/CMakeLists.txt | 6 +- src/NamingService/Test/CMakeLists.txt | 15 +- src/Notification/CMakeLists.txt | 9 +- src/ParallelContainer/CMakeLists.txt | 25 +- src/Registry/CMakeLists.txt | 8 +- src/ResourcesManager/CMakeLists.txt | 18 +- src/SALOMEDS/CMakeLists.txt | 114 +--- src/SALOMEDS/Test/CMakeLists.txt | 14 +- src/SALOMEDSClient/CMakeLists.txt | 9 +- src/SALOMEDSImpl/CMakeLists.txt | 12 +- src/SALOMEDSImpl/Test/CMakeLists.txt | 12 +- src/SALOMELocalTrace/CMakeLists.txt | 6 +- src/SALOMELocalTrace/Test/CMakeLists.txt | 9 +- src/SALOMETraceCollector/CMakeLists.txt | 8 +- src/SALOMETraceCollector/Test/CMakeLists.txt | 9 +- src/TOOLSDS/CMakeLists.txt | 10 +- src/TestContainer/CMakeLists.txt | 15 +- src/TestMPIContainer/CMakeLists.txt | 14 +- src/UnitTests/CMakeLists.txt | 15 +- src/Utils/CMakeLists.txt | 8 +- src/Utils/Test/CMakeLists.txt | 10 +- 56 files changed, 676 insertions(+), 801 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 61bf57ba7..b19bb1384 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}") diff --git a/idl/CMakeLists.txt b/idl/CMakeLists.txt index 8dc0b75a9..d1392bd21 100755 --- a/idl/CMakeLists.txt +++ b/idl/CMakeLists.txt @@ -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) diff --git a/salome_adm/cmake_files/FindOMNIORB.cmake b/salome_adm/cmake_files/FindOMNIORB.cmake index df341c48d..0ea5cd060 100644 --- a/salome_adm/cmake_files/FindOMNIORB.cmake +++ b/salome_adm/cmake_files/FindOMNIORB.cmake @@ -1,245 +1,277 @@ -# 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() diff --git a/salome_adm/cmake_files/FindPLATFORM.cmake b/salome_adm/cmake_files/FindPLATFORM.cmake index fa06d0ec3..6b21c2238 100644 --- a/salome_adm/cmake_files/FindPLATFORM.cmake +++ b/salome_adm/cmake_files/FindPLATFORM.cmake @@ -17,25 +17,12 @@ # 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") diff --git a/salome_adm/cmake_files/UseOMNIORB.cmake b/salome_adm/cmake_files/UseOMNIORB.cmake index d6f8e6f9c..d9a41526c 100644 --- a/salome_adm/cmake_files/UseOMNIORB.cmake +++ b/salome_adm/cmake_files/UseOMNIORB.cmake @@ -17,17 +17,19 @@ # 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}) diff --git a/src/Basics/CMakeLists.txt b/src/Basics/CMakeLists.txt index 0ba895b59..3fc35ff98 100755 --- a/src/Basics/CMakeLists.txt +++ b/src/Basics/CMakeLists.txt @@ -17,10 +17,6 @@ # 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}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 931de8be9..7ad8522af 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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) diff --git a/src/Communication/CMakeLists.txt b/src/Communication/CMakeLists.txt index 796ffdded..bafc0d96e 100755 --- a/src/Communication/CMakeLists.txt +++ b/src/Communication/CMakeLists.txt @@ -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 diff --git a/src/Communication/SALOME_Comm_i.cxx b/src/Communication/SALOME_Comm_i.cxx index 98f60f5c3..124272144 100644 --- a/src/Communication/SALOME_Comm_i.cxx +++ b/src/Communication/SALOME_Comm_i.cxx @@ -22,8 +22,10 @@ #include "SALOME_Comm_i.hxx" #ifndef WIN32 +#ifndef __APPLE__ #include #endif +#endif #include "omniORB4/poa.h" #include "omnithread.h" #include "Utils_SINGLETON.hxx" diff --git a/src/Communication_SWIG/CMakeLists.txt b/src/Communication_SWIG/CMakeLists.txt index 8683fa5bd..6741aa09b 100755 --- a/src/Communication_SWIG/CMakeLists.txt +++ b/src/Communication_SWIG/CMakeLists.txt @@ -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}) diff --git a/src/Container/CMakeLists.txt b/src/Container/CMakeLists.txt index 541775c36..85c623d95 100755 --- a/src/Container/CMakeLists.txt +++ b/src/Container/CMakeLists.txt @@ -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 diff --git a/src/DF/CMakeLists.txt b/src/DF/CMakeLists.txt index 013773a91..6dfba2a5f 100755 --- a/src/DF/CMakeLists.txt +++ b/src/DF/CMakeLists.txt @@ -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}) diff --git a/src/DSC/DSC_Basic/CMakeLists.txt b/src/DSC/DSC_Basic/CMakeLists.txt index 2889e0613..678fa89a8 100755 --- a/src/DSC/DSC_Basic/CMakeLists.txt +++ b/src/DSC/DSC_Basic/CMakeLists.txt @@ -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}) diff --git a/src/DSC/DSC_Python/CMakeLists.txt b/src/DSC/DSC_Python/CMakeLists.txt index 2b83e1961..ac17d4daa 100755 --- a/src/DSC/DSC_Python/CMakeLists.txt +++ b/src/DSC/DSC_Python/CMakeLists.txt @@ -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 diff --git a/src/DSC/DSC_User/Basic/CMakeLists.txt b/src/DSC/DSC_User/Basic/CMakeLists.txt index 3a2808cbb..a99692bdc 100755 --- a/src/DSC/DSC_User/Basic/CMakeLists.txt +++ b/src/DSC/DSC_User/Basic/CMakeLists.txt @@ -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}) diff --git a/src/DSC/DSC_User/CMakeLists.txt b/src/DSC/DSC_User/CMakeLists.txt index 779f14330..ba4213549 100755 --- a/src/DSC/DSC_User/CMakeLists.txt +++ b/src/DSC/DSC_User/CMakeLists.txt @@ -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}) diff --git a/src/DSC/DSC_User/Datastream/CMakeLists.txt b/src/DSC/DSC_User/Datastream/CMakeLists.txt index 99c0dac48..ba4970b48 100755 --- a/src/DSC/DSC_User/Datastream/CMakeLists.txt +++ b/src/DSC/DSC_User/Datastream/CMakeLists.txt @@ -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}) diff --git a/src/DSC/DSC_User/Datastream/Calcium/CMakeLists.txt b/src/DSC/DSC_User/Datastream/Calcium/CMakeLists.txt index f0613a763..f45baf42a 100755 --- a/src/DSC/DSC_User/Datastream/Calcium/CMakeLists.txt +++ b/src/DSC/DSC_User/Datastream/Calcium/CMakeLists.txt @@ -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) diff --git a/src/DSC/DSC_User/Datastream/CorbaTypeManipulator.hxx b/src/DSC/DSC_User/Datastream/CorbaTypeManipulator.hxx index b7364cd5b..d026200e5 100644 --- a/src/DSC/DSC_User/Datastream/CorbaTypeManipulator.hxx +++ b/src/DSC/DSC_User/Datastream/CorbaTypeManipulator.hxx @@ -32,7 +32,7 @@ #include #include -#include +#include //#define MYDEBUG diff --git a/src/DSC/DSC_User/Datastream/Palm/CMakeLists.txt b/src/DSC/DSC_User/Datastream/Palm/CMakeLists.txt index 4976d94df..bf17efedb 100755 --- a/src/DSC/DSC_User/Datastream/Palm/CMakeLists.txt +++ b/src/DSC/DSC_User/Datastream/Palm/CMakeLists.txt @@ -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}) diff --git a/src/DSC/DSC_User/Datastream/Palm/PalmCouplingPolicy.hxx b/src/DSC/DSC_User/Datastream/Palm/PalmCouplingPolicy.hxx index f41fc138b..5703e9087 100644 --- a/src/DSC/DSC_User/Datastream/Palm/PalmCouplingPolicy.hxx +++ b/src/DSC/DSC_User/Datastream/Palm/PalmCouplingPolicy.hxx @@ -32,7 +32,7 @@ #include -#include +#include #include #include "DataIdFilter.hxx" #include "DisplayPair.hxx" diff --git a/src/DSC/ParallelDSC/CMakeLists.txt b/src/DSC/ParallelDSC/CMakeLists.txt index bb64c8313..34b56ef96 100755 --- a/src/DSC/ParallelDSC/CMakeLists.txt +++ b/src/DSC/ParallelDSC/CMakeLists.txt @@ -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}) diff --git a/src/GenericObj/CMakeLists.txt b/src/GenericObj/CMakeLists.txt index 423d1eb39..27346b684 100755 --- a/src/GenericObj/CMakeLists.txt +++ b/src/GenericObj/CMakeLists.txt @@ -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}) diff --git a/src/HDFPersist/CMakeLists.txt b/src/HDFPersist/CMakeLists.txt index 30aef7f00..ef9411f1a 100755 --- a/src/HDFPersist/CMakeLists.txt +++ b/src/HDFPersist/CMakeLists.txt @@ -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") diff --git a/src/KERNEL_PY/CMakeLists.txt b/src/KERNEL_PY/CMakeLists.txt index 676b5842e..f33511203 100755 --- a/src/KERNEL_PY/CMakeLists.txt +++ b/src/KERNEL_PY/CMakeLists.txt @@ -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}) diff --git a/src/KernelHelpers/CMakeLists.txt b/src/KernelHelpers/CMakeLists.txt index 09e211bb3..9f25eb6bb 100755 --- a/src/KernelHelpers/CMakeLists.txt +++ b/src/KernelHelpers/CMakeLists.txt @@ -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}) diff --git a/src/KernelHelpers/Test/CMakeLists.txt b/src/KernelHelpers/Test/CMakeLists.txt index f0291aaf5..2bef6951f 100755 --- a/src/KernelHelpers/Test/CMakeLists.txt +++ b/src/KernelHelpers/Test/CMakeLists.txt @@ -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}) diff --git a/src/Launcher/CMakeLists.txt b/src/Launcher/CMakeLists.txt index b314fdcc1..f8ee6e1b8 100755 --- a/src/Launcher/CMakeLists.txt +++ b/src/Launcher/CMakeLists.txt @@ -18,12 +18,12 @@ # 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) diff --git a/src/LifeCycleCORBA/CMakeLists.txt b/src/LifeCycleCORBA/CMakeLists.txt index a635b4061..335d15b22 100755 --- a/src/LifeCycleCORBA/CMakeLists.txt +++ b/src/LifeCycleCORBA/CMakeLists.txt @@ -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}) diff --git a/src/LifeCycleCORBA/Test/CMakeLists.txt b/src/LifeCycleCORBA/Test/CMakeLists.txt index 47c04bd74..e23a2dbbe 100755 --- a/src/LifeCycleCORBA/Test/CMakeLists.txt +++ b/src/LifeCycleCORBA/Test/CMakeLists.txt @@ -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}) diff --git a/src/LifeCycleCORBA_SWIG/CMakeLists.txt b/src/LifeCycleCORBA_SWIG/CMakeLists.txt index 57da32c34..3c8725edf 100755 --- a/src/LifeCycleCORBA_SWIG/CMakeLists.txt +++ b/src/LifeCycleCORBA_SWIG/CMakeLists.txt @@ -17,17 +17,16 @@ # 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) diff --git a/src/Logger/CMakeLists.txt b/src/Logger/CMakeLists.txt index 6b7c86d3c..61f3fb6be 100755 --- a/src/Logger/CMakeLists.txt +++ b/src/Logger/CMakeLists.txt @@ -18,17 +18,16 @@ # 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}) diff --git a/src/MPIContainer/CMakeLists.txt b/src/MPIContainer/CMakeLists.txt index 890118060..cdd633040 100755 --- a/src/MPIContainer/CMakeLists.txt +++ b/src/MPIContainer/CMakeLists.txt @@ -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}) diff --git a/src/ModuleCatalog/CMakeLists.txt b/src/ModuleCatalog/CMakeLists.txt index 3e8f048ef..922f4b5b0 100755 --- a/src/ModuleCatalog/CMakeLists.txt +++ b/src/ModuleCatalog/CMakeLists.txt @@ -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}) diff --git a/src/NOTIFICATION_SWIG/CMakeLists.txt b/src/NOTIFICATION_SWIG/CMakeLists.txt index 8d22ebc63..f50803bc7 100755 --- a/src/NOTIFICATION_SWIG/CMakeLists.txt +++ b/src/NOTIFICATION_SWIG/CMakeLists.txt @@ -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}) diff --git a/src/NamingService/CMakeLists.txt b/src/NamingService/CMakeLists.txt index b2542217b..8859acd39 100755 --- a/src/NamingService/CMakeLists.txt +++ b/src/NamingService/CMakeLists.txt @@ -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}) diff --git a/src/NamingService/Test/CMakeLists.txt b/src/NamingService/Test/CMakeLists.txt index 6f675c91d..ad43dbd1c 100755 --- a/src/NamingService/Test/CMakeLists.txt +++ b/src/NamingService/Test/CMakeLists.txt @@ -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 diff --git a/src/Notification/CMakeLists.txt b/src/Notification/CMakeLists.txt index 571ff7814..e143f759e 100755 --- a/src/Notification/CMakeLists.txt +++ b/src/Notification/CMakeLists.txt @@ -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}) diff --git a/src/ParallelContainer/CMakeLists.txt b/src/ParallelContainer/CMakeLists.txt index bbaad6bfc..f17c1e472 100755 --- a/src/ParallelContainer/CMakeLists.txt +++ b/src/ParallelContainer/CMakeLists.txt @@ -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}) diff --git a/src/Registry/CMakeLists.txt b/src/Registry/CMakeLists.txt index 154880672..64ca0359b 100755 --- a/src/Registry/CMakeLists.txt +++ b/src/Registry/CMakeLists.txt @@ -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}) diff --git a/src/ResourcesManager/CMakeLists.txt b/src/ResourcesManager/CMakeLists.txt index 10cb294ad..4d949021c 100755 --- a/src/ResourcesManager/CMakeLists.txt +++ b/src/ResourcesManager/CMakeLists.txt @@ -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) diff --git a/src/SALOMEDS/CMakeLists.txt b/src/SALOMEDS/CMakeLists.txt index 11a5dbaf0..7d6201b2a 100755 --- a/src/SALOMEDS/CMakeLists.txt +++ b/src/SALOMEDS/CMakeLists.txt @@ -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}) diff --git a/src/SALOMEDS/Test/CMakeLists.txt b/src/SALOMEDS/Test/CMakeLists.txt index 069385256..32247f24b 100755 --- a/src/SALOMEDS/Test/CMakeLists.txt +++ b/src/SALOMEDS/Test/CMakeLists.txt @@ -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 diff --git a/src/SALOMEDSClient/CMakeLists.txt b/src/SALOMEDSClient/CMakeLists.txt index 84df7a383..1f70b295a 100755 --- a/src/SALOMEDSClient/CMakeLists.txt +++ b/src/SALOMEDSClient/CMakeLists.txt @@ -18,14 +18,15 @@ # 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}) diff --git a/src/SALOMEDSImpl/CMakeLists.txt b/src/SALOMEDSImpl/CMakeLists.txt index 1ee316e87..e8a96c675 100755 --- a/src/SALOMEDSImpl/CMakeLists.txt +++ b/src/SALOMEDSImpl/CMakeLists.txt @@ -18,10 +18,10 @@ # 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}) diff --git a/src/SALOMEDSImpl/Test/CMakeLists.txt b/src/SALOMEDSImpl/Test/CMakeLists.txt index d5397c2f0..112f533ed 100755 --- a/src/SALOMEDSImpl/Test/CMakeLists.txt +++ b/src/SALOMEDSImpl/Test/CMakeLists.txt @@ -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}) diff --git a/src/SALOMELocalTrace/CMakeLists.txt b/src/SALOMELocalTrace/CMakeLists.txt index 6ac53683f..aff069241 100755 --- a/src/SALOMELocalTrace/CMakeLists.txt +++ b/src/SALOMELocalTrace/CMakeLists.txt @@ -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}) diff --git a/src/SALOMELocalTrace/Test/CMakeLists.txt b/src/SALOMELocalTrace/Test/CMakeLists.txt index a80528ca3..8725d2c9c 100755 --- a/src/SALOMELocalTrace/Test/CMakeLists.txt +++ b/src/SALOMELocalTrace/Test/CMakeLists.txt @@ -19,19 +19,18 @@ 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}) diff --git a/src/SALOMETraceCollector/CMakeLists.txt b/src/SALOMETraceCollector/CMakeLists.txt index 6e9ea5bfe..f8da03724 100755 --- a/src/SALOMETraceCollector/CMakeLists.txt +++ b/src/SALOMETraceCollector/CMakeLists.txt @@ -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") diff --git a/src/SALOMETraceCollector/Test/CMakeLists.txt b/src/SALOMETraceCollector/Test/CMakeLists.txt index 570a8595d..f5896f4b6 100755 --- a/src/SALOMETraceCollector/Test/CMakeLists.txt +++ b/src/SALOMETraceCollector/Test/CMakeLists.txt @@ -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}) diff --git a/src/TOOLSDS/CMakeLists.txt b/src/TOOLSDS/CMakeLists.txt index 496d9a42d..7b000e283 100755 --- a/src/TOOLSDS/CMakeLists.txt +++ b/src/TOOLSDS/CMakeLists.txt @@ -18,10 +18,10 @@ # 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") diff --git a/src/TestContainer/CMakeLists.txt b/src/TestContainer/CMakeLists.txt index d881e5e94..32cd5bc84 100755 --- a/src/TestContainer/CMakeLists.txt +++ b/src/TestContainer/CMakeLists.txt @@ -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 diff --git a/src/TestMPIContainer/CMakeLists.txt b/src/TestMPIContainer/CMakeLists.txt index 65038b42f..8380cb942 100755 --- a/src/TestMPIContainer/CMakeLists.txt +++ b/src/TestMPIContainer/CMakeLists.txt @@ -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") diff --git a/src/UnitTests/CMakeLists.txt b/src/UnitTests/CMakeLists.txt index 11545cfff..bc824a803 100755 --- a/src/UnitTests/CMakeLists.txt +++ b/src/UnitTests/CMakeLists.txt @@ -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}) diff --git a/src/Utils/CMakeLists.txt b/src/Utils/CMakeLists.txt index 269d62c59..8d36c6458 100755 --- a/src/Utils/CMakeLists.txt +++ b/src/Utils/CMakeLists.txt @@ -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 diff --git a/src/Utils/Test/CMakeLists.txt b/src/Utils/Test/CMakeLists.txt index 73f5f6bfe..998bc199c 100755 --- a/src/Utils/Test/CMakeLists.txt +++ b/src/Utils/Test/CMakeLists.txt @@ -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}) -- 2.39.2