From f12750a5cb8679449d0ae750a2a9b182cef88f16 Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 28 Feb 2013 13:30:16 +0000 Subject: [PATCH] Merge from V6_main 28/02/2013 --- CMakeLists.txt | 133 ++-------- build_cmake | 2 +- build_cmake.bat | 2 +- configure.ac | 1 + doc/docutils/CMakeLists.txt | 2 +- doc/salome/gui/CMakeLists.txt | 2 +- salome_adm/cmake_files/CMakeLists.txt | 24 +- salome_adm/cmake_files/FindLIBBATCH.cmake | 138 ---------- salome_adm/cmake_files/FindOMNIORB.cmake | 1 + salome_adm/cmake_files/FindSalomeBOOST.cmake | 16 ++ .../cmake_files/FindSalomeCPPUNIT.cmake | 10 + .../cmake_files/FindSalomeDOXYGEN.cmake | 15 ++ salome_adm/cmake_files/FindSalomeHDF5.cmake | 16 ++ .../cmake_files/FindSalomeLIBBATCH.cmake | 18 ++ .../cmake_files/FindSalomeLIBXML2.cmake | 13 + salome_adm/cmake_files/FindSalomeMPI.cmake | 14 + salome_adm/cmake_files/FindSalomePYTHON.cmake | 21 ++ salome_adm/cmake_files/FindSalomeSPHINX.cmake | 8 + salome_adm/cmake_files/FindSalomeSWIG.cmake | 10 + salome_adm/cmake_files/Makefile.am | 24 +- .../cmake_files/deprecated/CMakeLists.txt | 42 +++ .../{ => deprecated}/FindBOOST.cmake | 0 .../{ => deprecated}/FindDOXYGEN.cmake | 0 .../{ => deprecated}/FindHDF5.cmake | 0 .../cmake_files/deprecated/FindKERNEL.cmake | 65 +++++ .../{ => deprecated}/FindLIBXML2.cmake | 9 +- .../{ => deprecated}/FindMPI.cmake | 0 .../cmake_files/deprecated/FindOMNIORB.cmake | 245 ++++++++++++++++++ .../cmake_files/deprecated/FindPLATFORM.cmake | 147 +++++++++++ .../{ => deprecated}/FindPTHREADS.cmake | 0 .../{ => deprecated}/FindPYTHON.cmake | 0 .../{ => deprecated}/FindSWIG.cmake | 0 salome_adm/cmake_files/deprecated/Makefile.am | 42 +++ .../cmake_files/deprecated/UseOMNIORB.cmake | 87 +++++++ .../cmake_files/{ => deprecated}/am2cmake.py | 46 ++-- .../install_and_compile_python_file.cmake | 0 .../install_python_from_idl.cmake | 0 salome_adm/unix/config_files/check_cas.m4 | 19 +- src/Basics/Basics_OCCTVersion.hxx | 7 +- src/Communication/CMakeLists.txt | 10 - src/Communication_SWIG/CMakeLists.txt | 2 + src/DF/CMakeLists.txt | 7 - .../DSC_User/Datastream/Palm/CMakeLists.txt | 2 + src/KERNEL_PY/salome_ComponentGUI.py | 20 ++ src/Launcher/CMakeLists.txt | 13 +- src/NamingService/CMakeLists.txt | 3 + src/SALOMEDSImpl/CMakeLists.txt | 51 ---- 47 files changed, 902 insertions(+), 385 deletions(-) delete mode 100644 salome_adm/cmake_files/FindLIBBATCH.cmake create mode 100644 salome_adm/cmake_files/FindSalomeBOOST.cmake create mode 100644 salome_adm/cmake_files/FindSalomeCPPUNIT.cmake create mode 100644 salome_adm/cmake_files/FindSalomeDOXYGEN.cmake create mode 100644 salome_adm/cmake_files/FindSalomeHDF5.cmake create mode 100644 salome_adm/cmake_files/FindSalomeLIBBATCH.cmake create mode 100644 salome_adm/cmake_files/FindSalomeLIBXML2.cmake create mode 100644 salome_adm/cmake_files/FindSalomeMPI.cmake create mode 100644 salome_adm/cmake_files/FindSalomePYTHON.cmake create mode 100644 salome_adm/cmake_files/FindSalomeSPHINX.cmake create mode 100644 salome_adm/cmake_files/FindSalomeSWIG.cmake create mode 100755 salome_adm/cmake_files/deprecated/CMakeLists.txt rename salome_adm/cmake_files/{ => deprecated}/FindBOOST.cmake (100%) rename salome_adm/cmake_files/{ => deprecated}/FindDOXYGEN.cmake (100%) rename salome_adm/cmake_files/{ => deprecated}/FindHDF5.cmake (100%) create mode 100644 salome_adm/cmake_files/deprecated/FindKERNEL.cmake rename salome_adm/cmake_files/{ => deprecated}/FindLIBXML2.cmake (92%) rename salome_adm/cmake_files/{ => deprecated}/FindMPI.cmake (100%) create mode 100644 salome_adm/cmake_files/deprecated/FindOMNIORB.cmake create mode 100644 salome_adm/cmake_files/deprecated/FindPLATFORM.cmake rename salome_adm/cmake_files/{ => deprecated}/FindPTHREADS.cmake (100%) rename salome_adm/cmake_files/{ => deprecated}/FindPYTHON.cmake (100%) rename salome_adm/cmake_files/{ => deprecated}/FindSWIG.cmake (100%) create mode 100644 salome_adm/cmake_files/deprecated/Makefile.am create mode 100644 salome_adm/cmake_files/deprecated/UseOMNIORB.cmake rename salome_adm/cmake_files/{ => deprecated}/am2cmake.py (99%) rename salome_adm/cmake_files/{ => deprecated}/install_and_compile_python_file.cmake (100%) rename salome_adm/cmake_files/{ => deprecated}/install_python_from_idl.cmake (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 33595f392..4200f7d83 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,10 @@ IF(COMMAND cmake_policy) cmake_policy(SET CMP0003 NEW) ENDIF(COMMAND cmake_policy) -INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake) +# directories for packages detection +SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/salome_adm/cmake_files) + +find_package(PLATFORM) IF(APPLE) SET(CMAKE_C_COMPILER gcc) @@ -57,139 +60,43 @@ 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) - +option(SALOME_USE_LIBBATCH "Generate Launcher" ON) # Threads SET(CMAKE_THREAD_PREFER_PTHREAD) find_package(Threads REQUIRED) +# required prerequisites + +find_package(SalomePYTHON) +find_package(SalomeSWIG) +find_package(SalomeLIBXML2) +find_package(SalomeHDF5) +find_package(SalomeBOOST) + +# optional prerequisites -# Python -set(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR} CACHE PATH "Path to Python directory") -if(EXISTS ${PYTHON_ROOT_DIR}) - set(CMAKE_INCLUDE_PATH ${PYTHON_ROOT_DIR}/include) - set(CMAKE_LIBRARY_PATH ${PYTHON_ROOT_DIR}/lib) - set(CMAKE_PROGRAM_PATH ${PYTHON_ROOT_DIR}/bin) -endif(EXISTS ${PYTHON_ROOT_DIR}) -find_package(PythonInterp REQUIRED) -# Set PythonLibs_FIND_VERSION To avoid problems when several versions are in the system -SET(PythonLibs_FIND_VERSION ${PYTHON_VERSION_STRING}) -find_package(PythonLibs REQUIRED) -set(PYLOGLEVEL WARNING) - -# Swig -set(SWIG_ROOT_DIR $ENV{SWIG_ROOT_DIR} CACHE PATH "Path to Swig directory") -if(EXISTS ${SWIG_ROOT_DIR}) - set(CMAKE_INCLUDE_PATH ${SWIG_ROOT_DIR}/include) - set(CMAKE_LIBRARY_PATH ${SWIG_ROOT_DIR}/lib) - set(CMAKE_PROGRAM_PATH ${SWIG_ROOT_DIR}/bin) -endif(EXISTS ${SWIG_ROOT_DIR}) -find_package(SWIG REQUIRED) - -# LIBXML2 -set(LIBXML2_ROOT_DIR $ENV{LIBXML2_ROOT_DIR} CACHE PATH "Path to LibXml2 directory") -if(EXISTS ${LIBXML2_ROOT_DIR}) - set(CMAKE_INCLUDE_PATH ${LIBXML2_ROOT_DIR}/include) - set(CMAKE_LIBRARY_PATH ${LIBXML2_ROOT_DIR}/lib) - set(CMAKE_PROGRAM_PATH ${LIBXML2_ROOT_DIR}/bin) -endif(EXISTS ${LIBXML2_ROOT_DIR}) -find_package(LibXml2 REQUIRED) -if(${LIBXML2_VERSION_STRING} VERSION_LESS "2.7.8") - message(FATAL_ERROR "LIbXml2 required version is 2.7.8, version is ${LIBXML2_VERSION_STRING} , please defined LIBXML2_ROOT_DIR as environment or cmake variable") -endif(${LIBXML2_VERSION_STRING} VERSION_LESS "2.7.8") - -# HDF5 -set(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR} CACHE PATH "Path to Hdf5 directory") -if(EXISTS ${HDF5_ROOT_DIR}) - set(CMAKE_INCLUDE_PATH ${HDF5_ROOT_DIR}/include) - set(CMAKE_LIBRARY_PATH ${HDF5_ROOT_DIR}/lib) - set(CMAKE_PROGRAM_PATH ${HDF5_ROOT_DIR}/bin) -endif(EXISTS ${HDF5_ROOT_DIR}) -find_package(HDF5 COMPONENTS C REQUIRED) -if (HDF5_FOUND) - set(HDF5_DEFINITIONS "-DH5_USE_16_API ${HDF5_DEFINITIONS}" ) - if(WINDOWS) - set(HDF5_DEFINITIONS "-D_HDF5USEDLL_ ${HDF5_DEFINITIONS}" ) - endif(WINDOWS) -endif(HDF5_FOUND) - -# MPI if(SALOME_USE_MPI OR HDF5_IS_PARALLEL) - set(MPI_ROOT_DIR $ENV{MPI_ROOT_DIR} CACHE PATH "Path to Mpi directory") - if(EXISTS ${MPI_ROOT_DIR}) - set(CMAKE_INCLUDE_PATH ${MPI_ROOT_DIR}/include) - set(CMAKE_LIBRARY_PATH ${MPI_ROOT_DIR}/lib) - set(CMAKE_PROGRAM_PATH ${MPI_ROOT_DIR}/bin) - endif(EXISTS ${MPI_ROOT_DIR}) - 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) + find_package(SalomeMPI) endif(SALOME_USE_MPI OR HDF5_IS_PARALLEL) -# Omniorb if(SALOME_USE_CORBA) - INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake) + find_package(OMNIORB) endif(SALOME_USE_CORBA) -# Boost -set(Boost_ROOT_DIR $ENV{Boost_ROOT_DIR} CACHE PATH "Path to Boost directory") -if(EXISTS ${Boost_ROOT_DIR}) - set(CMAKE_INCLUDE_PATH ${Boost_ROOT_DIR}/include) - set(CMAKE_LIBRARY_PATH ${Boost_ROOT_DIR}/lib) -endif(EXISTS ${Boost_ROOT_DIR}) -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) - set(CPPUNIT_ROOT_DIR $ENV{CPPUNIT_ROOT_DIR} CACHE PATH "Path to Cppunit directory") - if(EXISTS ${CPPUNIT_ROOT_DIR}) - set(CMAKE_INCLUDE_PATH ${CPPUNIT_ROOT_DIR}/include) - set(CMAKE_LIBRARY_PATH ${CPPUNIT_ROOT_DIR}/lib) - set(CMAKE_PROGRAM_PATH ${CPPUNIT_ROOT_DIR}/bin) - endif(EXISTS ${CPPUNIT_ROOT_DIR}) - INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) + find_package(SalomeCPPUNIT) endif(SALOME_USE_TEST) -# Doxygen and graphviz if(SALOME_USE_DOC) - set(DOXYGEN_ROOT_DIR $ENV{DOXYGEN_ROOT_DIR} CACHE PATH "Path to Doxygen directory") - set(GRAPHVIZ_ROOT_DIR $ENV{GRAPHVIZ_ROOT_DIR} CACHE PATH "Path to Graphviz directory") - if(EXISTS ${DOXYGEN_ROOT_DIR}) - set(CMAKE_PROGRAM_PATH ${DOXYGEN_ROOT_DIR}/bin) - endif(EXISTS ${DOXYGEN_ROOT_DIR}) - if(EXISTS ${GRAPHVIZ_ROOT_DIR}) - set(CMAKE_PROGRAM_PATH ${GRAPHVIZ_ROOT_DIR}/bin) - if(EXISTS ${DOXYGEN_ROOT_DIR}) - set(CMAKE_PROGRAM_PATH ${GRAPHVIZ_ROOT_DIR}/bin ${DOXYGEN_ROOT_DIR}/bin) - endif(EXISTS ${DOXYGEN_ROOT_DIR}) - endif(EXISTS ${GRAPHVIZ_ROOT_DIR}) - find_package(Doxygen) + find_package(SalomeDOXYGEN) + find_package(SalomeSPHINX) endif(SALOME_USE_DOC) -# Libbatch if(SALOME_USE_LIBBATCH) - INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindLIBBATCH.cmake) + find_package(SalomeLIBBATCH) endif(SALOME_USE_LIBBATCH) -# Sphinx -if(SALOME_USE_DOC) - set(SPHINX_ROOT_DIR $ENV{SPHINX_ROOT_DIR} CACHE PATH "Path to Sphinx directory") - if(EXISTS ${SPHINX_ROOT_DIR}) - set(CMAKE_PROGRAM_PATH ${SPHINX_ROOT_DIR}/bin) - endif(EXISTS ${SPHINX_ROOT_DIR}) - INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindSPHINX.cmake) -endif(SALOME_USE_DOC) - INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/SalomeMacros.cmake) SET(CALCIUM_IDL_INT_F77 long) diff --git a/build_cmake b/build_cmake index dea5c393c..744dbe0b1 100755 --- a/build_cmake +++ b/build_cmake @@ -21,7 +21,7 @@ CURRENT_DIR=`pwd` CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"` cd ${CONF_DIR} -python salome_adm/cmake_files/am2cmake.py --kernel +python salome_adm/cmake_files/deprecated/am2cmake.py --kernel status=$? cd ${CURRENT_DIR} exit $status diff --git a/build_cmake.bat b/build_cmake.bat index cca1337ba..54bb4f596 100644 --- a/build_cmake.bat +++ b/build_cmake.bat @@ -17,4 +17,4 @@ @REM See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @REM -%PYTHONBIN% salome_adm\cmake_files\am2cmake.py --kernel +%PYTHONBIN% salome_adm\cmake_files\deprecated\am2cmake.py --kernel diff --git a/configure.ac b/configure.ac index d3200df43..4c9479c6e 100644 --- a/configure.ac +++ b/configure.ac @@ -535,6 +535,7 @@ AC_OUTPUT([ \ salome_adm/SALOMEconfig.ref \ salome_adm/Makefile \ salome_adm/cmake_files/Makefile \ + salome_adm/cmake_files/deprecated/Makefile \ salome_adm/unix/Makefile \ salome_adm/unix/config_files/Makefile \ Makefile \ diff --git a/doc/docutils/CMakeLists.txt b/doc/docutils/CMakeLists.txt index f375abfc4..5cda4c65c 100755 --- a/doc/docutils/CMakeLists.txt +++ b/doc/docutils/CMakeLists.txt @@ -65,6 +65,6 @@ FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/env_s.${EXT} "${SCR}") ADD_CUSTOM_TARGET(html_docs ${CALL_STR} ${CMAKE_CURRENT_BINARY_DIR}/env_s.${EXT} && ${SPHINX_EXECUTABLE} -c ${CMAKE_BINARY_DIR}/doc/docutils -b html ${ALLSPHINXOPTS} docutils ) -INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${CMAKE_CACHEFILE_DIR} --target html_docs)") +INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${CMAKE_BINARY_DIR} --target html_docs)") INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/docutils DESTINATION share/doc/salome/tui/KERNEL) INSTALL(FILES ${CMAKE_SOURCE_DIR}/doc/salome/tui/images/head.png DESTINATION share/doc/salome/tui/KERNEL) diff --git a/doc/salome/gui/CMakeLists.txt b/doc/salome/gui/CMakeLists.txt index 8292cd85d..0acbbe833 100755 --- a/doc/salome/gui/CMakeLists.txt +++ b/doc/salome/gui/CMakeLists.txt @@ -31,6 +31,6 @@ ADD_CUSTOM_TARGET(usr_docs ${DOXYGEN_EXECUTABLE}) ADD_DEPENDENCIES(usr_docs html_docs) -INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${CMAKE_CACHEFILE_DIR} --target usr_docs)") +INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${CMAKE_BINARY_DIR} --target usr_docs)") INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/KERNEL DESTINATION share/doc/salome/gui) INSTALL(FILES images/head.png DESTINATION share/doc/salome/gui/KERNEL) diff --git a/salome_adm/cmake_files/CMakeLists.txt b/salome_adm/cmake_files/CMakeLists.txt index d78a6f18d..b41dadd74 100755 --- a/salome_adm/cmake_files/CMakeLists.txt +++ b/salome_adm/cmake_files/CMakeLists.txt @@ -17,30 +17,30 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +ADD_SUBDIRECTORY(deprecated) + # =============================================================== # Files to be installed # =============================================================== # These files are data, module or lib files SET(DATA - am2cmake.py - FindBOOST.cmake FindCPPUNIT.cmake - FindDOXYGEN.cmake - FindHDF5.cmake FindKERNEL.cmake - FindLIBBATCH.cmake - FindLIBXML2.cmake - FindMPI.cmake FindOMNIORB.cmake UseOMNIORB.cmake FindPLATFORM.cmake - FindPTHREADS.cmake - FindPYTHON.cmake - FindSWIG.cmake FindSPHINX.cmake - install_python_from_idl.cmake - install_and_compile_python_file.cmake + FindSalomeBOOST.cmake + FindSalomeCPPUNIT.cmake + FindSalomeDOXYGEN.cmake + FindSalomeHDF5.cmake + FindSalomeLIBBATCH.cmake + FindSalomeLIBXML2.cmake + FindSalomeMPI.cmake + FindSalomePYTHON.cmake + FindSalomeSPHINX.cmake + FindSalomeSWIG.cmake InstallAndCompilePythonFile.cmake SalomeMacros.cmake ) diff --git a/salome_adm/cmake_files/FindLIBBATCH.cmake b/salome_adm/cmake_files/FindLIBBATCH.cmake deleted file mode 100644 index 809075722..000000000 --- a/salome_adm/cmake_files/FindLIBBATCH.cmake +++ /dev/null @@ -1,138 +0,0 @@ -# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# 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 -# - -# ------ - -MESSAGE(STATUS "Check for libbatch ...") - -# ------ - -IF(LIBBATCH_IS_MANDATORY STREQUAL 0) - SET(LIBBATCH_IS_MANDATORY 0) - SET(LIBBATCH_IS_OPTIONAL 1) -ENDIF(LIBBATCH_IS_MANDATORY STREQUAL 0) -IF(LIBBATCH_IS_OPTIONAL STREQUAL 0) - SET(LIBBATCH_IS_MANDATORY 1) - SET(LIBBATCH_IS_OPTIONAL 0) -ENDIF(LIBBATCH_IS_OPTIONAL STREQUAL 0) -IF(NOT LIBBATCH_IS_MANDATORY AND NOT LIBBATCH_IS_OPTIONAL) - SET(LIBBATCH_IS_MANDATORY 0) - SET(LIBBATCH_IS_OPTIONAL 1) -ENDIF(NOT LIBBATCH_IS_MANDATORY AND NOT LIBBATCH_IS_OPTIONAL) - -# ------ - -SET(LIBBATCH_STATUS 1) -IF(WITHOUT_LIBBATCH OR WITH_LIBBATCH STREQUAL 0) - SET(LIBBATCH_STATUS 0) - MESSAGE(STATUS "libbatch disabled from command line.") -ENDIF(WITHOUT_LIBBATCH OR WITH_LIBBATCH STREQUAL 0) - -# ------ - -IF(LIBBATCH_STATUS) - IF(WITH_LIBBATCH) - SET(LIBBATCH_ROOT_USER ${WITH_LIBBATCH}) - ELSE(WITH_LIBBATCH) - SET(LIBBATCH_ROOT_USER $ENV{LIBBATCH_ROOT_DIR}) - ENDIF(WITH_LIBBATCH) -ENDIF(LIBBATCH_STATUS) - -# ----- - -IF(LIBBATCH_STATUS) - IF(LIBBATCH_ROOT_USER) - SET(LIBBATCH_FIND_PATHS_OPTION NO_DEFAULT_PATH) - ELSE(LIBBATCH_ROOT_USER) - SET(LIBBATCH_FIND_PATHS_OPTION) - ENDIF(LIBBATCH_ROOT_USER) -ENDIF(LIBBATCH_STATUS) - -# ----- - -IF(LIBBATCH_STATUS) - IF(LIBBATCH_ROOT_USER) - SET(LIBBATCH_INCLUDE_PATHS ${LIBBATCH_ROOT_USER} ${LIBBATCH_ROOT_USER}/include) - ELSE(LIBBATCH_ROOT_USER) - SET(LIBBATCH_INCLUDE_PATHS) - ENDIF(LIBBATCH_ROOT_USER) - SET(LIBBATCH_INCLUDE_TO_FIND Batch/BatchManager.hxx) - FIND_PATH(LIBBATCH_INCLUDE_DIR ${LIBBATCH_INCLUDE_TO_FIND} PATHS ${LIBBATCH_INCLUDE_PATHS} ${LIBBATCH_FIND_PATHS_OPTION}) - IF(LIBBATCH_INCLUDE_DIR) - IF(LIBBATCH_ROOT_USER) - SET(LIBBATCH_INCLUDES -I${LIBBATCH_INCLUDE_DIR}) # to be removed - SET(LIBBATCH_INCLUDE_DIRS ${LIBBATCH_INCLUDE_DIR}) - ENDIF(LIBBATCH_ROOT_USER) - MESSAGE(STATUS "${LIBBATCH_INCLUDE_TO_FIND} found in ${LIBBATCH_INCLUDE_DIR}") - ELSE(LIBBATCH_INCLUDE_DIR) - SET(LIBBATCH_STATUS 0) - IF(LIBBATCH_ROOT_USER) - MESSAGE(STATUS "${LIBBATCH_INCLUDE_TO_FIND} not found in ${LIBBATCH_INCLUDE_PATHS}, check your LIBBATCH installation.") - ELSE(LIBBATCH_ROOT_USER) - MESSAGE(STATUS "${LIBBATCH_INCLUDE_TO_FIND} not found on system, try to use WITH_LIBBATCH option or LIBBATCH_ROOT environment variable.") - ENDIF(LIBBATCH_ROOT_USER) - ENDIF(LIBBATCH_INCLUDE_DIR) -ENDIF(LIBBATCH_STATUS) - -# ---- - -IF(LIBBATCH_STATUS) - IF(LIBBATCH_ROOT_USER) - SET(LIBBATCH_LIB_PATHS ${LIBBATCH_ROOT_USER}/lib) - ELSE(LIBBATCH_ROOT_USER) - SET(LIBBATCH_LIB_PATHS) - ENDIF(LIBBATCH_ROOT_USER) -ENDIF(LIBBATCH_STATUS) - -IF(LIBBATCH_STATUS) - IF(WINDOWS) - FIND_LIBRARY(LIBBATCH_LIB Batch PATHS ${LIBBATCH_LIB_PATHS} ${LIBBATCH_FIND_PATHS_OPTION}) - ELSE(WINDOWS) - FIND_LIBRARY(LIBBATCH_LIB Batch PATHS ${LIBBATCH_LIB_PATHS} ${LIBBATCH_FIND_PATHS_OPTION}) - ENDIF(WINDOWS) - SET(LIBBATCH_LIBS) - IF(LIBBATCH_LIB) - SET(LIBBATCH_LIBS ${LIBBATCH_LIBS} ${LIBBATCH_LIB}) - MESSAGE(STATUS "libbatch lib found: ${LIBBATCH_LIB}") - ELSE(LIBBATCH_LIB) - SET(LIBBATCH_STATUS 0) - IF(LIBBATCH_ROOT_USER) - MESSAGE(STATUS "libbatch lib not found in ${LIBBATCH_LIB_PATHS}, check your LIBBATCH installation.") - ELSE(LIBBATCH_ROOT_USER) - MESSAGE(STATUS "libbatch lib not found on system, try to use WITH_LIBBATCH option or LIBBATCH_ROOT environment variable.") - ENDIF(LIBBATCH_ROOT_USER) - ENDIF(LIBBATCH_LIB) -ENDIF(LIBBATCH_STATUS) - -# ---- - -IF(LIBBATCH_STATUS) - SET(WITH_LIBBATCH 1) -ELSE(LIBBATCH_STATUS) - IF(LIBBATCH_IS_MANDATORY) - MESSAGE(FATAL_ERROR "libbatch not found ... mandatory ... abort") - ELSE(LIBBATCH_IS_MANDATORY) - MESSAGE(STATUS "libbatch not found ... optional ... disabled") - ENDIF(LIBBATCH_IS_MANDATORY) -ENDIF(LIBBATCH_STATUS) - -# ------ diff --git a/salome_adm/cmake_files/FindOMNIORB.cmake b/salome_adm/cmake_files/FindOMNIORB.cmake index c638db9de..11f8c8169 100644 --- a/salome_adm/cmake_files/FindOMNIORB.cmake +++ b/salome_adm/cmake_files/FindOMNIORB.cmake @@ -213,6 +213,7 @@ FIND_PATH( OMNIORB_PYTHON_BACKEND FIND_PATH( OMNIORB_PYTHON_BACKEND NAMES python.py + PATHS /usr/lib/omniidl/omniidl_be DOC "Path to python-backend directory (omniidl_be) including python.py file" ) ############################################################################## # cook our stuff diff --git a/salome_adm/cmake_files/FindSalomeBOOST.cmake b/salome_adm/cmake_files/FindSalomeBOOST.cmake new file mode 100644 index 000000000..1e2311d19 --- /dev/null +++ b/salome_adm/cmake_files/FindSalomeBOOST.cmake @@ -0,0 +1,16 @@ + +# Boost detection dor Salome + +set(Boost_ROOT_DIR $ENV{Boost_ROOT_DIR} CACHE PATH "Path to Boost directory") +if(EXISTS ${Boost_ROOT_DIR}) + set(CMAKE_INCLUDE_PATH ${Boost_ROOT_DIR}/include) + set(CMAKE_LIBRARY_PATH ${Boost_ROOT_DIR}/lib) +endif(EXISTS ${Boost_ROOT_DIR}) +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) diff --git a/salome_adm/cmake_files/FindSalomeCPPUNIT.cmake b/salome_adm/cmake_files/FindSalomeCPPUNIT.cmake new file mode 100644 index 000000000..29cb84d40 --- /dev/null +++ b/salome_adm/cmake_files/FindSalomeCPPUNIT.cmake @@ -0,0 +1,10 @@ + +# CPPUNIT detection for Salome + +set(CPPUNIT_ROOT_DIR $ENV{CPPUNIT_ROOT_DIR} CACHE PATH "Path to Cppunit directory") +if(EXISTS ${CPPUNIT_ROOT_DIR}) + set(CMAKE_INCLUDE_PATH ${CPPUNIT_ROOT_DIR}/include) + set(CMAKE_LIBRARY_PATH ${CPPUNIT_ROOT_DIR}/lib) + set(CMAKE_PROGRAM_PATH ${CPPUNIT_ROOT_DIR}/bin) +endif(EXISTS ${CPPUNIT_ROOT_DIR}) +find_package(CPPUNIT) diff --git a/salome_adm/cmake_files/FindSalomeDOXYGEN.cmake b/salome_adm/cmake_files/FindSalomeDOXYGEN.cmake new file mode 100644 index 000000000..a373d4aff --- /dev/null +++ b/salome_adm/cmake_files/FindSalomeDOXYGEN.cmake @@ -0,0 +1,15 @@ + +# Doxygen and graphviz detection for salome + +set(DOXYGEN_ROOT_DIR $ENV{DOXYGEN_ROOT_DIR} CACHE PATH "Path to Doxygen directory") +set(GRAPHVIZ_ROOT_DIR $ENV{GRAPHVIZ_ROOT_DIR} CACHE PATH "Path to Graphviz directory") +if(EXISTS ${DOXYGEN_ROOT_DIR}) + set(CMAKE_PROGRAM_PATH ${DOXYGEN_ROOT_DIR}/bin) +endif(EXISTS ${DOXYGEN_ROOT_DIR}) +if(EXISTS ${GRAPHVIZ_ROOT_DIR}) + set(CMAKE_PROGRAM_PATH ${GRAPHVIZ_ROOT_DIR}/bin) + if(EXISTS ${DOXYGEN_ROOT_DIR}) + set(CMAKE_PROGRAM_PATH ${GRAPHVIZ_ROOT_DIR}/bin ${DOXYGEN_ROOT_DIR}/bin) + endif(EXISTS ${DOXYGEN_ROOT_DIR}) +endif(EXISTS ${GRAPHVIZ_ROOT_DIR}) +find_package(Doxygen) diff --git a/salome_adm/cmake_files/FindSalomeHDF5.cmake b/salome_adm/cmake_files/FindSalomeHDF5.cmake new file mode 100644 index 000000000..5bf66070b --- /dev/null +++ b/salome_adm/cmake_files/FindSalomeHDF5.cmake @@ -0,0 +1,16 @@ + +# HDF5 detection for Salome + +set(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR} CACHE PATH "Path to Hdf5 directory") +if(EXISTS ${HDF5_ROOT_DIR}) + set(CMAKE_INCLUDE_PATH ${HDF5_ROOT_DIR}/include) + set(CMAKE_LIBRARY_PATH ${HDF5_ROOT_DIR}/lib) + set(CMAKE_PROGRAM_PATH ${HDF5_ROOT_DIR}/bin) +endif(EXISTS ${HDF5_ROOT_DIR}) +find_package(HDF5 COMPONENTS C REQUIRED) +if (HDF5_FOUND) + set(HDF5_DEFINITIONS "-DH5_USE_16_API ${HDF5_DEFINITIONS}" ) + if(WINDOWS) + set(HDF5_DEFINITIONS "-D_HDF5USEDLL_ ${HDF5_DEFINITIONS}" ) + endif(WINDOWS) +endif(HDF5_FOUND) diff --git a/salome_adm/cmake_files/FindSalomeLIBBATCH.cmake b/salome_adm/cmake_files/FindSalomeLIBBATCH.cmake new file mode 100644 index 000000000..d84f2ca9f --- /dev/null +++ b/salome_adm/cmake_files/FindSalomeLIBBATCH.cmake @@ -0,0 +1,18 @@ + +# LIBBATCH detection for Salome + +include(FindPackageHandleStandardArgs) + +set(LIBBATCH_ROOT_DIR $ENV{LIBBATCH_ROOT_DIR} CACHE PATH "Path to libbatch directory") +if(EXISTS ${LIBBATCH_ROOT_DIR}) + find_package(libBatch QUIET CONFIG PATHS ${LIBBATCH_ROOT_DIR}/lib NO_DEFAULT_PATH) +endif(EXISTS ${LIBBATCH_ROOT_DIR}) +find_package(libBatch QUIET CONFIG) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(libBatch DEFAULT_MSG + LIBBATCH_ROOT_DIR LIBBATCH_INCLUDE_DIRS LIBBATCH_LIBRARIES + LIBBATCH_RUNTIME_LIBRARY_DIRS LIBBATCH_PYTHONPATH) + +# Artefact for compatibility with Libbatch 1.6.0, to be removed in Salome 7 +IF(LIBBATCH_FOUND) + get_filename_component(LIBBATCH_INCLUDE_DIR "${LIBBATCH_INCLUDE_DIRS}/.." ABSOLUTE) +ENDIF(LIBBATCH_FOUND) diff --git a/salome_adm/cmake_files/FindSalomeLIBXML2.cmake b/salome_adm/cmake_files/FindSalomeLIBXML2.cmake new file mode 100644 index 000000000..f64b21d81 --- /dev/null +++ b/salome_adm/cmake_files/FindSalomeLIBXML2.cmake @@ -0,0 +1,13 @@ + +# LIBXML2 detection for Salome + +set(LIBXML2_ROOT_DIR $ENV{LIBXML2_ROOT_DIR} CACHE PATH "Path to LibXml2 directory") +if(EXISTS ${LIBXML2_ROOT_DIR}) + set(CMAKE_INCLUDE_PATH ${LIBXML2_ROOT_DIR}/include) + set(CMAKE_LIBRARY_PATH ${LIBXML2_ROOT_DIR}/lib) + set(CMAKE_PROGRAM_PATH ${LIBXML2_ROOT_DIR}/bin) +endif(EXISTS ${LIBXML2_ROOT_DIR}) +find_package(LibXml2 REQUIRED) +#if(${LIBXML2_VERSION_STRING} VERSION_LESS "2.7.6") +# message(FATAL_ERROR "LIbXml2 required version is 2.7.6, version is ${LIBXML2_VERSION_STRING} , please defined LIBXML2_ROOT_DIR as environment or cmake variable") +#endif(${LIBXML2_VERSION_STRING} VERSION_LESS "2.7.6") diff --git a/salome_adm/cmake_files/FindSalomeMPI.cmake b/salome_adm/cmake_files/FindSalomeMPI.cmake new file mode 100644 index 000000000..b38709d62 --- /dev/null +++ b/salome_adm/cmake_files/FindSalomeMPI.cmake @@ -0,0 +1,14 @@ + +# MPI detection for Salome + +set(MPI_ROOT_DIR $ENV{MPI_ROOT_DIR} CACHE PATH "Path to Mpi directory") +if(EXISTS ${MPI_ROOT_DIR}) + set(CMAKE_INCLUDE_PATH ${MPI_ROOT_DIR}/include) + set(CMAKE_LIBRARY_PATH ${MPI_ROOT_DIR}/lib) + set(CMAKE_PROGRAM_PATH ${MPI_ROOT_DIR}/bin) +endif(EXISTS ${MPI_ROOT_DIR}) +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) diff --git a/salome_adm/cmake_files/FindSalomePYTHON.cmake b/salome_adm/cmake_files/FindSalomePYTHON.cmake new file mode 100644 index 000000000..31c57d65e --- /dev/null +++ b/salome_adm/cmake_files/FindSalomePYTHON.cmake @@ -0,0 +1,21 @@ + +# Python detection for Salome + +set(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR} CACHE PATH "Path to Python directory") +if(EXISTS ${PYTHON_ROOT_DIR}) + set(CMAKE_INCLUDE_PATH ${PYTHON_ROOT_DIR}/include) + set(CMAKE_LIBRARY_PATH ${PYTHON_ROOT_DIR}/lib) + set(CMAKE_PROGRAM_PATH ${PYTHON_ROOT_DIR}/bin) +endif(EXISTS ${PYTHON_ROOT_DIR}) +find_package(PythonInterp REQUIRED) +# Set PythonLibs_FIND_VERSION To avoid problems when several versions are in the system +SET(PythonLibs_FIND_VERSION ${PYTHON_VERSION_STRING}) +if(EXISTS ${PYTHON_ROOT_DIR}) + set(PYTHON_INCLUDE_DIR ${PYTHON_ROOT_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) + set(PYTHON_LIBRARY ${PYTHON_ROOT_DIR}/lib/libpython${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}${CMAKE_SHARED_LIBRARY_SUFFIX}) +endif(EXISTS ${PYTHON_ROOT_DIR}) +find_package(PythonLibs REQUIRED) +MESSAGE("Python includes : " ${PYTHON_INCLUDE_DIR}) +MESSAGE("Python library : " ${PYTHON_LIBRARY}) +MESSAGE("Python binary : " ${PYTHON_EXECUTABLE}) +set(PYLOGLEVEL WARNING) diff --git a/salome_adm/cmake_files/FindSalomeSPHINX.cmake b/salome_adm/cmake_files/FindSalomeSPHINX.cmake new file mode 100644 index 000000000..26e3112e3 --- /dev/null +++ b/salome_adm/cmake_files/FindSalomeSPHINX.cmake @@ -0,0 +1,8 @@ + +# Sphinx detection for Salome + +set(SPHINX_ROOT_DIR $ENV{SPHINX_ROOT_DIR} CACHE PATH "Path to Sphinx directory") +if(EXISTS ${SPHINX_ROOT_DIR}) + set(CMAKE_PROGRAM_PATH ${SPHINX_ROOT_DIR}/bin) +endif(EXISTS ${SPHINX_ROOT_DIR}) +find_package(SPHINX) diff --git a/salome_adm/cmake_files/FindSalomeSWIG.cmake b/salome_adm/cmake_files/FindSalomeSWIG.cmake new file mode 100644 index 000000000..e5ca4b75b --- /dev/null +++ b/salome_adm/cmake_files/FindSalomeSWIG.cmake @@ -0,0 +1,10 @@ + +# Swig detection for Salome + +set(SWIG_ROOT_DIR $ENV{SWIG_ROOT_DIR} CACHE PATH "Path to Swig directory") +if(EXISTS ${SWIG_ROOT_DIR}) + set(CMAKE_INCLUDE_PATH ${SWIG_ROOT_DIR}/include) + set(CMAKE_LIBRARY_PATH ${SWIG_ROOT_DIR}/lib) + set(CMAKE_PROGRAM_PATH ${SWIG_ROOT_DIR}/bin) +endif(EXISTS ${SWIG_ROOT_DIR}) +find_package(SWIG REQUIRED) diff --git a/salome_adm/cmake_files/Makefile.am b/salome_adm/cmake_files/Makefile.am index 22ede73e6..d43c5e1e8 100644 --- a/salome_adm/cmake_files/Makefile.am +++ b/salome_adm/cmake_files/Makefile.am @@ -22,26 +22,26 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am +SUBDIRS = deprecated + dist_salome_cmake_DATA = \ -am2cmake.py \ -FindBOOST.cmake \ FindCPPUNIT.cmake \ -FindDOXYGEN.cmake \ -FindHDF5.cmake \ FindKERNEL.cmake \ -FindLIBBATCH.cmake \ -FindLIBXML2.cmake \ -FindMPI.cmake \ FindOMNIORB.cmake \ UseOMNIORB.cmake \ FindPLATFORM.cmake \ -FindPTHREADS.cmake \ -FindPYTHON.cmake \ -FindSWIG.cmake \ FindSPHINX.cmake \ SalomeMacros.cmake \ -install_python_from_idl.cmake \ -install_and_compile_python_file.cmake \ +FindSalomeBOOST.cmake \ +FindSalomeCPPUNIT.cmake \ +FindSalomeDOXYGEN.cmake \ +FindSalomeHDF5.cmake \ +FindSalomeLIBBATCH.cmake \ +FindSalomeLIBXML2.cmake \ +FindSalomeMPI.cmake \ +FindSalomePYTHON.cmake \ +FindSalomeSPHINX.cmake \ +FindSalomeSWIG.cmake \ InstallAndCompilePythonFile.cmake dist_salomescript_SCRIPTS = prepare_generating_doc.py diff --git a/salome_adm/cmake_files/deprecated/CMakeLists.txt b/salome_adm/cmake_files/deprecated/CMakeLists.txt new file mode 100755 index 000000000..f48669a5c --- /dev/null +++ b/salome_adm/cmake_files/deprecated/CMakeLists.txt @@ -0,0 +1,42 @@ +# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +# =============================================================== +# Files to be installed +# =============================================================== + +# These files are data, module or lib files +SET(DATA + am2cmake.py + FindBOOST.cmake + FindDOXYGEN.cmake + FindHDF5.cmake + FindKERNEL.cmake + FindLIBXML2.cmake + FindMPI.cmake + FindOMNIORB.cmake + UseOMNIORB.cmake + FindPLATFORM.cmake + FindPTHREADS.cmake + FindPYTHON.cmake + FindSWIG.cmake + install_python_from_idl.cmake + install_and_compile_python_file.cmake +) +INSTALL(FILES ${DATA} DESTINATION ${KERNEL_salomeadmcmake}/deprecated) diff --git a/salome_adm/cmake_files/FindBOOST.cmake b/salome_adm/cmake_files/deprecated/FindBOOST.cmake similarity index 100% rename from salome_adm/cmake_files/FindBOOST.cmake rename to salome_adm/cmake_files/deprecated/FindBOOST.cmake diff --git a/salome_adm/cmake_files/FindDOXYGEN.cmake b/salome_adm/cmake_files/deprecated/FindDOXYGEN.cmake similarity index 100% rename from salome_adm/cmake_files/FindDOXYGEN.cmake rename to salome_adm/cmake_files/deprecated/FindDOXYGEN.cmake diff --git a/salome_adm/cmake_files/FindHDF5.cmake b/salome_adm/cmake_files/deprecated/FindHDF5.cmake similarity index 100% rename from salome_adm/cmake_files/FindHDF5.cmake rename to salome_adm/cmake_files/deprecated/FindHDF5.cmake diff --git a/salome_adm/cmake_files/deprecated/FindKERNEL.cmake b/salome_adm/cmake_files/deprecated/FindKERNEL.cmake new file mode 100644 index 000000000..5354a7624 --- /dev/null +++ b/salome_adm/cmake_files/deprecated/FindKERNEL.cmake @@ -0,0 +1,65 @@ +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +SET(KERNEL_CXXFLAGS -I${KERNEL_ROOT_DIR}/include/salome) # to be removed +SET(KERNEL_INCLUDE_DIRS ${KERNEL_ROOT_DIR}/include/salome) + +FIND_LIBRARY(CalciumC CalciumC ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(DF DF ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(Launcher Launcher ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(LifeCycleCORBATest LifeCycleCORBATest ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(NamingServiceTest NamingServiceTest ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(OpUtil OpUtil ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(Registry Registry ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(ResourcesManager ResourcesManager ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SALOMEBasics SALOMEBasics ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeCatalog SalomeCatalog ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeCommunication SalomeCommunication ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeContainer SalomeContainer ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeDatastream SalomeDatastream ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeDSCContainer SalomeDSCContainer ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeDSClient SalomeDSClient ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeDSCSupervBasic SalomeDSCSupervBasic ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeDSCSuperv SalomeDSCSuperv ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeDSImpl SalomeDSImpl ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SALOMEDSImplTest SALOMEDSImplTest ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeDS SalomeDS ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SALOMEDSTest SALOMEDSTest ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeGenericObj SalomeGenericObj ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeHDFPersist SalomeHDFPersist ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeIDLKernel SalomeIDLKernel ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeLauncher SalomeLauncher ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeLifeCycleCORBA SalomeLifeCycleCORBA ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SALOMELocalTrace SALOMELocalTrace ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SALOMELocalTraceTest SALOMELocalTraceTest ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeLoggerServer SalomeLoggerServer ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeMPIContainer SalomeMPIContainer ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeNotification SalomeNotification ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeNS SalomeNS ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeResourcesManager SalomeResourcesManager ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeTestComponentEngine SalomeTestComponentEngine ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeTestMPIComponentEngine SalomeTestMPIComponentEngine ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SALOMETraceCollectorTest SALOMETraceCollectorTest ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(TOOLSDS TOOLSDS ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(UtilsTest UtilsTest ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(with_loggerTraceCollector with_loggerTraceCollector ${KERNEL_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeKernelHelpers SalomeKernelHelpers ${KERNEL_ROOT_DIR}/lib/salome) diff --git a/salome_adm/cmake_files/FindLIBXML2.cmake b/salome_adm/cmake_files/deprecated/FindLIBXML2.cmake similarity index 92% rename from salome_adm/cmake_files/FindLIBXML2.cmake rename to salome_adm/cmake_files/deprecated/FindLIBXML2.cmake index 5eafb937d..8ff923e07 100644 --- a/salome_adm/cmake_files/FindLIBXML2.cmake +++ b/salome_adm/cmake_files/deprecated/FindLIBXML2.cmake @@ -112,7 +112,14 @@ IF(LIBXML2_STATUS) IF(WINDOWS) FIND_LIBRARY(LIBXML2_LIB libxml2 PATHS ${LIBXML2_LIB_PATHS} ${LIBXML2_FIND_PATHS_OPTION}) ELSE(WINDOWS) - FIND_LIBRARY(LIBXML2_LIB xml2 PATHS ${LIBXML2_LIB_PATHS} ${LIBXML2_FIND_PATHS_OPTION}) + IF(LIBXML2_LIB_PATHS) + FIND_LIBRARY(LIBXML2_LIB xml2 PATHS ${LIBXML2_LIB_PATHS} ${LIBXML2_FIND_PATHS_OPTION}) + ELSE(LIBXML2_LIB_PATHS) + # use pkg-config to get the directories and then use these values in FIND_LIBRARY() + FIND_PACKAGE(PkgConfig QUIET) + PKG_CHECK_MODULES(PC_LIBXML QUIET libxml-2.0) + FIND_LIBRARY(LIBXML2_LIB xml2 HINTS ${PC_LIBXML_LIBDIR} ${PC_LIBXML_LIBRARY_DIRS}) + ENDIF(LIBXML2_LIB_PATHS) ENDIF(WINDOWS) SET(LIBXML2_LIBS) IF(LIBXML2_LIB) diff --git a/salome_adm/cmake_files/FindMPI.cmake b/salome_adm/cmake_files/deprecated/FindMPI.cmake similarity index 100% rename from salome_adm/cmake_files/FindMPI.cmake rename to salome_adm/cmake_files/deprecated/FindMPI.cmake diff --git a/salome_adm/cmake_files/deprecated/FindOMNIORB.cmake b/salome_adm/cmake_files/deprecated/FindOMNIORB.cmake new file mode 100644 index 000000000..df341c48d --- /dev/null +++ b/salome_adm/cmake_files/deprecated/FindOMNIORB.cmake @@ -0,0 +1,245 @@ +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# 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 +# + +# ------ + +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}) + SET(OMNIORB_IDLCXXFLAGS -Wba -nf) + SET(OMNIORB_IDLPYFLAGS -bpython) + 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) + +# ---- diff --git a/salome_adm/cmake_files/deprecated/FindPLATFORM.cmake b/salome_adm/cmake_files/deprecated/FindPLATFORM.cmake new file mode 100644 index 000000000..fa06d0ec3 --- /dev/null +++ b/salome_adm/cmake_files/deprecated/FindPLATFORM.cmake @@ -0,0 +1,147 @@ +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +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) + +IF(NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE Release) +ENDIF(NOT CMAKE_BUILD_TYPE) + +IF(WINDOWS) +ELSE(WINDOWS) + 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}) + SET(VAL $ENV{${name}}) + IF(X${VAL} STREQUAL X0) + SET(ADD_WERROR ON) + ENDIF(X${VAL} STREQUAL X0) + IF(X${VAL} STREQUAL X1) + SET(ADD_WERROR OFF) + ENDIF(X${VAL} STREQUAL X1) + ENDFOREACH(name ${NAMES}) + IF(ADD_WERROR) + SET(CMAKE_C_FLAGS "-Werror") + SET(CMAKE_CXX_FLAGS "-Werror") + ENDIF(ADD_WERROR) +ENDIF(WINDOWS) + +IF(CMAKE_BUILD_TYPE) + IF(WINDOWS) + MARK_AS_ADVANCED(CLEAR CMAKE_CONFIGURATION_TYPES) + SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE} CACHE STRING "compilation types" FORCE) + ELSE(WINDOWS) + IF(CMAKE_BUILD_TYPE STREQUAL Debug) + SET(CMAKE_C_FLAGS_DEBUG "-g") + SET(CMAKE_CXX_FLAGS_DEBUG "-g") + ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + SET(CMAKE_C_FLAGS_RELEASE "-O1 -DNDEBUG") + SET(CMAKE_CXX_FLAGS_RELEASE "-O1 -DNDEBUG") + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) + 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, ... + SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -DWNT") + SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -DPPRO_NT") # For medfile + SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_USE_MATH_DEFINES") # At least for MEDMEM + SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_WIN32_WINNT=0x0500") # Windows 2000 or later API is required + SET(PLATFORM_LIBS ${PLATFORM_LIBS} Ws2_32.lib) + SET(PLATFORM_LIBS ${PLATFORM_LIBS} Userenv.lib) # At least for GEOM suit + + IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") # if platform is Windows 64 bit + SET(PLATFORM_CPPFLAGS "${PLATFORM_CPPFLAGS} -D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0 -D_HAS_ITERATOR_DEBUGGING=0") # To avoid runtime error during checking iterators # to be removed + 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) + +SET(SIZE_OF_LONG ${CMAKE_SIZEOF_VOID_P}) # set sizeof(long) the same as size of pointers, because on all memory models (EXCLUDING WINDOWS 64 bit) it is equivalent values +IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8" AND WINDOWS) # if it platform Windows 64 bit + 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") + +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/FindPTHREADS.cmake b/salome_adm/cmake_files/deprecated/FindPTHREADS.cmake similarity index 100% rename from salome_adm/cmake_files/FindPTHREADS.cmake rename to salome_adm/cmake_files/deprecated/FindPTHREADS.cmake diff --git a/salome_adm/cmake_files/FindPYTHON.cmake b/salome_adm/cmake_files/deprecated/FindPYTHON.cmake similarity index 100% rename from salome_adm/cmake_files/FindPYTHON.cmake rename to salome_adm/cmake_files/deprecated/FindPYTHON.cmake diff --git a/salome_adm/cmake_files/FindSWIG.cmake b/salome_adm/cmake_files/deprecated/FindSWIG.cmake similarity index 100% rename from salome_adm/cmake_files/FindSWIG.cmake rename to salome_adm/cmake_files/deprecated/FindSWIG.cmake diff --git a/salome_adm/cmake_files/deprecated/Makefile.am b/salome_adm/cmake_files/deprecated/Makefile.am new file mode 100644 index 000000000..d8e52cfea --- /dev/null +++ b/salome_adm/cmake_files/deprecated/Makefile.am @@ -0,0 +1,42 @@ +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +salome_cmake_deprecateddir = $(prefix)/salome_adm/cmake_files/deprecated + +dist_salome_cmake_deprecated_DATA = \ +am2cmake.py \ +FindBOOST.cmake \ +FindDOXYGEN.cmake \ +FindHDF5.cmake \ +FindKERNEL.cmake \ +FindLIBXML2.cmake \ +FindMPI.cmake \ +FindOMNIORB.cmake \ +UseOMNIORB.cmake \ +FindPLATFORM.cmake \ +FindPTHREADS.cmake \ +FindPYTHON.cmake \ +FindSWIG.cmake \ +install_python_from_idl.cmake \ +install_and_compile_python_file.cmake diff --git a/salome_adm/cmake_files/deprecated/UseOMNIORB.cmake b/salome_adm/cmake_files/deprecated/UseOMNIORB.cmake new file mode 100644 index 000000000..d6f8e6f9c --- /dev/null +++ b/salome_adm/cmake_files/deprecated/UseOMNIORB.cmake @@ -0,0 +1,87 @@ +# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +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 "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)") + +# This MACRO uses the following vars +# - OMNIORB_IDL : the idl tool (given by default by FindOMNIORB.cmake) +# - OMNIORB_IDLCXXFLAGS : the options (include excluded) to give to omniidl generator (given by default by FindOMNIORB.cmake) +# +# MYMODULE is a string that will be used to create a target with sources containing *.cc coming from the compilation of ${MYIDLFILES} +# MYIDLFILES containing all idl files to be compiled. +# MYIDLCXXFLAGS containing all directories (only directories) where to find *.idl which depend ${MYIDLFILES}. +# TYPE contains type of the library +MACRO(OMNIORB_ADD_MODULE MYMODULE MYIDLFILES MYIDLCXXFLAGS TYPE) + SET(MYSOURCES) + FOREACH(input ${MYIDLFILES}) + GET_FILENAME_COMPONENT(base ${input} NAME_WE) +# STRING(REGEX REPLACE ".idl" "" base ${input}) + SET(OMNIORB_IDLCXXFLAGS2 "${OMNIORB_IDLCXXFLAGS}") + SET(src ${CMAKE_CURRENT_BINARY_DIR}/${base}SK.cc) + SET(MYSOURCES ${MYSOURCES} ${src}) + SET(outputs ${src}) + SET(dynsrc ${CMAKE_CURRENT_BINARY_DIR}/${base}DynSK.cc) + SET(MYSOURCES ${MYSOURCES} ${dynsrc}) + SET(outputs ${outputs} ${dynsrc}) + SET(inc ${CMAKE_CURRENT_BINARY_DIR}/${base}.hh) + SET(outputs ${outputs} ${inc}) + GET_FILENAME_COMPONENT(path ${input} PATH) + IF(NOT path) + SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input}) + ENDIF(NOT path) + SET(flags ${OMNIORB_IDLCXXFLAGS2}) + STRING(REGEX MATCH "-bcxx" ISBCXX ${flags}) + IF(NOT ISBCXX) + SET(flags -bcxx ${flags}) + ENDIF(NOT ISBCXX) + FOREACH(f ${MYIDLCXXFLAGS}) + SET(flags ${flags} "-I${f}") + ENDFOREACH(f ${MYIDLCXXFLAGS}) + ADD_CUSTOM_COMMAND(OUTPUT ${outputs} + COMMAND ${OMNIORB_IDL} ${flags} ${input} + MAIN_DEPENDENCY ${input}) + SET(IDLPYFLAGS ${flags}) + INSTALL(FILES ${input} DESTINATION idl/salome) + SET(IDL_HEADER ${CMAKE_CURRENT_BINARY_DIR}/${base}.hh) + INSTALL(FILES ${IDL_HEADER} DESTINATION include/salome) + SET(flags) + FOREACH(f ${MYIDLCXXFLAGS}) + SET(flags "${flags} -I${f}") + ENDFOREACH(f ${MYIDLCXXFLAGS}) + STRING(REGEX MATCH "-bpython" ISBPYTHON ${flags}) + IF(NOT ISBPYTHON) + SET(flags "-bpython ${flags}") + 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}\" )") + ENDFOREACH(input ${MYIDLFILES}) + ADD_LIBRARY(${MYMODULE} ${TYPE} ${MYSOURCES}) + +ENDMACRO(OMNIORB_ADD_MODULE) diff --git a/salome_adm/cmake_files/am2cmake.py b/salome_adm/cmake_files/deprecated/am2cmake.py similarity index 99% rename from salome_adm/cmake_files/am2cmake.py rename to salome_adm/cmake_files/deprecated/am2cmake.py index afb446bb0..ba583ed90 100644 --- a/salome_adm/cmake_files/am2cmake.py +++ b/salome_adm/cmake_files/deprecated/am2cmake.py @@ -503,7 +503,7 @@ class CMakeFile(object): 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/FindSalomeLIBBATCH.cmake) INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindSPHINX.cmake) """) pass @@ -523,7 +523,7 @@ class CMakeFile(object): INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSWIG.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBBATCH.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSalomeLIBBATCH.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake) ELSE(KERNEL_ROOT_DIR) INCLUDE(${CMAKE_SOURCE_DIR}/adm_local_without_kernel/cmake_files/FindPLATFORM.cmake) @@ -533,19 +533,19 @@ class CMakeFile(object): else: newlines.append(""" SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR}) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPYTHON.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindMPI.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindHDF5.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindBOOST.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSWIG.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindPLATFORM.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindPYTHON.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindOMNIORB.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindPTHREADS.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindMPI.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindHDF5.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindBOOST.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindLIBXML2.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindSWIG.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBBATCH.cmake) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindDOXYGEN.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSalomeLIBBATCH.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/FindKERNEL.cmake) """) pass if self.module == "gui": @@ -561,13 +561,13 @@ class CMakeFile(object): newlines.append(""" SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR}) IF(GUI_ROOT_DIR) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindCAS.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindQT4.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindOPENGL.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindVTK.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindQWT.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindSIPPYQT.cmake) - INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindGUI.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindCAS.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindQT4.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindOPENGL.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindVTK.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindQWT.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindSIPPYQT.cmake) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindGUI.cmake) ENDIF(GUI_ROOT_DIR) """) if self.module == "med": @@ -1449,7 +1449,7 @@ class CMakeFile(object): else: newlines.append(''' STRING(REPLACE "\\\\" "/" KERNEL_ROOT_DIR ${KERNEL_ROOT_DIR}) - INSTALL(SCRIPT ${KERNEL_ROOT_DIR}/salome_adm/cmake_files/install_python_from_idl.cmake) + INSTALL(SCRIPT ${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/install_python_from_idl.cmake) ''') pass newlines.append(''' @@ -2435,7 +2435,7 @@ class CMakeFile(object): else: newlines.append(''' STRING(REPLACE "\\\\" "/" KERNEL_ROOT_DIR ${KERNEL_ROOT_DIR}) - INSTALL(SCRIPT ${KERNEL_ROOT_DIR}/salome_adm/cmake_files/install_and_compile_python_file.cmake) + INSTALL(SCRIPT ${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/install_and_compile_python_file.cmake) ''') pass newlines.append(r''' diff --git a/salome_adm/cmake_files/install_and_compile_python_file.cmake b/salome_adm/cmake_files/deprecated/install_and_compile_python_file.cmake similarity index 100% rename from salome_adm/cmake_files/install_and_compile_python_file.cmake rename to salome_adm/cmake_files/deprecated/install_and_compile_python_file.cmake diff --git a/salome_adm/cmake_files/install_python_from_idl.cmake b/salome_adm/cmake_files/deprecated/install_python_from_idl.cmake similarity index 100% rename from salome_adm/cmake_files/install_python_from_idl.cmake rename to salome_adm/cmake_files/deprecated/install_python_from_idl.cmake diff --git a/salome_adm/unix/config_files/check_cas.m4 b/salome_adm/unix/config_files/check_cas.m4 index 98fa0bc5d..261c7437f 100644 --- a/salome_adm/unix/config_files/check_cas.m4 +++ b/salome_adm/unix/config_files/check_cas.m4 @@ -44,12 +44,13 @@ AC_SUBST(CAS_LDPATH) AC_SUBST(CAS_STDPLUGIN) AC_SUBST(CAS_LIBDIR) AC_SUBST(CAS_DATADIR) -AC_SUBST(OCC_VERSION_DEVELOPMENT) +AC_SUBST(CAS_VERSION_DEVELOPMENT) AC_SUBST(CASROOT) CAS_CPPFLAGS="" CAS_CXXFLAGS="" CAS_LDFLAGS="" +CAS_VERSION_DEVELOPMENT=0 occ_ok=no config_h=no @@ -113,7 +114,6 @@ else OCC_VERSION_MAJOR=0 OCC_VERSION_MINOR=0 OCC_VERSION_MAINTENANCE=0 - OCC_VERSION_DEVELOPMENT=0 if test -f $CASROOT/inc/Standard_Version.hxx; then ff=$CASROOT/inc/Standard_Version.hxx else @@ -134,11 +134,13 @@ else fi grep "define OCC_VERSION_DEVELOPMENT" $ff > /dev/null if test $? = 0 ; then - OCC_VERSION_DEVELOPMENT_STR=`grep "define OCC_VERSION_DEVELOPMENT" $ff | awk '{i=1 ; print $i}'` - if test "${OCC_VERSION_DEVELOPMENT_STR}" = "#define" ; then - OCC_VERSION_DEVELOPMENT=1 + CAS_VERSION_DEVELOPMENT_STR=`grep "define OCC_VERSION_DEVELOPMENT" $ff | awk '{i=3 ; print $i}'` + CAS_VERSION_DEVELOPMENT_FLAG=`grep "define OCC_VERSION_DEVELOPMENT" $ff | awk '{i=1 ; print $i}'` + if test "${CAS_VERSION_DEVELOPMENT_FLAG}" = "#define" -a "${CAS_VERSION_DEVELOPMENT_STR}" = "\"dev\"" ; then + # version is development if OCC_VERSION_DEVELOPMENT is defined (not commented) in Standard_Version.hxx + # and equal to "dev"; such values as "beta1", "rc1", etc are considered as non-development version + CAS_VERSION_DEVELOPMENT=1 fi - dnl OCC_VERSION_DEVELOPMENT=1 fi AC_MSG_CHECKING(for OpenCascade data files) if test -f ${CASROOT}/src/UnitsAPI/Lexi_Expr.dat; then @@ -188,6 +190,11 @@ case $host_os in CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DOCC_VERSION_MINOR=$OCC_VERSION_MINOR -DOCC_VERSION_MAINTENANCE=$OCC_VERSION_MAINTENANCE -DLIN -DLINTEL -DCSFDB -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DHAVE_WOK_CONFIG_H -I$CASROOT/inc" ;; esac + + if test "$CAS_VERSION_DEVELOPMENT" = "1" ; then + CAS_CPPFLAGS="$CAS_CPPFLAGS -DCAS_VERSION_DEVELOPMENT" + fi + CPPFLAGS="$CPPFLAGS $CAS_CPPFLAGS" echo diff --git a/src/Basics/Basics_OCCTVersion.hxx b/src/Basics/Basics_OCCTVersion.hxx index b8cb0814a..3196136fd 100644 --- a/src/Basics/Basics_OCCTVersion.hxx +++ b/src/Basics/Basics_OCCTVersion.hxx @@ -28,10 +28,15 @@ #include +// +// NOTE: CAS_VERSION_DEVELOPMENT macro is defined via command line in contrast to OCC_VERSION_DEVELOPMENT +// which is specified in the Standard_Version.hxx +// + #ifdef OCC_VERSION_SERVICEPACK # define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK) #else -# ifdef OCC_VERSION_DEVELOPMENT +# ifdef CAS_VERSION_DEVELOPMENT # define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | 1) # else # define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8) diff --git a/src/Communication/CMakeLists.txt b/src/Communication/CMakeLists.txt index bafc0d96e..1de4ed321 100755 --- a/src/Communication/CMakeLists.txt +++ b/src/Communication/CMakeLists.txt @@ -45,15 +45,6 @@ SET(SalomeCommunication_SOURCES SALOMEMultiComm.cxx ReceiverFactory.cxx MatrixClient.cxx - MultiCommException.hxx - SALOME_Comm_i.hxx - SALOME_Matrix_i.hxx - SenderFactory.hxx - ReceiverFactory.hxx - MatrixClient.hxx - SALOMEMultiComm.hxx - Receivers.hxx - Receiver.hxx ) ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${MPI_CXX_COMPILE_FLAGS}) @@ -68,7 +59,6 @@ SET(COMMON_HEADERS_HXX Receiver.hxx ReceiverFactory.hxx Receivers.hxx - Receivers.cxx SALOMEMultiComm.hxx SALOME_Comm_i.hxx SALOME_Communication.hxx diff --git a/src/Communication_SWIG/CMakeLists.txt b/src/Communication_SWIG/CMakeLists.txt index 6741aa09b..49bdecdd4 100755 --- a/src/Communication_SWIG/CMakeLists.txt +++ b/src/Communication_SWIG/CMakeLists.txt @@ -57,5 +57,7 @@ IF(${MACHINE} STREQUAL WINDOWS) SET_TARGET_PROPERTIES(_libSALOME_Comm PROPERTIES DEBUG_OUTPUT_NAME _libSALOME_Comm_d) ENDIF(${MACHINE} STREQUAL WINDOWS) +ADD_DEPENDENCIES(_libSALOME_Comm SalomeIDLKernel) + INSTALL(TARGETS _libSALOME_Comm DESTINATION ${KERNEL_salomepythondir}) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_Comm.py DESTINATION ${KERNEL_salomepythondir}) diff --git a/src/DF/CMakeLists.txt b/src/DF/CMakeLists.txt index 6dfba2a5f..2de237a2f 100755 --- a/src/DF/CMakeLists.txt +++ b/src/DF/CMakeLists.txt @@ -29,13 +29,6 @@ SET(DF_SOURCES DF_Application.cxx DF_ChildIterator.cxx DF_Container.cxx - DF_Attribute.hxx - DF_Label.hxx - DF_Application.hxx - DF_Document.hxx - DF_ChildIterator.hxx - DF_Container.hxx - DF_definitions.hxx ) ADD_LIBRARY(DF ${DF_SOURCES}) diff --git a/src/DSC/DSC_User/Datastream/Palm/CMakeLists.txt b/src/DSC/DSC_User/Datastream/Palm/CMakeLists.txt index 6a5cacff2..fecc247bd 100755 --- a/src/DSC/DSC_User/Datastream/Palm/CMakeLists.txt +++ b/src/DSC/DSC_User/Datastream/Palm/CMakeLists.txt @@ -32,12 +32,14 @@ INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR}/idl ) + ADD_DEFINITIONS(${OMNIORB_DEFINITIONS}) ADD_LIBRARY(SalomePalm palm_port_factory.cxx) TARGET_LINK_LIBRARIES(SalomePalm SalomeDSCSuperv ${OMNIORB_LIBRARIES}) ADD_EXECUTABLE(test_DataIdContainer_Palm test_DataIdContainer.cxx) +ADD_DEPENDENCIES(test_DataIdContainer_Palm SalomeIDLKernel) TARGET_LINK_LIBRARIES(test_DataIdContainer_Palm ${OMNIORB_LIBRARIES}) FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") diff --git a/src/KERNEL_PY/salome_ComponentGUI.py b/src/KERNEL_PY/salome_ComponentGUI.py index 6cb692dcb..f55fea4b6 100644 --- a/src/KERNEL_PY/salome_ComponentGUI.py +++ b/src/KERNEL_PY/salome_ComponentGUI.py @@ -49,6 +49,26 @@ def UpdateViewer(): #-------------------------------------------------------------------------- +def setDisplayMode(objId, mode): + return + + #-------------------------------------------------------------------------- + +def setTransparency(objId, tValue): + return + + #-------------------------------------------------------------------------- + +def setColor(objId, r,g,b): + return + + #-------------------------------------------------------------------------- + +def setVectorsMode(objId, mode): + return + + #-------------------------------------------------------------------------- + # --- From SMESHGUI_SWIG #-------------------------------------------------------------------------- diff --git a/src/Launcher/CMakeLists.txt b/src/Launcher/CMakeLists.txt index f8ee6e1b8..47bdcf83f 100755 --- a/src/Launcher/CMakeLists.txt +++ b/src/Launcher/CMakeLists.txt @@ -37,9 +37,9 @@ INCLUDE_DIRECTORIES( ) ADD_DEFINITIONS(${MPI_CXX_COMPILE_FLAGS} ${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS}) -IF(SALOME_USE_LIBBATCH) +IF(SALOME_USE_LIBBATCH AND LIBBATCH_FOUND) ADD_DEFINITIONS(-DWITH_LIBBATCH) -ENDIF(SALOME_USE_LIBBATCH) +ENDIF(SALOME_USE_LIBBATCH AND LIBBATCH_FOUND) # This local variable defines the list of dependant libraries common to all target in this package. SET(COMMON_LIBS @@ -52,7 +52,7 @@ SET(COMMON_LIBS SALOMELocalTrace SALOMEBasics SalomeIDLKernel - ${LIBBATCH_LIBS} + ${LIBBATCH_LIBRARIES} ${MPI_CXX_LIBRARIES} ${OMNIORB_LIBRARIES} ${LIBXML2_LIBRARIES} @@ -62,7 +62,6 @@ SET(COMMON_LIBS SET(Launcher_SOURCES SALOME_Launcher_Parser.cxx SALOME_Launcher_Handler.cxx - Launcher_Utils.hxx Launcher_Job.cxx Launcher_Job_Command.cxx Launcher_Job_SALOME.cxx @@ -72,7 +71,7 @@ SET(Launcher_SOURCES ) ADD_LIBRARY(Launcher ${Launcher_SOURCES}) -TARGET_LINK_LIBRARIES(Launcher ResourcesManager ${LIBBATCH_LIBS} ${MPI_CXX_LIBRARIES} ${LIBXML2_LIBS}) +TARGET_LINK_LIBRARIES(Launcher ResourcesManager ${LIBBATCH_LIBRARIES} ${MPI_CXX_LIBRARIES} ${LIBXML2_LIBS}) INSTALL(TARGETS Launcher DESTINATION ${KERNEL_salomelib_LIBS}) SET(TestLauncher_LIBS @@ -80,7 +79,7 @@ SET(TestLauncher_LIBS ResourcesManager Launcher OpUtil - ${LIBBATCH_LIBS} + ${LIBBATCH_LIBRARIES} ) ADD_EXECUTABLE(TestLauncher TestLauncher.cxx) @@ -97,7 +96,7 @@ IF(NOT WITHONLYLAUNCHER) SalomeLauncher SALOMEBasics SALOMELocalTrace - ${LIBBATCH_LIBS} + ${LIBBATCH_LIBRARIES} ${MPI_CXX_LIBRARIES} ${OMNIORB_LIBRARIES} ${LIBXML2_LIBRARIES} diff --git a/src/NamingService/CMakeLists.txt b/src/NamingService/CMakeLists.txt index 8859acd39..53cc261e1 100755 --- a/src/NamingService/CMakeLists.txt +++ b/src/NamingService/CMakeLists.txt @@ -33,9 +33,12 @@ SET(SalomeNS_SOURCES NamingService_WaitForServerReadiness.cxx ) + ADD_DEFINITIONS(${OMNIORB_DEFINITIONS}) ADD_LIBRARY(SalomeNS ${SalomeNS_SOURCES}) +ADD_DEPENDENCIES(SalomeNS SalomeIDLKernel) TARGET_LINK_LIBRARIES(SalomeNS OpUtil) + INSTALL(TARGETS SalomeNS DESTINATION ${KERNEL_salomelib_LIBS}) # Executable scripts to be installed diff --git a/src/SALOMEDSImpl/CMakeLists.txt b/src/SALOMEDSImpl/CMakeLists.txt index c98ef85b9..09b888370 100755 --- a/src/SALOMEDSImpl/CMakeLists.txt +++ b/src/SALOMEDSImpl/CMakeLists.txt @@ -90,57 +90,6 @@ SET(SalomeDSImpl_SOURCES SALOMEDSImpl_TMPFile.cxx SALOMEDSImpl_GenericVariable.cxx SALOMEDSImpl_ScalarVariable.cxx - SALOMEDSImpl_AttributeComment.hxx - SALOMEDSImpl_AttributeDrawable.hxx - SALOMEDSImpl_AttributeExpandable.hxx - SALOMEDSImpl_AttributeExternalFileDef.hxx - SALOMEDSImpl_AttributeFileType.hxx - SALOMEDSImpl_AttributeFlags.hxx - SALOMEDSImpl_AttributeGraphic.hxx - SALOMEDSImpl_AttributeInteger.hxx - SALOMEDSImpl_AttributeIOR.hxx - SALOMEDSImpl_AttributeLocalID.hxx - SALOMEDSImpl_AttributeName.hxx - SALOMEDSImpl_AttributeOpened.hxx - SALOMEDSImpl_AttributePersistentRef.hxx - SALOMEDSImpl_AttributePixMap.hxx - SALOMEDSImpl_AttributePythonObject.hxx - SALOMEDSImpl_AttributeReal.hxx - SALOMEDSImpl_AttributeReference.hxx - SALOMEDSImpl_AttributeSelectable.hxx - SALOMEDSImpl_AttributeSequenceOfInteger.hxx - SALOMEDSImpl_AttributeSequenceOfReal.hxx - SALOMEDSImpl_Attributes.hxx - SALOMEDSImpl_AttributeStudyProperties.hxx - SALOMEDSImpl_AttributeTable.hxx - SALOMEDSImpl_AttributeTableOfInteger.hxx - SALOMEDSImpl_AttributeTableOfReal.hxx - SALOMEDSImpl_AttributeTableOfString.hxx - SALOMEDSImpl_AttributeTarget.hxx - SALOMEDSImpl_AttributeTextColor.hxx - SALOMEDSImpl_AttributeTextHighlightColor.hxx - SALOMEDSImpl_AttributeTreeNode.hxx - SALOMEDSImpl_AttributeUserID.hxx - SALOMEDSImpl_AttributeParameter.hxx - SALOMEDSImpl_AttributeString.hxx - SALOMEDSImpl_Callback.hxx - SALOMEDSImpl_ChildIterator.hxx - SALOMEDSImpl_ChildNodeIterator.hxx - SALOMEDSImpl_Defines.hxx - SALOMEDSImpl_Driver.hxx - SALOMEDSImpl_GenericAttribute.hxx - SALOMEDSImpl_SComponent.hxx - SALOMEDSImpl_SComponentIterator.hxx - SALOMEDSImpl_SObject.hxx - SALOMEDSImpl_StudyBuilder.hxx - SALOMEDSImpl_StudyHandle.hxx - SALOMEDSImpl_Study.hxx - SALOMEDSImpl_StudyManager.hxx - SALOMEDSImpl_Tool.hxx - SALOMEDSImpl_UseCaseBuilder.hxx - SALOMEDSImpl_UseCaseIterator.hxx - SALOMEDSImpl_GenericVariable.hxx - SALOMEDSImpl_ScalarVariable.hxx ) ADD_LIBRARY(SalomeDSImpl ${SalomeDSImpl_SOURCES}) -- 2.39.2