${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
-# Our own set of macros:
-LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/salome_adm/cmake_files")
-INCLUDE(SalomeMacros)
+# Common CMake macros
+# ===================
+SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
+IF(EXISTS ${CONFIGURATION_ROOT_DIR})
+ LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
+ INCLUDE(SalomeMacros)
+ELSE()
+ MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
+ENDIF()
# Platform setup
# ==============
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# -* Makefile *-
-# Author : Patrick GOLDBRONN (CEA)
-# Date : 28/06/2001
-# $Header$
-# source path
-#
-top_srcdir=@top_srcdir@
-top_builddir=.
-srcdir=@srcdir@
-VPATH=.:@srcdir@:@top_srcdir@/bin:./bin/salome:@top_srcdir@/resources:./bin:@top_srcdir@/idl
-
-
-@COMMENCE@
-
-SUBDIRS = idl src doc salome_adm
-
-RESOURCES_FILES = \
-CatalogDataType.xml \
-KERNELCatalog.xml \
-CatalogResources.xml \
-close.png \
-config \
-channel.cfg \
-SALOMEDS_Resources
-
-BIN_SCRIPT= \
-runIDLparser \
-VERSION \
-orbmodule.py \
-runSalome.py \
-killSalome.py \
-killSalomeWithPort.py \
-runSalome \
-runSalome.csh \
-runNS.sh \
-createAppli.sh \
-launchConfigureParser.py \
-salome.launch \
-envSalome.py \
-salomeConsole.py \
-showNS.py \
-addToKillList.py
-
-# copy header files in common directory
-include_list=\
- include/salome/SALOMEconfig.h
-
-inc: idl $(include_list)
-
-include/salome/SALOMEconfig.h: salome_adm/unix/SALOMEconfig.ref
- -$(RM) $@
- $(LN_S) ../../$< $@
-
-# test if SALOMEconfig.h has changed (contents)
-salome_adm/unix/SALOMEconfig.ref: salome_adm/unix/SALOMEconfig.h
- @if ! [ -a $@ ]; then \
- cp -p $< $@; \
- fi; \
- if ! cmp $< $@; then \
- cp -p $< $@; \
- fi; \
-
-depend: depend_idl
-
-depend_idl:
- (cd idl ; $(MAKE) $@) || exit 1
-
-# doc is already build : if you want to had documents, go manually to doc and run 'make doc'
-
-
-DOCFILES=\
- README.FIRST.html
-
-rstdoc: $(DOCFILES)
- (cd doc && $(MAKE) $@) || exit 1
-
-
-# Install make_commence make_conclude ... for other modules
-install-make:
- ($(INSTALL) -d $(incmakedir) || exit 1);
- (sed 's/^prefix=/#prefix=/' $(top_builddir)/salome_adm/unix/make_commence > $(incmakedir)/make_commence || exit 1);
- (sed 's/^prefix=/#prefix=/' $(top_builddir)/salome_adm/unix/make_conclude > $(incmakedir)/make_conclude || exit 1);
-
-
-install-end:
-# finish libtool install
-# @$(LT) --mode=finish $(libdir)
-
-install-include: $(include_list)
- $(INSTALL) -d $(includedir)
- @for f in X $(include_list); do \
- if test $$f != X; then \
- (cp -p $$f $(includedir) || exit 1); \
- fi; \
- done
-
-# install script in $(bindir) :
-install-appliskel:
- $(INSTALL) -d $(bindir)
- if test -d $(top_builddir)/bin/salome/appliskel; then \
- cp -rp $(top_builddir)/bin/salome/appliskel $(bindir); \
- fi;
-
-install-bin: $(BIN_SCRIPT)
- $(INSTALL) -d $(bindir)
- $(INSTALL_PROGRAM) $^ $(bindir)
-
-# install Plugin file
-install-plugin: $(top_builddir)/share/salome/resources/Plugin
- ($(INSTALL_DATA) $^ $(datadir)/resources/. || exit 1); \
-
-uninstall: uninstall-idl
-
-uninstall-idl:
- $(RM) $(idldir)/*.idl
-
-distclean: distclean-other
-
-distclean-other:
- -$(RM) salome_adm/unix/*~ salome_adm/unix/*% salome_adm/unix/*.bak salome_adm/unix/*.new salome_adm/unix/*.old
- -$(RM) salome_adm/unix/make_*
- -$(RM) salome_adm/unix/depend salome_adm/unix/SALOMEconfig.h
- -$(RM) config.cache config.log config.status
-
-@MODULE@
-
-$(top_builddir)/share/salome/resources/Plugin: resources/Plugin
- cp -f $< $@ ; \
-
-resources: $(top_builddir)/share/salome/resources/Plugin
-
-install: install-bin install-appliskel install-include install-make install-plugin install-end
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# PLEASE DO NOT MODIFY configure.in FILE
-# ALL CHANGES WILL BE DISCARDED BY THE NEXT
-# build_configure COMMAND
-# CHANGES MUST BE MADE IN configure.in.base FILE
-# Author : Marc Tajchman (CEA)
-# Date : 28/06/2001
-# Modified by : Patrick GOLDBRONN (CEA)
-# Modified by : Marc Tajchman (CEA)
-# Created from configure.in.base
-#
-AS_SHELL_SANITIZES
-AC_INIT(src)
-AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
-AC_CANONICAL_HOST
-
-PACKAGE=salome
-AC_SUBST(PACKAGE)
-
-VERSION=3.2.1
-AC_SUBST(VERSION)
-XVERSION=0x030201
-AC_SUBST(XVERSION)
-
-# set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
-MODULE_NAME=kernel
-AC_SUBST(MODULE_NAME)
-
-dnl
-dnl Initialize source and build root directories
-dnl
-
-ROOT_BUILDDIR=`pwd`
-ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
-cd $ROOT_SRCDIR
-ROOT_SRCDIR=`pwd`
-cd $ROOT_BUILDDIR
-
-AC_SUBST(ROOT_SRCDIR)
-AC_SUBST(ROOT_BUILDDIR)
-dnl ##########################################################
-AC_SUBST(KERNEL_ROOT_DIR)
-dnl ##########################################################
-
-
-echo
-echo Source root directory : $ROOT_SRCDIR
-echo Build root directory : $ROOT_BUILDDIR
-echo
-echo
-
-dnl Modification B. Secher portage sur osf
-AC_CHECK_PROG(SHELL,sh)
-AC_SUBST(SHELL)
-
-if test -z "$AR"; then
- AC_CHECK_PROGS(AR,ar xar,:,$PATH)
-fi
-AC_SUBST(AR)
-
-dnl Export the AR macro so that it will be placed in the libtool file
-dnl correctly.
-export AR
-
-echo
-echo ---------------------------------------------
-echo testing make
-echo ---------------------------------------------
-echo
-
-AC_PROG_MAKE_SET
-AC_PROG_INSTALL
-dnl
-dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
-
-AC_ENABLE_DEBUG(yes)
-AC_DISABLE_PRODUCTION
-
-echo ---------------------------------------------
-echo testing libtool
-echo ---------------------------------------------
-
-dnl first, we set static to no!
-dnl if we want it, use --enable-static
-AC_ENABLE_STATIC(no)
-
-AC_LIBTOOL_DLOPEN
-AC_PROG_LIBTOOL
-
-dnl Fix up the INSTALL macro if it s a relative path. We want the
-dnl full-path to the binary instead.
-case "$INSTALL" in
- *install-sh*)
- INSTALL="${ROOT_SRCDIR}/salome_adm/unix/config_files/install-sh -c"
- ;;
-esac
-
-echo
-echo ---------------------------------------------
-echo testing C/C++
-echo ---------------------------------------------
-echo
-
-cc_ok=no
-dnl inutil car libtool
-dnl AC_PROG_CC
-AC_PROG_CXX
-AC_CXX_WARNINGS
-AC_CXX_TEMPLATE_OPTIONS
-AC_DEPEND_FLAG
-# AC_CC_WARNINGS([ansi])
-cc_ok=yes
-
-dnl Library libdl :
-AC_CHECK_LIB(dl,dlopen)
-
-dnl Library librt : for alpha/osf
-AC_CHECK_LIB(rt,nanosleep)
-
-dnl add library libm :
-AC_CHECK_LIB(m,ceil)
-
-AC_CXX_USE_STD_IOSTREAM
-AC_CXX_HAVE_SSTREAM
-
-dnl
-dnl ---------------------------------------------
-dnl testing linker
-dnl ---------------------------------------------
-dnl
-
-AC_LINKER_OPTIONS
-
-echo
-echo ---------------------------------------------
-echo testing threads
-echo ---------------------------------------------
-echo
-
-ENABLE_PTHREADS
-
-dnl
-dnl ---------------------------------------------
-dnl testing WITHIHM
-dnl ---------------------------------------------
-dnl
-
-CHECK_WITHIHM
-
-echo
-echo ---------------------------------------------
-echo BOOST Library
-echo ---------------------------------------------
-echo
-
-CHECK_BOOST
-
-dnl
-dnl ---------------------------------------------
-dnl testing MPI
-dnl ---------------------------------------------
-dnl
-
-CHECK_MPI
-
-dnl
-dnl ---------------------------------------------
-dnl testing sockets
-dnl ---------------------------------------------
-dnl
-
-CHECK_SOCKETS
-
-dnl
-dnl ---------------------------------------------
-dnl testing OpenPBS
-dnl ---------------------------------------------
-dnl
-
-echo
-echo ---------------------------------------------
-echo testing OpenPBS
-echo ---------------------------------------------
-echo
-
-openpbs_ok=no
-CHECK_OPENPBS
-dnl openpbs_ok is set to yes by CHECK_OPENPBS
-
-dnl
-dnl ---------------------------------------------
-dnl testing LSF
-dnl ---------------------------------------------
-dnl
-
-echo
-echo ---------------------------------------------
-echo testing LSF
-echo ---------------------------------------------
-echo
-
-lsf_ok=no
-CHECK_LSF
-dnl lsf_ok is set to yes by CHECK_LSF
-
-dnl
-dnl ---------------------------------------------
-dnl testing Batch
-dnl ---------------------------------------------
-dnl
-
-WITH_BATCH=no
-test x$openpbs_ok = xyes || test x$lsf_ok = xyes && WITH_BATCH=yes
-AC_SUBST(WITH_BATCH)
-
-echo
-echo ---------------------------------------------
-echo testing LEX \& YACC
-echo ---------------------------------------------
-echo
-
-lex_yacc_ok=no
-AC_PROG_YACC
-AC_PROG_LEX
-lex_yacc_ok=yes
-
-echo
-echo ---------------------------------------------
-echo testing python
-echo ---------------------------------------------
-echo
-
-CHECK_PYTHON
-
-dnl echo
-dnl echo ---------------------------------------------
-dnl echo testing java
-dnl echo ---------------------------------------------
-dnl echo
-
-dnl CHECK_JAVA
-
-echo
-echo ---------------------------------------------
-echo testing swig
-echo ---------------------------------------------
-echo
-
-CHECK_SWIG
-
-echo
-echo ---------------------------------------------
-echo testing omniORB
-echo ---------------------------------------------
-echo
-
-CHECK_OMNIORB
-
-dnl echo
-dnl echo ---------------------------------------------
-dnl echo testing mico
-dnl echo ---------------------------------------------
-dnl echo
-
-dnl CHECK_MICO
-
-echo
-echo ---------------------------------------------
-echo default ORB : omniORB
-echo ---------------------------------------------
-echo
-
-DEFAULT_ORB=omniORB
-CHECK_CORBA
-
-AC_SUBST_FILE(CORBA)
-corba=make_$ORB
-CORBA=salome_adm/unix/$corba
-
-
-echo
-echo ---------------------------------------------
-echo testing QT
-echo ---------------------------------------------
-echo
-
-CHECK_QT
-
-echo
-echo ----------------------------------------------
-echo testing CPPUNIT only required for unit testing
-echo ----------------------------------------------
-echo
-
-CHECK_CPPUNIT
-
-if test "X$WITHIHM" = "Xyes"; then
- echo
- echo ---------------------------------------------
- echo Testing sip
- echo ---------------------------------------------
- echo
-
- CHECK_SIP
-
- echo
- echo ---------------------------------------------
- echo testing openGL
- echo ---------------------------------------------
- echo
-
- CHECK_OPENGL
-
- echo
- echo ---------------------------------------------
- echo testing VTK
- echo ---------------------------------------------
- echo
-
- CHECK_VTK
-
- echo
- echo ---------------------------------------------
- echo Testing pyqt
- echo ---------------------------------------------
- echo
-
- CHECK_PYQT
-
- echo
- echo ---------------------------------------------
- echo Testing qwt
- echo ---------------------------------------------
- echo
-
- CHECK_QWT
-fi
-
-echo
-echo ---------------------------------------------
-echo testing HDF5
-echo ---------------------------------------------
-echo
-
-CHECK_HDF5
-
-echo
-echo ---------------------------------------------
-echo Testing OpenCascade
-echo ---------------------------------------------
-echo
-
-CHECK_CAS
-
-echo
-echo ---------------------------------------------
-echo Testing html generators
-echo ---------------------------------------------
-echo
-
-CHECK_HTML_GENERATORS
-
-echo
-echo ---------------------------------------------
-echo Summary
-echo ---------------------------------------------
-echo
-
-echo Configure
-variables="cc_ok boost_ok lex_yacc_ok mpi_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok"
-
-for var in $variables
-do
- eval toto=\$$var
- if test x$toto != "x"; then
- printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
- eval echo \$$var
- fi
-done
-echo "---Optional:"
-variables="cppunit_ok openpbs_ok lsf_ok"
-
-for var in $variables
-do
- eval toto=\$$var
- if test x$toto != "x"; then
- printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
- eval echo \$$var
- fi
-done
-
-echo
-echo "Default ORB : $DEFAULT_ORB"
-echo
-
-dnl generals files which could be included in every makefile
-
-AC_SUBST_FILE(COMMENCE) COMMENCE=salome_adm/unix/make_commence
-AC_SUBST_FILE(CONCLUDE) CONCLUDE=salome_adm/unix/make_conclude
-AC_SUBST_FILE(MODULE) MODULE=salome_adm/unix/make_module
-
-dnl les dependences
-AC_SUBST_FILE(DEPEND) DEPEND=salome_adm/unix/depend
-
-dnl We don t need to say when we re entering directories if we re using
-dnl GNU make becuase make does it for us.
-if test "X$GMAKE" = "Xyes"; then
- AC_SUBST(SETX) SETX=":"
-else
- AC_SUBST(SETX) SETX="set -x"
-fi
-
-# make other build directories
-for rep in salome_adm adm_local doc bin/salome include/salome lib${LIB_LOCATION_SUFFIX}/salome share/salome/resources/${MODULE_NAME} idl
-# if test ! -d $rep ; then
-# eval mkdir $rep
-# fi
- $INSTALL -d $rep
-done
-
-echo
-echo ---------------------------------------------
-echo copying resource files, shell scripts, and
-echo xml files
-echo ---------------------------------------------
-echo
-
-
-dnl copy resources directories
-
-#for i in `find $ROOT_SRCDIR -name 'resources' -print`
-#do
-# local_res=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
-# local_res_dir=`echo $local_res | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
-# mkdir -p $local_res_dir
-# cd $local_res_dir
-# ln -fs $i
-# echo $local_res
-# cd $ROOT_BUILDDIR
-#done
-
-dnl copy shells and utilities contained in the bin directory
-dnl excluding .in files (treated in AC-OUTPUT below) and CVS
-dnl directory
-
-mkdir -p bin/salome
-cd bin/salome
-for i in `find $ROOT_SRCDIR/bin`
-do
- local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR/bin,.,"`
- case "$local_bin" in
- *.in | *~) ;;
- . | */CVS | */CVS/* | ./salome) ;;
- ./appliskel |./appliskel/env.d) $INSTALL -d $local_bin ; echo $local_bin ;;
- *) $INSTALL $i $local_bin; echo $local_bin ;;
- esac
-done
-cd $ROOT_BUILDDIR
-
-AC_SUBST_FILE(ENVSCRIPT) ENVSCRIPT=salome_adm/unix/envScript
-
-dnl copy xml files to the build tree (lib directory)
-dnl pourquoi ????
-
-#cd lib
-#for i in `find $ROOT_SRCDIR -name "*.xml" -print`
-#do
-# ln -fs $i
-# echo `echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
-#done
-#cd $ROOT_BUILDDIR
-
-echo
-echo ---------------------------------------------
-echo generating Makefiles and configure files
-echo ---------------------------------------------
-echo
-
-AC_OUTPUT_COMMANDS([ \
- chmod +x ./bin/*; \
- chmod +x ./bin/salome/* \
-])
-
-## do not delete this line
-
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# make_config.in: template for make_config script
-# make_config is used by check_cas.m4 to generate
-# config.h file in case it cannot be found in OCC
-# and SALOME include paths
-#=================================================
-#
-dnl Process this file with autoconf to produce a configure script.
-
-AC_INIT(salome_adm/unix)
-AC_CONFIG_SRCDIR(salome_adm/unix/config.h.in)
-AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
-AC_CANONICAL_HOST
-
-AC_CONFIG_HEADERS(./salome_adm/unix/config.h)
-
-AC_ISC_POSIX
-AC_C_BIGENDIAN
-
-dnl Checks for programs.
-AC_PROG_CXX
-AC_PROG_CC_C_O
-
-AC_PROG_AWK
-AC_PROG_INSTALL
-AC_PROG_LN_S
-AC_PROG_YACC
-AC_PROG_MAKE_SET
-
-dnl Replace `main' with a function in -le:
-AC_CHECK_LIB(e, main)
-
-dnl Replace `main' with a function in -links:
-AC_CHECK_LIB(inks, main)
-
-dnl Checks for X window system directories.
-AC_PATH_X
-if test "x$ac_x_includes" = "x"; then
- X_INCLUDE=""
-else
- X_INCLUDE="-I$ac_x_includes"
-fi
-if test "x$ac_x_libraries" = "x"; then
- X_LIBS="-lXt -lX11"
-else
- X_LIBS="-L$ac_x_libraries -lXt -lX11"
-fi
-
-dnl Checks for header files.
-
-AC_HEADER_STDC
-AC_LANG([C])
-AC_MSG_CHECKING([ for C header files ])
-AC_CHECK_HEADERS(dlfcn.h dl.h ieeefp.h time.h sys/time.h pwd.h)
-AC_CHECK_HEADERS(sys/statvfs.h sys/vfs.h sys/param.h osfcn.h netdb.h)
-AC_CHECK_HEADERS(sys/ioctl.h net/if.h sys/systeminfo.h sys/utsname.h)
-AC_CHECK_HEADERS(sysent.h unistd.h sys/unistd.h sys/socket.h)
-AC_CHECK_HEADERS(ndir.h sys/ndir.h sys/dir.h signal.h sys/signal.h)
-AC_CHECK_HEADERS(sigfpe.h floatingpoint.h sys/machsig.h sys/siginfo.h)
-AC_CHECK_HEADERS(malloc.h strings.h sys/stat.h sys/sem.h sys/ipc.h)
-AC_CHECK_HEADERS(sys/times.h dirent.h getopt.h sys/vnode.h)
-
-
-AC_LANG([C++])
-AC_MSG_CHECKING([ for C++ header files ])
-AC_CHECK_HEADERS(istream ostream istream fstream ios iomanip iostream )
-AC_CHECK_HEADERS(stream.h strstream.h istream.h ostream.h fstream.h stdlib.h ios.h iostream.h)
-AC_CHECK_HEADERS(iomanip.h limits.h values.h float.h)
-AC_CHECK_HEADERS(siginfo.h bits/sigset.h bstring.h sys/types.h sys/select.h)
-AC_CHECK_HEADERS(X11/extensions/transovl.h X11/extensions/readdisplay.h)
-AC_CHECK_HEADERS(X11/extensions/multibuf.h)
-AC_CHECK_HEADERS(sys/filio.h sys/mman.h libc.h)
-
-dnl Checks for library functions.
-AC_TYPE_SIGNAL
-
-AC_OUTPUT()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/SalomeMacros.cmake)
-
SALOME_CONFIGURE_FILE(doxyfile.in doxyfile)
SALOME_CONFIGURE_FILE(static/header.html.in static/header.html)
-SET(gen_doc "${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/prepare_generating_doc.py")
+SET(gen_doc "${CMAKE_SOURCE_DIR}/salome_adm/prepare_generating_doc.py")
IF(WIN32)
STRING(REPLACE "/" "\\" gen_doc ${gen_doc})
ENDIF(WIN32)
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(${PROJECT_SOURCE_DIR}/salome_adm/cmake_files/UseOmniORB.cmake)
+INCLUDE(${CONFIGURATION_ROOT_DIR}/cmake/UseOmniORB.cmake)
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR}
#
ADD_SUBDIRECTORY(unix)
-ADD_SUBDIRECTORY(cmake_files)
SALOME_CONFIGURE_FILE(SALOMEconfig.ref.in SALOMEconfig.h INSTALL ${SALOME_INSTALL_HEADERS})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/SALOMEconfig.ref.in DESTINATION ${SALOME_INSTALL_AMCONFIG} RENAME SALOMEconfig.h.in)
\ No newline at end of file
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/SALOMEconfig.ref.in DESTINATION ${SALOME_INSTALL_AMCONFIG} RENAME SALOMEconfig.h.in)
+
+SALOME_INSTALL_SCRIPTS(prepare_generating_doc.py ${SALOME_INSTALL_SCRIPT_SCRIPTS})
+++ /dev/null
-# Copyright (C) 2012-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-ADD_SUBDIRECTORY(deprecated)
-
-# ===============================================================
-# Files to be installed
-# ===============================================================
-
-# These files are data, module or lib files
-SET(DATA
- FindCAS.cmake
- FindCppUnit.cmake
- FindGraphviz.cmake
- FindSalomeKERNEL.cmake
- FindOmniORB.cmake
- FindOmniORBPy.cmake
- FindPThread.cmake
- FindSalomeBoost.cmake
- FindSalomeCAS.cmake
- FindSalomeCppUnit.cmake
- FindSalomeDoxygen.cmake
- FindSalomeGraphviz.cmake
- FindSalomeHDF5.cmake
- FindSalomeLibBatch.cmake
- FindSalomeLibXml2.cmake
- FindSalomeMEDFile.cmake
- FindSalomeMPI.cmake
- FindSalomeOmniORB.cmake
- FindSalomeOmniORBPy.cmake
- FindSalomePThread.cmake
- FindSalomePythonLibs.cmake
- FindSalomePythonInterp.cmake
- FindSalomeNumPySciPy.cmake
- FindSalomeSphinx.cmake
- FindSalomeSWIG.cmake
- FindSphinx.cmake
- FindSalomeVTK.cmake
- FindMEDFile.cmake
- UseOmniORB.cmake
- SalomeMacros.cmake
- SalomeSetupPlatform.cmake
-)
-INSTALL(FILES ${DATA} DESTINATION ${SALOME_INSTALL_CMAKE})
-
-# These files are executable scripts
-SALOME_INSTALL_SCRIPTS(prepare_generating_doc.py ${SALOME_INSTALL_SCRIPT_SCRIPTS})
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-IF(NOT CAS_FIND_QUIETLY)
- MESSAGE(STATUS "Looking for Open CASCADE Technology ...")
-ENDIF()
-
-SET(_CAS_VERSION_FILE_NAME Standard_Version.hxx)
-
-# Include directories:
-FIND_PATH(CAS_INCLUDE_DIRS ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES include/opencascade)
-FIND_FILE(CAS_VERSION_FILE ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES include/opencascade)
-IF(CAS_INCLUDE_DIRS)
- SET(CAS_UPCOUNT 2)
-ELSE()
- FIND_PATH(CAS_INCLUDE_DIRS ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES include inc)
- FIND_FILE(CAS_VERSION_FILE ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES include inc)
-ENDIF()
-MARK_AS_ADVANCED(CAS_VERSION_FILE)
-
-SET(CAS_VERSION_DEVELOPMENT 0)
-IF(CAS_VERSION_FILE)
- # Check if this is a development version:
- FILE(STRINGS ${CAS_VERSION_FILE} CAS_VERSION_DEVELOPMENT_STR
- REGEX "^ *#define OCC_VERSION_DEVELOPMENT")
- IF(CAS_VERSION_DEVELOPMENT_STR)
- SET(CAS_VERSION_DEVELOPMENT 1)
- ENDIF(CAS_VERSION_DEVELOPMENT_STR)
-
- # Extract actual version number:
- FILE(STRINGS ${CAS_VERSION_FILE} _tmp
- REGEX "^ *#define OCC_VERSION_COMPLETE *\"[^\"]*\".*$")
- STRING(REGEX REPLACE ".*\"([^\"]*)\".*" "\\1" CAS_VERSION_STR "${_tmp}")
-ENDIF()
-
-# Win specific stuff:
-IF(WIN32)
- IF(CMAKE_BUILD_TYPE STREQUAL Debug)
- SET(CMAKE_LIBRARY_PATH ${CAS_ROOT_DIR}/win32/libd)
- ELSE()
- SET(CMAKE_LIBRARY_PATH ${CAS_ROOT_DIR}/win32/lib)
- ENDIF()
-ENDIF()
-
-# Definitions:
-SET(CAS_DEFINITIONS "-DLIN -DLINTEL -DCSFDB")
-SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DNo_exception")
-
-# No config.h file in the OPEN CASCADE on WINDOWS platform
-IF(NOT WIN32)
- SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DHAVE_CONFIG_H")
-ENDIF()
-
-# Test for 64 bit machine:
-IF(CMAKE_SIZEOF_VOID_P STREQUAL 8)
- SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -D_OCC64")
-ENDIF()
-
-# Find Xmu library (X11 widgets?)
-IF(NOT WIN32)
- FIND_LIBRARY(CAS_Xmu Xmu)
- IF(Xmu)
- SET(CAS_LDPATH ${Xmu})
- ENDIF()
-ENDIF()
-
-IF(CAS_VERSION_STR VERSION_LESS "7.0.1")
- FIND_LIBRARY(CAS_FWOSPlugin FWOSPlugin PATH_SUFFIXES lib lin64/gcc/lib bin)
-ELSE()
- FIND_LIBRARY(CAS_TKStd TKStd PATH_SUFFIXES lib lin64/gcc/lib bin)
-ENDIF()
-FIND_LIBRARY(CAS_TKBin TKBin PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKBinL TKBinL PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKBinTObj TKBinTObj PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKBinXCAF TKBinXCAF PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKBO TKBO PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKBool TKBool PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKBRep TKBRep PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKCAF TKCAF PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKCDF TKCDF PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKernel TKernel PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKFeat TKFeat PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKFillet TKFillet PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKG2d TKG2d PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKG3d TKG3d PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKGeomAlgo TKGeomAlgo PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKGeomBase TKGeomBase PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKHLR TKHLR PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKIGES TKIGES PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKLCAF TKLCAF PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKMath TKMath PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKMesh TKMesh PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKMeshVS TKMeshVS PATH_SUFFIXES lib lin64/gcc/lib bin)
-IF(CAS_VERSION_STR VERSION_LESS "6.9.1")
- FIND_LIBRARY(CAS_TKNIS TKNIS PATH_SUFFIXES lib lin64/gcc/lib bin)
-ENDIF()
-FIND_LIBRARY(CAS_TKOffset TKOffset PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKOpenGl TKOpenGl PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKPrim TKPrim PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKService TKService PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKShHealing TKShHealing PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKSTEP TKSTEP PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKSTEP209 TKSTEP209 PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKSTEPAttr TKSTEPAttr PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKSTEPBase TKSTEPBase PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKSTL TKSTL PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKTObj TKTObj PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKTopAlgo TKTopAlgo PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKV3d TKV3d PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKVRML TKVRML PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKXCAF TKXCAF PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKXDEIGES TKXDEIGES PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKXDESTEP TKXDESTEP PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKXMesh TKXMesh PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKXml TKXml PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKXmlL TKXmlL PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKXmlTObj TKXmlTObj PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKXmlXCAF TKXmlXCAF PATH_SUFFIXES lib lin64/gcc/lib bin)
-FIND_LIBRARY(CAS_TKXSBase TKXSBase PATH_SUFFIXES lib lin64/gcc/lib bin)
-
-IF(CAS_VERSION_STR VERSION_LESS "7.0")
- FIND_LIBRARY(CAS_PTKernel PTKernel PATH_SUFFIXES lib lin64/gcc/lib bin)
- FIND_LIBRARY(CAS_TKPCAF TKPCAF PATH_SUFFIXES lib lin64/gcc/lib bin)
- FIND_LIBRARY(CAS_TKPLCAF TKPLCAF PATH_SUFFIXES lib lin64/gcc/lib bin)
- FIND_LIBRARY(CAS_TKPShape TKPShape PATH_SUFFIXES lib lin64/gcc/lib bin)
- FIND_LIBRARY(CAS_TKShapeSchema TKShapeSchema PATH_SUFFIXES lib lin64/gcc/lib bin)
- FIND_LIBRARY(CAS_TKStdLSchema TKStdLSchema PATH_SUFFIXES lib lin64/gcc/lib bin)
- FIND_LIBRARY(CAS_TKStdSchema TKStdSchema PATH_SUFFIXES lib lin64/gcc/lib bin)
- FIND_LIBRARY(CAS_TKXCAFSchema TKXCAFSchema PATH_SUFFIXES lib lin64/gcc/lib bin)
-ENDIF()
-
-SET(CAS_KERNEL ${CAS_TKernel} ${CAS_TKMath})
-SET(CAS_OCAF ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKCDF} ${CAS_TKLCAF})
-SET(CAS_VIEWER ${CAS_TKService} ${CAS_TKV3d} ${CAS_TKG3d} ${CAS_TKGeomBase} ${CAS_TKBRep})
-SET(CAS_OCAFVIS ${CAS_TKCAF} ${CAS_TKBRep} ${CAS_TKG2d})
-SET(CAS_MODELER ${CAS_TKG3d} ${CAS_TKGeomBase} ${CAS_TKGeomAlgo} ${CAS_TKBRep} ${CAS_TKTopAlgo} ${CAS_TKG2d})
-
-SET(CAS_TKV3d_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKV3d})
-SET(CAS_TKBool_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKBRep} ${CAS_TKG2d} ${CAS_TKG3d} ${CAS_TKGeomBase} ${CAS_TKGeomAlgo} ${CAS_TKTopAlgo} ${CAS_TKBool})
-SET(CAS_TKBRep_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKBRep})
-SET(CAS_TKIGES_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKXSBase} ${CAS_TKBRep} ${CAS_TKIGES})
-SET(CAS_TKSTEP_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKXSBase} ${CAS_TKBRep} ${CAS_TKSTEP})
-SET(CAS_TKSTL_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKSTL})
-SET(CAS_TKCAF_EA ${CAS_TKPrim} ${CAS_TKCAF})
-
-SET(CAS_TKV3d ${CAS_TKV3d_EA})
-SET(CAS_TKBool ${CAS_TKBool_EA})
-SET(CAS_TKBRep ${CAS_TKBRep_EA})
-SET(CAS_TKIGES ${CAS_TKIGES_EA})
-SET(CAS_TKSTEP ${CAS_TKSTEP_EA})
-SET(CAS_TKSTL ${CAS_TKSTL_EA})
-SET(CAS_TKCAF ${CAS_TKCAF_EA})
-
-SET(_libs
- CAS_TKBin
- CAS_TKBinL
- CAS_TKBinTObj
- CAS_TKBinXCAF
- CAS_TKBO
- CAS_TKBool
- CAS_TKBRep
- CAS_TKCAF
- CAS_TKCDF
- CAS_TKernel
- CAS_TKFeat
- CAS_TKFillet
- CAS_TKG2d
- CAS_TKG3d
- CAS_TKGeomAlgo
- CAS_TKGeomBase
- CAS_TKHLR
- CAS_TKIGES
- CAS_TKLCAF
- CAS_TKMath
- CAS_TKMesh
- CAS_TKMeshVS
- CAS_TKOffset
- CAS_TKOpenGl
- CAS_TKPrim
- CAS_TKService
- CAS_TKShHealing
- CAS_TKSTEP
- CAS_TKSTEP209
- CAS_TKSTEPAttr
- CAS_TKSTEPBase
- CAS_TKSTL
- CAS_TKTObj
- CAS_TKTopAlgo
- CAS_TKV3d
- CAS_TKVRML
- CAS_TKXCAF
- CAS_TKXDEIGES
- CAS_TKXDESTEP
- CAS_TKXMesh
- CAS_TKXml
- CAS_TKXmlL
- CAS_TKXmlTObj
- CAS_TKXmlXCAF
- CAS_TKXSBase
-)
-
-IF(CAS_VERSION_STR VERSION_LESS "7.0.1")
- LIST(APPEND _libs CAS_FWOSPlugin)
-ELSE()
- LIST(APPEND _libs CAS_TKStd)
-ENDIF()
-
-IF(CAS_VERSION_STR VERSION_LESS "6.9.1")
- LIST(APPEND _libs CAS_TKNIS)
-ENDIF()
-
-IF(CAS_VERSION_STR VERSION_LESS "7.0")
- LIST(APPEND _libs
- CAS_PTKernel
- CAS_TKPCAF
- CAS_TKPLCAF
- CAS_TKPShape
- CAS_TKShapeSchema
- CAS_TKStdLSchema
- CAS_TKStdSchema
- CAS_TKXCAFSchema
- )
-ENDIF()
-
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(CAS REQUIRED_VARS CAS_INCLUDE_DIRS ${_libs})
-
-IF(CAS_FOUND AND NOT CAS_FIND_QUIETLY)
- IF(CAS_VERSION_DEVELOPMENT)
- MESSAGE(STATUS "Found OpenCascade version: ${CAS_VERSION_STR} (development)")
- ELSE(CAS_VERSION_DEVELOPMENT)
- MESSAGE(STATUS "Found OpenCascade version: ${CAS_VERSION_STR}")
- ENDIF(CAS_VERSION_DEVELOPMENT)
-ENDIF()
+++ /dev/null
-# - Find CppUnit
-# Sets the following variables:
-# CPPUNIT_INCLUDE_DIRS - path to the CppUnit include directory
-# CPPUNIT_LIBRARIES - path to the CppUnit libraries to be linked against
-# CPPUNIT_DEFINITIONS - specific CppUnit definitions to be added
-#
-# The header cppunit/extensions/HelperMacros.h is looked for.
-# The following libraries are searched
-# cppunit_dll, or cppunitd_dll (Windows)
-# cppunit (Linux)
-#
-
-#########################################################################
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-IF(NOT CppUnit_FIND_QUIETLY)
- MESSAGE(STATUS "Looking for CppUnit ...")
-ENDIF()
-
-# Headers
-SET(CPPUNIT_ROOT_DIR $ENV{CPPUNIT_ROOT_DIR} CACHE PATH "Path to the CPPUNIT.")
-IF(CPPUNIT_ROOT_DIR)
- LIST(APPEND CMAKE_INCLUDE_PATH "${CPPUNIT_ROOT_DIR}/include")
- LIST(APPEND CMAKE_PROGRAM_PATH "${CPPUNIT_ROOT_DIR}/bin")
-ENDIF(CPPUNIT_ROOT_DIR)
-
-SET(CPPUNIT_INCLUDE_TO_FIND cppunit/extensions/HelperMacros.h)
-FIND_PATH(CPPUNIT_INCLUDE_DIRS ${CPPUNIT_INCLUDE_TO_FIND})
-
-# Libraries
-IF(WIN32)
- IF(CMAKE_BUILD_TYPE STREQUAL Debug)
- FIND_LIBRARY(CPPUNIT_LIBRARIES cppunitd_dll)
- ELSE(CMAKE_BUILD_TYPE STREQUAL Debug)
- FIND_LIBRARY(CPPUNIT_LIBRARIES cppunit_dll)
- ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug)
-ELSE(WIN32)
- FIND_PROGRAM(CPPUNIT_CONFIG_BIN cppunit-config)
- IF(NOT CPPUNIT_CONFIG_BIN)
- MESSAGE(FATAL_ERROR "Error in CPPUNIT detection ! cppunit-config executable not found !")
- ENDIF(NOT CPPUNIT_CONFIG_BIN)
- EXECUTE_PROCESS(COMMAND ${CPPUNIT_CONFIG_BIN} --libs OUTPUT_VARIABLE CPPUNIT_LDFLAGS)
- STRING(STRIP ${CPPUNIT_LDFLAGS} CPPUNIT_LDFLAGS)
- STRING(REPLACE " " ";" LDFLAGS_LIST ${CPPUNIT_LDFLAGS})
- FOREACH(LDFLAG ${LDFLAGS_LIST})
- STRING(REGEX MATCH "^-L.*" LIBDIR "${LDFLAG}")
- STRING(REGEX MATCH "^-l.*" LIB "${LDFLAG}")
- IF(LIBDIR)
- STRING(REGEX REPLACE "^-L" "" LIBDIR ${LIBDIR})
- LIST(APPEND CMAKE_LIBRARY_PATH ${LIBDIR})
- ELSEIF(LIB)
- STRING(REGEX REPLACE "^-l" "" LIB ${LIB})
- LIST(APPEND LIBS ${LIB})
- ELSE()
- MESSAGE(FATAL_ERROR "Unrecognized token \"${LDFLAG}\" in the output of cppunit-config --libs")
- ENDIF()
- ENDFOREACH(LDFLAG ${LDFLAGS_LIST})
- FOREACH(LIB ${LIBS})
- FIND_LIBRARY(CPPUNIT_SUBLIB_${LIB} ${LIB})
- IF(NOT CPPUNIT_SUBLIB_${LIB})
- MESSAGE(FATAL_ERROR "Error in CPPUNIT detection! Fail to locate the needed library ${LIB}!")
- ENDIF(NOT CPPUNIT_SUBLIB_${LIB})
- LIST(APPEND CPPUNIT_LIBRARIES ${CPPUNIT_SUBLIB_${LIB}})
- ENDFOREACH(LIB ${LIBS})
-# MESSAGE("**** ${CPPUNIT_LIBRARIES}")
-ENDIF(WIN32)
-
-# Global variables
-SET(CPPUNIT_DEFINITIONS)
-IF(WIN32)
- SET(CPPUNIT_DEFINITIONS -DCPPUNIT_DLL)
-ENDIF(WIN32)
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(CppUnit REQUIRED_VARS CPPUNIT_INCLUDE_DIRS CPPUNIT_LIBRARIES)
-
-
+++ /dev/null
-# - Graphviz detection
-#
-# Output variables: GRAPHVIZ_EXECUTABLE - where is executable 'dot' takes place.
-# GRAPHVIZ_INCLUDE_DIRS - where to find headers.
-# GRAPHVIZ_LIBRARIES - where to get libraries.
-# GRAPHVIZ_VERSION - Graphviz version
-# GRAPHVIZ_DEFINITIONS - Graphviz definitions
-# GRAPHVIZ_FOUND - True if Graphviz was found.
-#
-###########################################################################
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-FIND_PROGRAM(GRAPHVIZ_EXECUTABLE dot)
-
-FIND_PATH(GRAPHVIZ_INCLUDE_DIR NAMES graphviz/cgraph.h)
-SET(GRAPHVIZ_INCLUDE_DIRS ${GRAPHVIZ_INCLUDE_DIR} ${GRAPHVIZ_INCLUDE_DIR}/graphviz)
-
-IF(GRAPHVIZ_EXECUTABLE)
- IF(NOT CMAKE_PREFIX_PATH) # Case where dot is in the path and -DGRAPHVIZ_ROOT_DIR not defined.
- GET_FILENAME_COMPONENT(GRAPHVIZ_EXECUTABLE_DIR ${GRAPHVIZ_EXECUTABLE} PATH)
- GET_FILENAME_COMPONENT(GRAPHVIZ_EXECUTABLE_DIR ${GRAPHVIZ_EXECUTABLE_DIR} PATH)
- SET(CMAKE_PREFIX_PATH "${GRAPHVIZ_EXECUTABLE_DIR}")
- ENDIF(NOT CMAKE_PREFIX_PATH)
-ENDIF(GRAPHVIZ_EXECUTABLE)
-
-FIND_LIBRARY(GRAPHVIZ_cdt_LIBRARY NAMES cdt PATH_SUFFIXES bin)
-FIND_LIBRARY(GRAPHVIZ_graph_LIBRARY NAMES cgraph PATH_SUFFIXES bin)
-FIND_LIBRARY(GRAPHVIZ_gvc_LIBRARY NAMES gvc PATH_SUFFIXES bin)
-FIND_LIBRARY(GRAPHVIZ_pathplan_LIBRARY NAMES pathplan PATH_SUFFIXES bin)
-
-SET(GRAPHVIZ_LIBRARIES
- ${GRAPHVIZ_cdt_LIBRARY}
- ${GRAPHVIZ_graph_LIBRARY}
- ${GRAPHVIZ_gvc_LIBRARY}
- ${GRAPHVIZ_pathplan_LIBRARY}
- )
-
-IF(GRAPHVIZ_EXECUTABLE)
- EXECUTE_PROCESS(COMMAND ${GRAPHVIZ_EXECUTABLE} "-V" ERROR_VARIABLE GRAPHVIZ_VERSION ERROR_STRIP_TRAILING_WHITESPACE)
- STRING(REGEX REPLACE ".* ([0-9.]+) .*" "\\1" GRAPHVIZ_VERSION "${GRAPHVIZ_VERSION}")
-ENDIF()
-
-SET(GRAPHVIZ_DEFINITIONS)
-IF("${GRAPHVIZ_VERSION}" VERSION_LESS "2.36.0")
- SET(GRAPHVIZ_DEFINITIONS -DWITH_CGRAPH)
-ENDIF()
-
-## Don't detect cgraph on Windows
-#IF(NOT WIN32)
-# FIND_LIBRARY(GRAPHVIZ_cgraph_LIBRARY NAMES cgraph PATH_SUFFIXES bin)
-# SET(GRAPHVIZ_LIBRARIES ${GRAPHVIZ_cgraph_LIBRARY})
-#ENDIF()
-
-# Handle the standard arguments of the find_package() command:
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Graphviz REQUIRED_VARS
- GRAPHVIZ_EXECUTABLE
- GRAPHVIZ_LIBRARIES
- GRAPHVIZ_INCLUDE_DIRS)
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-#
-# TODO: this file should be removed when switching to full CMake
-#
-
-SET(KERNEL_CXXFLAGS -I${KERNEL_ROOT_DIR}/include/salome) # to be removed
-SET(KERNEL_INCLUDE_DIRS ${KERNEL_ROOT_DIR}/include/salome)
-
-FIND_LIBRARY(KERNEL_CalciumC CalciumC ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_DF DF ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_Launcher Launcher ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_LifeCycleCORBATest LifeCycleCORBATest ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_NamingServiceTest NamingServiceTest ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_OpUtil OpUtil ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_Registry Registry ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_ResourcesManager ResourcesManager ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SALOMEBasics SALOMEBasics ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeCatalog SalomeCatalog ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeCommunication SalomeCommunication ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeContainer SalomeContainer ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeDatastream SalomeDatastream ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeDSCContainer SalomeDSCContainer ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeDSClient SalomeDSClient ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeDSCSupervBasic SalomeDSCSupervBasic ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeDSCSuperv SalomeDSCSuperv ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeDSImpl SalomeDSImpl ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SALOMEDSImplTest SALOMEDSImplTest ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeDS SalomeDS ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SALOMEDSTest SALOMEDSTest ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeGenericObj SalomeGenericObj ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeHDFPersist SalomeHDFPersist ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeIDLKernel SalomeIDLKernel ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeLauncher SalomeLauncher ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeLifeCycleCORBA SalomeLifeCycleCORBA ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SALOMELocalTrace SALOMELocalTrace ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SALOMELocalTraceTest SALOMELocalTraceTest ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeLoggerServer SalomeLoggerServer ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeMPIContainer SalomeMPIContainer ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeNotification SalomeNotification ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeNS SalomeNS ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeResourcesManager SalomeResourcesManager ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeTestComponentEngine SalomeTestComponentEngine ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeTestMPIComponentEngine SalomeTestMPIComponentEngine ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SALOMETraceCollectorTest SALOMETraceCollectorTest ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_TOOLSDS TOOLSDS ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_UtilsTest UtilsTest ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_with_loggerTraceCollector with_loggerTraceCollector ${KERNEL_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(KERNEL_SalomeKernelHelpers SalomeKernelHelpers ${KERNEL_ROOT_DIR}/lib/salome)
+++ /dev/null
-# - Find LibBatch installation
-#
-# The following variable are set:
-# LIBBATCH_FOUND - TRUE if LibBatch installation has been found
-# LIBBATCH_INCLUDE_DIRS - LibBatch headers path
-# LIBBATCH_LIBRARIES - LibBatch libraries
-#
-# The CMake (or environment) variable LIBBATCH_ROOT_DIR can be set to
-# guide the detection and indicate a root directory to look into.
-#
-############################################################################
-# Copyright (C) 2012-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# ------
-
-IF(NOT LIBBATCH_FIND_QUIETLY)
- MESSAGE(STATUS "Check for LibBatch ...")
-ENDIF()
-
-# ------
-
-SET(LIBBATCH_ROOT_DIR $ENV{LIBBATCH_ROOT_DIR} CACHE PATH "Path to the LibBatch.")
-IF(LIBBATCH_ROOT_DIR)
- LIST(APPEND CMAKE_PREFIX_PATH "${LIBBATCH_ROOT_DIR}")
-ENDIF()
-
-FIND_PATH(LIBBATCH_INCLUDE_DIRS libbatch/BatchManager.hxx)
-FIND_LIBRARY(LIBBATCH_LIBRARIES NAMES batch)
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibBatch REQUIRED_VARS LIBBATCH_INCLUDE_DIRS LIBBATCH_LIBRARIES)
-
-IF(LIBBATCH_FOUND)
- IF(NOT LIBBATCH_FIND_QUIETLY)
- MESSAGE(STATUS "LibBatch library: ${LIBBATCH_LIBRARIES}")
- ENDIF()
-ENDIF()
+++ /dev/null
-# - Find MED file installation
-#
-# The following variable are set:
-# MEDFILE_INCLUDE_DIRS
-# MEDFILE_LIBRARIES
-# MEDFILE_C_LIBRARIES
-# MEDFILE_F_LIBRARIES
-#
-# The CMake (or environment) variable MEDFILE_ROOT_DIR can be set to
-# guide the detection and indicate a root directory to look into.
-#
-############################################################################
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# ------
-
-MESSAGE(STATUS "Check for medfile ...")
-
-# ------
-
-SET(MEDFILE_ROOT_DIR $ENV{MEDFILE_ROOT_DIR} CACHE PATH "Path to the MEDFile.")
-IF(MEDFILE_ROOT_DIR)
- LIST(APPEND CMAKE_PREFIX_PATH "${MEDFILE_ROOT_DIR}")
-ENDIF(MEDFILE_ROOT_DIR)
-
-FIND_PATH(MEDFILE_INCLUDE_DIRS med.h)
-#FIND_PROGRAM(MDUMP mdump)
-FIND_LIBRARY(MEDFILE_C_LIBRARIES NAMES medC)
-FIND_LIBRARY(MEDFILE_F_LIBRARIES NAMES med)
-IF(MEDFILE_F_LIBRARIES)
- SET(MEDFILE_LIBRARIES ${MEDFILE_C_LIBRARIES} ${MEDFILE_F_LIBRARIES})
-ELSE(MEDFILE_F_LIBRARIES)
- SET(MEDFILE_LIBRARIES ${MEDFILE_C_LIBRARIES})
-ENDIF(MEDFILE_F_LIBRARIES)
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(MEDFile REQUIRED_VARS MEDFILE_INCLUDE_DIRS MEDFILE_LIBRARIES)
+++ /dev/null
-# - Find OmniORB4 cmake module and Pyhon backends
-#
-# 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)
-# OMNIORB_PYTHONPATH - path to the OmniORB Python modules
-# and many other mainly used in UseOmniORB.cmake
-#
-# Detection is made through calls to
-# find_library, find_program, find_path
-# and can be guided by extending CMAKE_PREFIX_PATH. Given the CMake precedence
-# rule this will take precedence over the standard system paths.
-# See for example doc of find_library().
-#
-
-################################################################
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# minimum OmniORB4 supported version
-# 4.0.6 has known bug float/double marshalling using CORBA::Any
-SET(OmniORB_MINIMUM_VERSION "4.1.2")
-
-IF(WIN32)
- # Guide the FIND_LIBRARY command towards the correct directory <...>/lib/x86_win32:
- SET(CMAKE_LIBRARY_ARCHITECTURE x86_win32)
-ENDIF()
-
-##############################################################################
-# find headers
-##############################################################################
-FIND_PATH(OMNIORB_INCLUDE_DIR omniORB4/CORBA.h)
-
-##############################################################################
-# find libraries
-##############################################################################
-
-# Win release / debug specific stuff:
-IF (WIN32)
- IF(CMAKE_BUILD_TYPE STREQUAL Debug)
- SET(OMNIORB_RD_SUFFIX d)
- ELSE()
- SET(OMNIORB_RD_SUFFIX)
- ENDIF()
-ENDIF()
-
-IF (WIN32)
- FIND_LIBRARY(OMNIORB_LIBRARY_omniORB4
- NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omniORB4_rt${OMNIORB_RD_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
- FIND_LIBRARY( OMNIORB_LIBRARY_omnithread
- NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omnithread_rt${OMNIORB_RD_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
- FIND_LIBRARY( OMNIORB_LIBRARY_omniDynamic4
- NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omniDynamic4_rt${OMNIORB_RD_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
-ELSE (WIN32)
- FIND_LIBRARY(OMNIORB_LIBRARY_omniORB4 NAMES omniORB4)
- FIND_LIBRARY(OMNIORB_LIBRARY_omnithread NAMES omnithread)
- FIND_LIBRARY(OMNIORB_LIBRARY_omniDynamic4 NAMES omniDynamic4)
-ENDIF (WIN32)
-
-# Optional libraries
-
-IF (WIN32)
- FIND_LIBRARY( OMNIORB_LIBRARY_COS4
- NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}COS4_rt${OMNIORB_RD_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
- FIND_LIBRARY( OMNIORB_LIBRARY_COSDynamic4
- NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}COSDynamic4_rt${OMNIORB_RD_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
-ELSE (WIN32)
- FIND_LIBRARY(OMNIORB_LIBRARY_COS4 NAMES COS4)
- FIND_LIBRARY(OMNIORB_LIBRARY_COSDynamic4 NAMES COSDynamic4)
-ENDIF (WIN32)
-
-##############################################################################
-# find command line tools
-##############################################################################
-IF (WIN32)
- FIND_PROGRAM( OMNIORB_IDL_COMPILER
- NAMES omniidl
- PATH_SUFFIXES x86_win32
- DOC "What is the path where omniidl (the idl compiler) can be found")
- FIND_PROGRAM( OMNIORB_OMNINAMES_COMMAND
- NAMES omniNames
- PATH_SUFFIXES x86_win32
- DOC "What is the path where omniNames (the ORB server) can be found")
-ELSE(WIN32)
- FIND_PROGRAM(OMNIORB_IDL_COMPILER NAMES omniidl)
- FIND_PROGRAM(OMNIORB_NAMESERVER NAMES omniNames)
-ENDIF (WIN32)
-
-##############################################################################
-# Cook our stuff
-##############################################################################
-
-MARK_AS_ADVANCED(OMNIORB_DIR OMNIORB_INCLUDE_DIR)
-MARK_AS_ADVANCED(OMNIORB_LIBRARY_omniORB4 OMNIORB_LIBRARY_omnithread OMNIORB_LIBRARY_omniDynamic4)
-MARK_AS_ADVANCED(OMNIORB_IDL_COMPILER OMNIORB_NAMESERVER OMNIORB_VERSION)
-MARK_AS_ADVANCED(OMNIORB_LIBRARY_COS4 OMNIORB_LIBRARY_COSDynamic4)
-
-SET(OMNIORB_LIBRARIES
- ${OMNIORB_LIBRARY_omniORB4}
- ${OMNIORB_LIBRARY_omnithread}
- ${OMNIORB_LIBRARY_omniDynamic4})
-
-IF(OMNIORB_LIBRARY_COS4)
- LIST(APPEND OMNIORB_LIBRARIES ${OMNIORB_LIBRARY_COS4})
-ENDIF()
-IF(OMNIORB_LIBRARY_COSDynamic4)
- LIST(APPEND OMNIORB_LIBRARIES ${OMNIORB_LIBRARY_COSDynamic4})
-ENDIF()
-
-# Set path to the OmniORB Python modules
-GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${OMNIORB_LIBRARIES}" PATH)
-SET(OMNIORB_PYTHONPATH "${_tmp_ROOT_DIR}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages")
-
-# Optionaly, extract the the version number from the acconfig.h file:
-# The version check is done at the very bottom of this 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}" )
-ELSE()
- SET( OMNIORB_VERSION "NOT-FOUND" )
-ENDIF( EXISTS ${OMNIORB_INCLUDE_DIR}/omniORB4/acconfig.h )
-
-SET(OMNIORB_IDLCXXFLAGS -bcxx -Wba -nf)
-SET(IDLCXXFLAGS ${OMNIORB_IDLCXXFLAGS})
-SET(IDL_CLN_H .hh)
-SET(IDL_SRV_H .hh)
-SET(OMNIORB_DEFINITIONS "-D__x86__ -DCOMP_CORBA_DOUBLE -DCOMP_CORBA_LONG")
-IF(WIN32)
- ## OmniORB isn`t defines SIZEOF_LONG and SIZEOF_INT on WIN32 platform
- ## Note SIZE_OF_LONG calculates in the SalomeSetupPlatform.cmake
- SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__WIN32__ -DSIZEOF_INT=4 -DSIZEOF_LONG=${SIZE_OF_LONG}")
-ENDIF()
-IF(APPLE)
- SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__macos__")#for omnithread.h to be checked...
-ENDIF()
-
-# Handle standard arguments:
-INCLUDE(FindPackageHandleStandardArgs)
-IF(OMNIORB_VERSION)
- FIND_PACKAGE_HANDLE_STANDARD_ARGS(OmniORB
- REQUIRED_VARS OMNIORB_INCLUDE_DIR OMNIORB_LIBRARY_omniORB4 OMNIORB_LIBRARY_omnithread
- OMNIORB_LIBRARY_omniDynamic4 OMNIORB_IDL_COMPILER
- VERSION_VAR OMNIORB_VERSION )
-ELSE()
- FIND_PACKAGE_HANDLE_STANDARD_ARGS(OmniORB
- REQUIRED_VARS OMNIORB_INCLUDE_DIR OMNIORB_LIBRARY_omniORB4 OMNIORB_LIBRARY_omnithread
- OMNIORB_LIBRARY_omniDynamic4 OMNIORB_IDL_COMPILER)
-ENDIF()
+++ /dev/null
-# - Find OmniORB4 Python backend
-#
-# Sets the following variables:
-# OMNIORB_PYTHON_BACKEND - path to the Python backend
-# OMNIORBPY_PYTHONPATH - Python path to the OmniORB modules
-#
-# Detection is made by looking for
-# lib/python${_py_version}/site-packages/omniidl_be/python.py
-#
-
-################################################################
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-##############################################################################
-# find python back-end
-##############################################################################
-
-SET(_py_version "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
-FIND_PATH(OMNIORB_PYTHON_BACKEND
- NAMES python.py
- PATHS "${OMNIORBPY_ROOT_DIR}" "/usr"
- PATH_SUFFIXES "/lib/python${_py_version}/site-packages/omniidl_be" "/lib/omniidl/omniidl_be" "/lib/python/omniidl_be"
- DOC "Path to python-backend directory (omniidl_be) including python.py file")
-
-##############################################################################
-# Cook our stuff
-##############################################################################
-MARK_AS_ADVANCED(OMNIORB_PYTHON_BACKEND)
-
-SET(OMNIORB_IDLPYFLAGS)
-IF (OMNIORB_PYTHON_BACKEND)
- LIST(APPEND OMNIORB_IDLPYFLAGS -bpython -p${OMNIORB_PYTHON_BACKEND})
-ENDIF()
-SET(IDLPYFLAGS ${OMNIORB_IDLPYFLAGS})
-
-GET_FILENAME_COMPONENT(OMNIORBPY_PYTHONPATH "${OMNIORB_PYTHON_BACKEND}" PATH)
-
-# Handle standard arguments:
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(OmniORBPy REQUIRED_VARS OMNIORB_PYTHON_BACKEND)
+++ /dev/null
-# - Find PThread
-# This module finds an installed PThread using the variable PTHREAD_ROOT_DIR
-# as a lookup path.
-# It sets the following variables:
-# PTHREAD_FOUND - set to true if PThread is found
-# PTHREAD_INCLUDE_DIR - the directory where the include files are located
-# PTHREAD_LIBRARIES - the path to PThread library
-#
-# The file "pthread.h" is looked for PTHREAD_INCLUDE_DIR.
-# Libraries are searched with following names:
-# pthread
-# On Win32:
-# pthreadVC2
-# or in Debug mode:
-# pthreadVC2d
-#
-
-
-#############################################################
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-IF(NOT PThread_FIND_QUIETLY)
- MESSAGE(STATUS "Looking for PThread...")
-ENDIF ()
-
-IF(WIN32)
- SET(PTHREADS_INCLUDE_TO_FIND pthread.h)
- FIND_PATH(PTHREAD_INCLUDE_DIR ${PTHREADS_INCLUDE_TO_FIND})
- # Default build type is assumed to be Release:
- IF(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
- FIND_LIBRARY(PTHREAD_LIBRARIES pthreadVC2)
- ELSE()
- FIND_LIBRARY(PTHREAD_LIBRARIES pthreadVC2d)
- ENDIF()
-ELSE(WIN32)
- FIND_PATH(PTHREAD_INCLUDE_DIR pthread.h)
- FIND_LIBRARY(PTHREAD_LIBRARIES NAMES pthread)
-ENDIF(WIN32)
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(PThread REQUIRED_VARS PTHREAD_INCLUDE_DIR PTHREAD_LIBRARIES)
-
-IF(PTHREAD_FOUND)
- IF(NOT PThread_FIND_QUIETLY)
- MESSAGE(STATUS "PThread library: ${PTHREAD_LIBRARIES}")
- ENDIF()
-ENDIF()
+++ /dev/null
-# - Find Paco installation
-#
-# Variables set are:
-# PACO_INCLUDE_DIRS - include directories to add when compiling
-# PACO_LIBRARIES - Paco libraries to link against
-#
-# You can set the environment or CMake variable PACO_ROOT_DIR to guide
-# the detection mechanism.
-#
-#############################################################
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# ------
-
-IF(NOT Paco_FIND_QUIETLY)
- MESSAGE(STATUS "Check for Paco ...")
-ENDIF()
-
-# ------
-
-SET(PACO_ROOT_DIR $ENV{PACO_ROOT_DIR} CACHE PATH "Path to Paco.")
-IF(PACO_ROOT_DIR)
- LIST(APPEND CMAKE_PREFIX_PATH "${PACO_ROOT_DIR}")
-ENDIF(PACO_ROOT_DIR)
-
-FIND_PATH(PACO_INCLUDE_DIRS PaCO++_InterfaceManager_impl.h)
-
-FIND_LIBRARY(PACO_LIBRARY_PaCO PaCO)
-FIND_LIBRARY(PACO_LIBRARY_GaBro GaBro)
-FIND_LIBRARY(PACO_LIBRARY_BasicBC BasicBC)
-FIND_LIBRARY(PACO_LIBRARY_PaCO_dummy PaCO_dummy)
-FIND_LIBRARY(PACO_LIBRARY_PaCO_mpi PaCO_mpi)
-FIND_LIBRARY(PACO_LIBRARY_PaCO_omnithread PaCO_omnithread)
-
-FIND_PROGRAM(PACO_IDL PaCOIdlTool.sh)
-
-MARK_AS_ADVANCED(PACO_INCLUDE_DIRS PACO_LIBRARY_PaCO PACO_LIBRARY_GaBro
- PACO_LIBRARY_BasicBC PACO_LIBRARY_PaCO_dummy
- PACO_LIBRARY_PaCO_mpi PACO_LIBRARY_PaCO_omnithread PACO_IDL)
-
-SET(PACO_LIBRARIES
- ${PACO_LIBRARY_PaCO}
- ${PACO_LIBRARY_GaBro}
- ${PACO_LIBRARY_BasicBC}
- ${PACO_LIBRARY_PaCO_dummy}
- ${PACO_LIBRARY_PaCO_mpi}
- ${PACO_LIBRARY_PaCO_omnithread})
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Paco
- REQUIRED_VARS PACO_INCLUDE_DIRS PACO_LIBRARY_PaCO PACO_LIBRARY_GaBro
- PACO_LIBRARY_BasicBC PACO_LIBRARY_PaCO_dummy
- PACO_LIBRARY_PaCO_mpi PACO_LIBRARY_PaCO_omnithread PACO_IDL)
+++ /dev/null
-# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: Adrien Bruneton
-#
-
-# Boost detection dor Salome
-#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-SET(Boost_USE_STATIC_LIBS OFF)
-SET(Boost_USE_MULTITHREADED ON)
-SET(Boost_USE_STATIC_RUNTIME OFF)
-SET(Boost_NO_BOOST_CMAKE ON)
-SET(SalomeBoost_FIND_COMPONENTS filesystem regex signals system thread date_time chrono)
-
-IF(WIN32)
- # Under windows, one extra sub-directory in the boost installation hierarchy:
- SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Boost Boost_INCLUDE_DIRS 2)
-ELSE()
- SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Boost Boost_INCLUDE_DIRS 1)
-ENDIF()
-IF(Boost_FOUND OR BOOST_FOUND)
- MESSAGE(STATUS "Boost include dirs is: ${Boost_INCLUDE_DIRS}")
-ENDIF()
-#MARK_AS_ADVANCED()
-
-## Specific definitions:
-IF(WIN32)
- SET(BOOST_DEFINITIONS -DBOOST_DISABLE_ASSERTS -DBOOST_ALL_DYN_LINK)
-ENDIF()
-
-IF(Boost_FOUND OR BOOST_FOUND)
- SALOME_ACCUMULATE_HEADERS(Boost_INCLUDE_DIRS)
- SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${Boost_LIBRARIES})
-ENDIF()
\ No newline at end of file
+++ /dev/null
-# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: Adrien Bruneton
-#
-
-# OpenCascade detection for Salome
-#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(CAS CAS_INCLUDE_DIRS 1)
-MARK_AS_ADVANCED(CAS_INCLUDE_DIRS
- CAS_BinLPlugin CAS_BinTObjPlugin CAS_BinXCAFPlugin CAS_PTKernel
- CAS_StdLPlugin CAS_StdPlugin CAS_TKAdvTools CAS_TKBin CAS_TKBinL CAS_TKBinTObj
- CAS_TKBinXCAF CAS_TKBO CAS_TKBool CAS_TKBRep CAS_TKCAF CAS_TKCDF CAS_TKernel
- CAS_TKFeat CAS_TKFillet CAS_TKG2d CAS_TKG3d CAS_TKGeomAlgo CAS_TKGeomBase
- CAS_TKHLR CAS_TKIGES CAS_TKLCAF CAS_TKMath CAS_TKMesh CAS_TKMeshVS CAS_TKNIS
- CAS_TKOffset CAS_TKOpenGl CAS_TKPCAF CAS_TKPLCAF CAS_TKPrim CAS_TKPShape CAS_TKService
- CAS_TKShapeSchema CAS_TKShHealing CAS_TKStdLSchema CAS_TKStdSchema CAS_TKSTEP CAS_TKSTEP209
- CAS_TKSTEPAttr CAS_TKSTEPBase CAS_TKSTL CAS_TKTObj CAS_TKTopAlgo CAS_TKV2d CAS_TKV3d CAS_TKVRML
- CAS_TKXCAF CAS_TKXCAFSchema CAS_TKXDEIGES CAS_TKXDESTEP CAS_TKXMesh CAS_TKXml CAS_TKXmlL CAS_TKXmlTObj
- CAS_TKXmlXCAF CAS_TKXSBase CAS_XCAFPlugin CAS_XmlLPlugin CAS_XmlPlugin CAS_XmlTObjPlugin
- CAS_XmlXCAFPlugin CAS_Xmu)
-
-IF(CAS_VERSION_STR VERSION_LESS "7.0.1")
- MARK_AS_ADVANCED(CAS_FWOSPlugin)
-ELSE()
- MARK_AS_ADVANCED(CAS_TKStd)
-ENDIF()
-
-IF(CAS_VERSION_STR VERSION_LESS "7.0")
- SET(CAS_STDPLUGIN TKStdSchema)
-ELSE()
- SET(CAS_STDPLUGIN TKStd)
- SET(CAS_BINPLUGIN TKBin)
-ENDIF()
-
-IF(CAS_FOUND)
- SALOME_ACCUMULATE_HEADERS(CAS_INCLUDE_DIRS)
- SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${CAS_TKernel})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: Adrien Bruneton
-#
-
-# CppUnit detection for Salome
-#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(CppUnit CPPUNIT_INCLUDE_DIRS 1)
-MARK_AS_ADVANCED(CPPUNIT_INCLUDE_DIRS CPPUNIT_LIBRARIES CPPUNIT_CONFIG_BIN CPPUNIT_SUBLIB_cppunit CPPUNIT_SUBLIB_dl)
-
-IF(CPPUNIT_FOUND)
- SALOME_ACCUMULATE_HEADERS(CPPUNIT_INCLUDE_DIRS)
- SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${CPPUNIT_LIBRARIES})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: Adrien Bruneton
-#
-
-# Doxygen detection for salome
-#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-# Additional variables:
-#
-# DOXYGEN_SUPPORT_STL (string) [advanced] : set to YES if doxygen properly manages STL files
-# or to NO otherwise (version 1.4.4 or older); see description of
-# BUILTIN_STL_SUPPORT configuration variable in the doxygen documentation
-
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Doxygen DOXYGEN_EXECUTABLE 2)
-IF(DOXYGEN_FOUND)
- IF(DOXYGEN_VERSION VERSION_LESS "1.4.5")
- SET(DOXYGEN_SUPPORT_STL NO)
- ELSE()
- SET(DOXYGEN_SUPPORT_STL YES)
- ENDIF()
-ENDIF()
-MARK_AS_ADVANCED(DOXYGEN_SUPPORT_STL)
-
-IF(DOXYGEN_FOUND)
- SALOME_ACCUMULATE_ENVIRONMENT(PATH ${DOXYGEN_EXECUTABLE})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: Adrien Bruneton
-#
-
-# Graphviz detection for salome
-#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Graphviz GRAPHVIZ_EXECUTABLE 2)
-MARK_AS_ADVANCED(GRAPHVIZ_EXECUTABLE GRAPHVIZ_LIBRARIES GRAPHVIZ_INCLUDE_DIRS)
-
-IF(GRAPHVIZ_FOUND)
- SALOME_ACCUMULATE_ENVIRONMENT(PATH ${GRAPHVIZ_EXECUTABLE})
- SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${GRAPHVIZ_LIBRARIES})
-ENDIF()
\ No newline at end of file
+++ /dev/null
-# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: Adrien Bruneton
-#
-
-# HDF5 detection for Salome
-#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-# --- HDF5 specificities ----
-# MPI root directory used for HDF5 compilation is exposed into MPI_ROOT_DIR_EXP
-#
-
-SET(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR} CACHE PATH "Path to the HDF5.")
-
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(HDF5 HDF5_INCLUDE_DIR 1)
-MARK_AS_ADVANCED(FORCE HDF5_INCLUDE_DIR HDF5_LIB HDF5_DIR)
-
-# Stupidly enough, CONFIG mode and MODULE mode for HDF5 do not return the same thing ...!
-SET(HDF5_INCLUDE_DIRS "${HDF5_INCLUDE_DIRS};${HDF5_INCLUDE_DIR}")
-# Same story with libraries - if in CONFIG mode, HDF5_LIBRARIES is not defined:
-IF(NOT DEFINED HDF5_LIBRARIES)
- SET(HDF5_LIBRARIES hdf5)
-ENDIF()
-
-##
-## 7. Specific to HDF5 only:
-## Expose MPI configuration to the rest of the world
-##
-IF(HDF5_ENABLE_PARALLEL OR HDF5_IS_PARALLEL)
- # Set only one reference boolean variable:
- # (unfortunately what is found in /usr/share/cmake/Modules/FindHDF5.cmake
- # and in the native HDF5-config.cmake differ!)
- SET(HDF5_IS_PARALLEL TRUE)
-
- # HDF5 was compiled with MPI support
- # Unfortunately HDF5 doesn't expose its MPI configuration easily ...
- # We sniff the properties of the HDF5 target which should also be there:
- GET_PROPERTY(_lib_lst TARGET hdf5 PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_NOCONFIG)
- FOREACH(s ${_lib_lst})
- STRING(FIND "${s}" "mpi." _res) # should cover WIN(?) and LINUX
- IF(_res GREATER -1)
- GET_FILENAME_COMPONENT(_tmp "${s}" PATH) # go up to levels
- GET_FILENAME_COMPONENT(MPI_ROOT_DIR_EXP "${_tmp}" PATH)
- BREAK()
- ENDIF()
- ENDFOREACH()
- IF(NOT SalomeHDF5_FIND_QUIETLY)
- MESSAGE(STATUS "HDF5 was compiled with MPI: ${MPI_ROOT_DIR_EXP}")
- ENDIF()
-ENDIF()
-
-## Add definitions
-ADD_DEFINITIONS(-DH5_USE_16_API)
-IF(WIN32)
- ADD_DEFINITIONS(-D_HDF5USEDLL_)
-ENDIF()
-
-## Ensure SALOME uses MPI if HDF5 was parallel:
-IF(HDF5_IS_PARALLEL AND NOT SALOME_USE_MPI)
- MESSAGE(FATAL_ERROR "HDF5 is compiled with MPI, you have to set SALOME_USE_MPI to ON")
-ENDIF()
-
-IF(HDF5_FOUND)
- SALOME_ACCUMULATE_HEADERS(HDF5_INCLUDE_DIRS)
- SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${HDF5_LIBRARIES})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: Adrien Bruneton
-#
-
-# KERNEL detection for salome - this is typically called by dependent modules
-# (GUI, PARAVIS, etc ...)
-#
-# The detection is simpler than for other prerequisites.
-# Indeed calling SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS() with SalomeKERNEL is tricky:
-# - one would write SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(KERNEL xyz n)
-# - then the macro would look first for a file named SalomeKERNELConfig.cmake (=the normal situation)
-# - if not found (because KERNEL_ROOT_DIR was badly set for example) the macro would then look
-# for a file named FindSalomeKERNEL.cmake
-# => this is the current file, and that would trigger an infinite recursion ... :-)
-# This could be detected with a flag mechanism, but honestly this becomes an overkill.
-#
-# So we go for a simple lookup, without conflict check:
-#
-
-IF(NOT SalomeKERNEL_FIND_QUIETLY)
- MESSAGE(STATUS "Looking for Salome KERNEL ...")
-ENDIF()
-
-SET(CMAKE_PREFIX_PATH "${KERNEL_ROOT_DIR}")
-SALOME_FIND_PACKAGE(SalomeKERNEL SalomeKERNEL CONFIG)
-
-IF(NOT SalomeKERNEL_FIND_QUIETLY)
- MESSAGE(STATUS "Found Salome KERNEL: ${KERNEL_ROOT_DIR}")
-ENDIF()
-
-FOREACH(_res ${SalomeKERNEL_EXTRA_ENV})
- SALOME_ACCUMULATE_ENVIRONMENT(${_res} "${SalomeKERNEL_EXTRA_ENV_${_res}}")
-ENDFOREACH()
-
-#----------------------------------------------------------------------------
-# KERNEL_WITH_CORBA is a macro useful for determining whether a KERNEL module
-# builded in not light mode(with CORBA)
-#----------------------------------------------------------------------------
-MACRO(KERNEL_WITH_CORBA)
- IF(SALOME_KERNEL_LIGHT_ONLY)
- MESSAGE(FATAL_ERROR "\nWe absolutely need a Salome KERNEL module with CORBA.\nPlease set option SALOME_LIGHT_ONLY to OFF when building KERNEL module.")
- ENDIF()
-ENDMACRO(KERNEL_WITH_CORBA)
+++ /dev/null
-# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: Adrien Bruneton
-#
-
-# LibBatch detection for Salome
-#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(LibBatch LIBBATCH_INCLUDE_DIRS 1)
-#MARK_AS_ADVANCED()
-
-IF(SALOMELIBBATCH_FOUND)
- SALOME_ACCUMULATE_HEADERS(LIBBATCH_INCLUDE_DIRS)
- SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${LIBBATCH_LIBRARIES})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# LibXml2 detection for SALOME
-#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-IF(WIN32)
- SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(LibXml2 LIBXML2_INCLUDE_DIR 1)
-ELSE()
- SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(LibXml2 LIBXML2_INCLUDE_DIR 2)
-ENDIF()
-#MARK_AS_ADVANCED()
-
-IF(LIBXML2_FOUND)
- SALOME_ACCUMULATE_HEADERS(LIBXML2_INCLUDE_DIR)
- SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${LIBXML2_LIBRARIES})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: Adrien Bruneton
-#
-
-# Medfile detection for Salome
-#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(MEDFile MEDFILE_INCLUDE_DIRS 1)
-#MARK_AS_ADVANCED()
-
-IF(MEDFILE_FOUND)
- SALOME_ACCUMULATE_HEADERS(MEDFILE_INCLUDE_DIRS)
- SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${MEDFILE_LIBRARIES})
-ENDIF()
\ No newline at end of file
+++ /dev/null
-# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: Adrien Bruneton
-#
-
-# MPI detection for Salome
-#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(MPI MPIEXEC 2)
-MARK_AS_ADVANCED(MPI_EXTRA_LIBRARY MPI_LIBRARY)
-
-SET(MPI_INCLUDE_DIRS ${MPI_C_INCLUDE_PATH} ${MPI_CXX_INCLUDE_PATH})
-SET(MPI_LIBRARIES ${MPI_C_LIBRARIES} ${MPI_CXX_LIBRARIES})
-
-IF(MPI_FOUND)
- # Detect if function MPI_Publish_name is provided by the external MPI library
- # otherwise take ours.
- include(CheckSymbolExists)
- SET(CMAKE_REQUIRED_LIBRARIES ${MPI_LIBRARIES})
- SET(CMAKE_REQUIRED_INCLUDES ${MPI_C_INCLUDE_PATH})
- CHECK_SYMBOL_EXISTS(MPI_Publish_name mpi.h MPI2_IS_OK)
- SET(MPI_DEFINITIONS "${MPI_CXX_COMPILE_FLAGS}")
- IF(MPI2_IS_OK)
- MESSAGE(STATUS "Your mpi implementation is compatible with mpi2 ... adding -DHAVE_MPI2")
- SET(MPI_DEFINITIONS "${MPI_CXX_COMPILE_FLAGS} -DHAVE_MPI2")
- ENDIF(MPI2_IS_OK)
-
- SALOME_ACCUMULATE_HEADERS(MPI_INCLUDE_DIRS)
- SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${MPI_LIBRARIES})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: Roman NIKOLAEV
-#
-# Looking for an installation of NumPy and SciPy, and if found the following variables are set
-# NUMPY_INCLUDE_DIR - NumPy header location
-# NUMPY_DEFINITIONS - NumPy compiler flags
-# SCIPY_DEFINITIONS - SciPy compiler flags
-# SCIPY_VERSION - SciPy version
-#
-
-IF(SALOMEPYTHONINTERP_FOUND)
- # Numpy
- EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import numpy ; import sys ; sys.stdout.write(numpy.get_include())" OUTPUT_VARIABLE NUMPY_INCLUDE_DIR ERROR_QUIET )
- IF(NUMPY_INCLUDE_DIR)
- SET(NUMPY_FOUND TRUE)
- ENDIF(NUMPY_INCLUDE_DIR)
- IF(NUMPY_FOUND)
- SET(NUMPY_DEFINITIONS -DWITH_NUMPY)
- MESSAGE(STATUS "NumPy found : ${NUMPY_INCLUDE_DIR}")
- ELSE(NUMPY_FOUND)
- MESSAGE(STATUS "NumPy not found.")
- ENDIF(NUMPY_FOUND)
-
- # SciPy detection
- EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import scipy ; import sys ; sys.stdout.write(scipy.version.version)" OUTPUT_VARIABLE SCIPY_VERSION ERROR_QUIET )
- IF(SCIPY_VERSION)
- SET(SCIPY_FOUND TRUE)
- ENDIF(SCIPY_VERSION)
- IF(SCIPY_FOUND)
- MESSAGE(STATUS "Scipy found : Version ${SCIPY_VERSION}")
- SET(SCIPY_DEFINITIONS -DWITH_SCIPY)
- ELSE(SCIPY_FOUND)
- MESSAGE(STATUS "SciPy not found.")
- ENDIF(SCIPY_FOUND)
-ENDIF()
\ No newline at end of file
+++ /dev/null
-# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: Adrien Bruneton
-#
-
-# omniORB and detection for SALOME
-#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OmniORB OMNIORB_INCLUDE_DIR 1)
-#MARK_AS_ADVANCED()
-
-IF(OMNIORB_FOUND)
- SALOME_ACCUMULATE_HEADERS(OMNIORB_INCLUDE_DIR)
- SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${OMNIORB_LIBRARIES})
- SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${OMNIORB_LIBRARIES}
- ${OMNIORB_PYTHONPATH})
-ENDIF()
\ No newline at end of file
+++ /dev/null
-# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: Adrien Bruneton
-#
-
-# omniORB Python backend detection for SALOME
-#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-
-IF(SalomeOmniORB_FOUND)
- # If no OMNIORBPY_ROOT_DIR is given, then try with OMNIORB_ROOT_DIR:
-
- IF(NOT OMNIORBPY_ROOT_DIR_EXP)
- SET(OMNIORBPY_ROOT_DIR "$ENV{OMNIORBPY_ROOT_DIR}" CACHE PATH "Path to the OmniORB Python backend")
- IF(EXISTS "${OMNIORB_ROOT_DIR}" AND (NOT OMNIORBPY_ROOT_DIR))
- MESSAGE(STATUS "Looking for OmniORB Python backend in the OmniORB installation (OMNIORB_ROOT_DIR exists and OMNIORBPY_ROOT_DIR is not defined) ...")
- SET(OMNIORBPY_ROOT_DIR "${OMNIORB_ROOT_DIR}")
- ENDIF()
- ENDIF()
-
- IF(WIN32)
- SET(DIR_COUNT 3)
- ELSE(WIN32)
- SET(DIR_COUNT 4)
- ENDIF(WIN32)
-
- SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OmniORBPy OMNIORB_PYTHON_BACKEND ${DIR_COUNT})
- #MARK_AS_ADVANCED()
-ELSE()
- IF(NOT SalomeOmniORBPy_FIND_QUIETLY)
- MESSAGE(STATUS "OmniORB Python backend needs OmniORB, and OmniORB was not found!")
- ENDIF()
-ENDIF()
-
-IF(OMNIORBPY_FOUND)
- SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${OMNIORBPY_LIBRARIES})
- SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${OMNIORBPY_LIBRARIES}
- ${OMNIORBPY_PYTHONPATH})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: Adrien Bruneton
-#
-
-# PThread detection for SALOME
-#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(PThread PTHREAD_INCLUDE_DIR 1)
-MARK_AS_ADVANCED(PTHREAD_LIBRARIES PTHREAD_INCLUDE_DIR)
-
-IF(SALOMEPTHREAD_FOUND)
- SALOME_ACCUMULATE_HEADERS(PTHREAD_INCLUDE_DIR)
- SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${PTHREAD_LIBRARIES})
-ENDIF()
-
+++ /dev/null
-# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: Renaud Barate
-#
-
-# Paco detection for SALOME
-#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Paco PACO_INCLUDE_DIRS 1)
-#MARK_AS_ADVANCED()
-
-IF(SALOMEPACO_FOUND)
- SALOME_ACCUMULATE_HEADERS(PACO_INCLUDE_DIRS)
- SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${PACO_LIBRARIES})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: Adrien Bruneton
-#
-
-# Python interpreter detection for SALOME
-#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-
-# Make sure the detection of both libs and interpreter (if both needed) occur in the correct order:
-IF(SALOMEPYTHONLIBS_FOUND AND NOT SALOMEPYTHONINTERP_FOUND)
- MESSAGE(FATAL_ERROR "Developer error -> Python interpreter should be detected/required before Python libs!")
-ENDIF()
-
-# Use the PYTHON_ROOT_DIR if PYTHONINTERP_ROOT_DIR is not defined:
-SET(PYTHON_ROOT_DIR "$ENV{PYTHON_ROOT_DIR}" CACHE PATH "Path to the Python installation (libs+interpreter)")
-IF(EXISTS "${PYTHON_ROOT_DIR}" AND (NOT PYTHONINTERP_ROOT_DIR))
- # Extract sub-directory "paraview-x.xx":
- MESSAGE(STATUS "Setting PYTHONINTERP_ROOT_DIR to: ${PYTHON_ROOT_DIR}")
- SET(PYTHONINTERP_ROOT_DIR "${PYTHON_ROOT_DIR}" CACHE PATH "Path to PythonInterp directory")
-ENDIF()
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(PythonInterp PYTHON_EXECUTABLE 1)
-
-IF(SALOMEPYTHONINTERP_FOUND)
- SET(PYTHON_PYTHONPATH "${PYTHON_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
- GET_FILENAME_COMPONENT(_python_bin "${PYTHON_EXECUTABLE}" NAME )
- SET(PYTHONBIN "${_python_bin}" CACHE STRING "Name of Python interpreter")
- SALOME_ACCUMULATE_ENVIRONMENT(PATH ${PYTHON_EXECUTABLE})
- SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${PYTHON_PYTHONPATH})
-ENDIF()
-
+++ /dev/null
-# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: Adrien Bruneton
-#
-
-# Python libraries detection for SALOME
-#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-
-# Use the PYTHON_ROOT_DIR if PYTHONLIBS_ROOT_DIR is not defined:
-SET(PYTHON_ROOT_DIR "$ENV{PYTHON_ROOT_DIR}" CACHE PATH "Path to the Python installation (libs+interpreter)")
-IF(EXISTS "${PYTHON_ROOT_DIR}" AND (NOT PYTHONLIBS_ROOT_DIR))
- MESSAGE(STATUS "Setting PYTHONLIBS_ROOT_DIR to: ${PYTHON_ROOT_DIR}")
- SET(PYTHONLIBS_ROOT_DIR "${PYTHON_ROOT_DIR}" CACHE PATH "Path to PythonLibs directory")
-ENDIF()
-IF (SALOMEPYTHONINTERP_FOUND AND NOT "${PYTHON_VERSION_STRING}" STREQUAL "")
- # Trying to search libraries with same version as an interpreter version
- SET(PythonLibs_FIND_VERSION ${PYTHON_VERSION_STRING})
- SET(PythonLibs_FIND_VERSION_MAJOR ${PYTHON_VERSION_MAJOR})
-ENDIF()
-IF(WIN32)
- set(CMAKE_LIBRARY_PATH "${PYTHON_ROOT_DIR}/libs")
-ENDIF()
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(PythonLibs PYTHON_INCLUDE_DIR 2)
-
-IF(SALOMEPYTHONLIBS_FOUND)
- SALOME_ACCUMULATE_HEADERS(PYTHON_INCLUDE_DIR)
- SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${PYTHON_LIBRARIES})
-ENDIF()
-
-## Specifics -- check matching version with Interpreter if already detected:
-IF (SALOMEPYTHONLIBS_FOUND AND SALOMEPYTHONINTERP_FOUND)
- # Now ensure versions are matching
- IF("${PYTHONLIBS_VERSION_STRING}" STREQUAL "${PYTHON_VERSION_STRING}")
- MESSAGE(STATUS "Python libs and interpreter versions are matching: ${PYTHONLIBS_VERSION_STRING}")
- ELSE()
- MESSAGE(FATAL_ERROR "Python libs and interpreter versions are NOT matching: ${PYTHONLIBS_VERSION_STRING} vs ${PYTHON_VERSION_STRING}")
- ENDIF()
-ENDIF()
+++ /dev/null
-# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: Adrien Bruneton
-#
-
-# SWIG detection for SALOME
-#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(SWIG SWIG_EXECUTABLE 2)
-MARK_AS_ADVANCED(SWIG_EXECUTABLE SWIG_VERSION)
-
-IF(SWIG_FOUND)
- SALOME_ACCUMULATE_ENVIRONMENT(PATH ${SWIG_EXECUTABLE})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# Sphinx detection for Salome
-#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Sphinx SPHINX_EXECUTABLE 2)
-
-# Also retrieve paths to DOCUTILS and SETUPTOOLS:
-SET(SETUPTOOLS_ROOT_DIR "$ENV{SETUPTOOLS_ROOT_DIR}" CACHE PATH "Path to the Setuptools installation")
-SET(DOCUTILS_ROOT_DIR "$ENV{DOCUTILS_ROOT_DIR}" CACHE PATH "Path to the Docutils installation")
-
-# Ensure the command is run with the given PYTHONPATH
-IF(WIN32 AND NOT CYGWIN)
- SET(SPHINX_EXECUTABLE ${SPHINX_EXECUTABLE})
- SET(SPHINX_APIDOC_EXECUTABLE ${SPHINX_APIDOC_EXECUTABLE})
-ELSE()
- SET(SPHINX_EXECUTABLE /usr/bin/env PYTHONPATH="${SPHINX_PYTHONPATH}:$$PYTHONPATH" ${SPHINX_EXECUTABLE})
- SET(SPHINX_APIDOC_EXECUTABLE /usr/bin/env PYTHONPATH="${SPHINX_PYTHONPATH}:$$PYTHONPATH" ${SPHINX_APIDOC_EXECUTABLE})
-ENDIF()
-
-MARK_AS_ADVANCED(SPHINX_EXECUTABLE)
-
-IF(SPHINX_FOUND)
- SALOME_ACCUMULATE_ENVIRONMENT(PATH ${SPHINX_EXECUTABLE})
- SALOME_ACCUMULATE_ENVIRONMENT(PATH ${SPHINX_APIDOC_EXECUTABLE})
- SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${SPHINX_PYTHONPATH})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: Adrien Bruneton
-#
-
-# VTK detection for Salome (see http://www.vtk.org/Wiki/VTK/Build_System_Migration)
-#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
-#
-
-# List the required components:
-SET(SalomeVTK_COMPONENTS
- vtkRenderingLOD
- vtkRenderingAnnotation
- vtkFiltersParallel
- vtkIOExport
- vtkWrappingPythonCore ## ParaView 4.0.1
- #vtkWrappingPython
- vtkIOXML
- vtkFiltersVerdict
- vtkRenderingLabel
- vtkInteractionWidgets
- vtkInfovisCore
-)
-
-# Seting the following variable is equivalent to having passed the components
-# when calling the FIND_PACKAGE() command.
-SET(SalomeVTK_FIND_COMPONENTS ${SalomeVTK_COMPONENTS})
-
-# If no VTK root dir is specified, try the ParaView root dir:
-SET(PARAVIEW_ROOT_DIR "$ENV{PARAVIEW_ROOT_DIR}" CACHE PATH "Path to the ParaView installation")
-IF(EXISTS "${PARAVIEW_ROOT_DIR}" AND (NOT VTK_ROOT_DIR))
- MESSAGE(STATUS "Looking for VTK in the ParaView installation (PARAVIEW_ROOT_DIR exists and VTK_ROOT_DIR is not defined) ...")
-
- # Extract sub-directory "paraview-x.xx":
- FILE(GLOB VTK_DIR "${PARAVIEW_ROOT_DIR}/lib/cmake/paraview-[1-9].[0-9]*")
- MESSAGE(STATUS "Setting VTK_DIR to: ${VTK_DIR}")
-ENDIF()
-
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(VTK VTK_INCLUDE_DIRS 2)
-MARK_AS_ADVANCED(VTK_DIR)
-
-IF(VTK_FOUND)
- MESSAGE(STATUS "VTK version is ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}")
- #MESSAGE(STATUS "VTK libraries are: ${VTK_LIBRARIES}")
-ENDIF()
-
-IF(VTK_FOUND)
- SALOME_ACCUMULATE_HEADERS(VTK_INCLUDE_DIRS)
- SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${VTK_LIBRARIES})
- SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${VTK_LIBRARIES})
- SALOME_ACCUMULATE_ENVIRONMENT(PV_PLUGIN_PATH ${VTK_LIBRARIES})
-ENDIF()
+++ /dev/null
-# - Sphinx detection
-#
-# Output variables:
-# SPHINX_EXECUTABLE - path to the Sphinx executable
-# SPHINX_PYTHONPATH - path to the Sphinx Python modules
-#
-###########################################################################
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-FIND_PROGRAM(SPHINX_EXECUTABLE sphinx-build PATH_SUFFIXES Scripts)
-FIND_PROGRAM(SPHINX_APIDOC_EXECUTABLE sphinx-apidoc PATH_SUFFIXES Scripts)
-
-# Get root dir locally, going up two levels from the exec:
-GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${SPHINX_EXECUTABLE}" PATH)
-GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH)
-IF(WIN32)
- SET(SPHINX_PYTHONPATH "${_tmp_ROOT_DIR}/lib/site-packages")
-ELSE()
- SET(SPHINX_PYTHONPATH "${_tmp_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages")
-ENDIF()
-
-# Handle the standard arguments of the find_package() command:
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sphinx REQUIRED_VARS SPHINX_EXECUTABLE SPHINX_APIDOC_EXECUTABLE)
-
-IF(SPHINX_EXECUTABLE)
- EXECUTE_PROCESS(COMMAND ${SPHINX_EXECUTABLE} "--version" OUTPUT_VARIABLE SPHINX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
- STRING(REGEX REPLACE ".* ([0-9.]+)$" "\\1" SPHINX_VERSION "${SPHINX_VERSION}" )
- MESSAGE(STATUS "Sphinx version is ${SPHINX_VERSION}")
- IF(SPHINX_VERSION VERSION_LESS "1.3")
- SET(SPHINX_THEME "default")
- ELSE()
- SET(SPHINX_THEME "classic")
- ENDIF()
-ENDIF(SPHINX_EXECUTABLE)
+++ /dev/null
-# Copyright (C) 2012-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# Author: A.Geay, V. Sandler, A. Bruneton
-#
-
-#----------------------------------------------------------------------------
-# LIST_CONTAINS is a macro useful for determining whether a list has a
-# particular entry
-#----------------------------------------------------------------------------
-MACRO(LIST_CONTAINS var value)
- SET(${var})
- FOREACH(value2 ${ARGN})
- IF(${value} STREQUAL "${value2}")
- SET(${var} TRUE)
- ENDIF (${value} STREQUAL "${value2}")
- ENDFOREACH (value2)
-ENDMACRO(LIST_CONTAINS)
-
-#----------------------------------------------------------------------------
-# The PARSE_ARGUMENTS macro will take the arguments of another macro and
-# define several variables.
-#
-# USAGE: PARSE_ARGUMENTS(prefix arg_names options arg1 arg2...)
-#
-# ARGUMENTS:
-#
-# prefix: IN: a prefix to put on all variables it creates.
-#
-# arg_names: IN: a list of names.
-# For each item in arg_names, PARSE_ARGUMENTS will create a
-# variable with that name, prefixed with prefix_. Each variable will be filled
-# with the arguments that occur after the given arg_name is encountered
-# up to the next arg_name or the end of the arguments. All options are
-# removed from these lists. PARSE_ARGUMENTS also creates a
-# prefix_DEFAULT_ARGS variable containing the list of all arguments up
-# to the first arg_name encountered.
-#
-# options: IN: a list of options.
-# For each item in options, PARSE_ARGUMENTS will create a
-# variable with that name, prefixed with prefix_. So, for example, if prefix is
-# MY_MACRO and options is OPTION1;OPTION2, then PARSE_ARGUMENTS will
-# create the variables MY_MACRO_OPTION1 and MY_MACRO_OPTION2. These
-# variables will be set to true if the option exists in the command line
-# or false otherwise.
-# arg_names and options lists should be quoted.
-#
-# The rest of PARSE_ARGUMENTS are arguments from another macro to be parsed.
-#----------------------------------------------------------------------------
-MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
- SET(DEFAULT_ARGS)
- FOREACH(arg_name ${arg_names})
- SET(${prefix}_${arg_name})
- ENDFOREACH(arg_name)
- FOREACH(option ${option_names})
- SET(${prefix}_${option} FALSE)
- ENDFOREACH(option)
- SET(current_arg_name DEFAULT_ARGS)
- SET(current_arg_list)
- FOREACH(arg ${ARGN})
- LIST_CONTAINS(is_arg_name ${arg} ${arg_names})
- IF (is_arg_name)
- SET(${prefix}_${current_arg_name} ${current_arg_list})
- SET(current_arg_name ${arg})
- SET(current_arg_list)
- ELSE (is_arg_name)
- LIST_CONTAINS(is_option ${arg} ${option_names})
- IF (is_option)
- SET(${prefix}_${arg} TRUE)
- ELSE (is_option)
- SET(current_arg_list ${current_arg_list} ${arg})
- ENDIF (is_option)
- ENDIF (is_arg_name)
- ENDFOREACH(arg)
- SET(${prefix}_${current_arg_name} ${current_arg_list})
-ENDMACRO(PARSE_ARGUMENTS)
-
-#----------------------------------------------------------------------------
-# SALOME_INSTALL_SCRIPTS is a macro useful for installing scripts.
-#
-# USAGE: SALOME_INSTALL_SCRIPTS(file_list path [WORKING_DIRECTORY dir] [DEF_PERMS])
-#
-# ARGUMENTS:
-# file_list: IN : list of files to be installed. This list should be quoted.
-# path: IN : full pathname for installing.
-#
-# By default files to be installed as executable scripts.
-# If DEF_PERMS option is provided, than permissions for installed files are
-# only OWNER_WRITE, OWNER_READ, GROUP_READ, and WORLD_READ.
-#----------------------------------------------------------------------------
-MACRO(SALOME_INSTALL_SCRIPTS file_list path)
- PARSE_ARGUMENTS(SALOME_INSTALL_SCRIPTS "WORKING_DIRECTORY" "DEF_PERMS" ${ARGN})
- SET(PERMS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
- IF(NOT SALOME_INSTALL_SCRIPTS_DEF_PERMS)
- SET(PERMS ${PERMS} OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
- ENDIF(NOT SALOME_INSTALL_SCRIPTS_DEF_PERMS)
- SET(_all_pyc)
- SET(_all_pyo)
- SET(_all_subdirs)
- FOREACH(file ${file_list})
- SET(PREFIX "")
- SET(_source_prefix "")
- GET_FILENAME_COMPONENT(file_name ${file} NAME)
- IF(NOT IS_ABSOLUTE ${file})
- IF(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY)
- SET(PREFIX "${SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY}/")
- ENDIF(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY)
- SET(_source_prefix "${CMAKE_CURRENT_SOURCE_DIR}/")
- ENDIF(NOT IS_ABSOLUTE ${file})
- INSTALL(FILES ${PREFIX}${file} DESTINATION ${path} PERMISSIONS ${PERMS})
- GET_FILENAME_COMPONENT(ext ${file} EXT)
- GET_FILENAME_COMPONENT(we_ext ${file} NAME_WE)
-
- IF(ext STREQUAL .py)
- # Generate and install the pyc and pyo
- # [ABN] Important: we avoid references or usage of CMAKE_INSTALL_PREFIX which is not correctly set
- # when using CPack.
- SET(_pyc_file "${CMAKE_CURRENT_BINARY_DIR}/${we_ext}.pyc")
- SET(_pyo_file "${CMAKE_CURRENT_BINARY_DIR}/${we_ext}.pyo")
- LIST(APPEND _all_pyc ${_pyc_file})
- LIST(APPEND _all_pyo ${_pyo_file})
- ADD_CUSTOM_COMMAND(
- OUTPUT ${_pyc_file}
- COMMAND ${PYTHON_EXECUTABLE} -c "import py_compile ; py_compile.compile('${_source_prefix}${file}', '${_pyc_file}', doraise=True )"
- DEPENDS ${PREFIX}${file}
- VERBATIM
- )
- ADD_CUSTOM_COMMAND(
- OUTPUT ${_pyo_file}
- COMMAND ${PYTHON_EXECUTABLE} -O -c "import py_compile ; py_compile.compile('${_source_prefix}${file}', '${_pyo_file}', doraise=True )"
- DEPENDS ${PREFIX}${file}
- VERBATIM
- )
- # Install the .pyo and the .pyc
- INSTALL(FILES ${_pyc_file} DESTINATION ${path} PERMISSIONS ${PERMS})
- INSTALL(FILES ${_pyo_file} DESTINATION ${path} PERMISSIONS ${PERMS})
- ENDIF(ext STREQUAL .py)
-
- # get relativa path (from CMAKE_SOURCE_DIR to CMAKE_CURRENT_SOURCE_DIR)
- STRING(REGEX REPLACE ${CMAKE_SOURCE_DIR} "" rel_dir ${CMAKE_CURRENT_SOURCE_DIR})
- # convert "/" to "_"
- IF(rel_dir)
- STRING(REGEX REPLACE "/" "_" unique_name ${rel_dir})
- ELSE(rel_dir)
- SET(unique_name _)
- ENDIF(rel_dir)
-
- ENDFOREACH(file ${file_list})
- # Generate only one target for all requested Python script compilation.
- # Make sure that the target name is unique too.
- IF(_all_pyc)
- SET(_cnt 0)
- WHILE(TARGET "PYCOMPILE${unique_name}_${_cnt}")
- MATH(EXPR _cnt ${_cnt}+1)
- ENDWHILE()
- ADD_CUSTOM_TARGET("PYCOMPILE${unique_name}_${_cnt}" ALL DEPENDS ${_all_pyc} ${_all_pyo})
- ENDIF()
-ENDMACRO(SALOME_INSTALL_SCRIPTS)
-
-#----------------------------------------------------------------------------
-# SALOME_CONFIGURE_FILE is a macro useful for copying a file to another location
-# and modify its contents.
-#
-# USAGE: SALOME_CONFIGURE_FILE(in_file out_file [INSTALL dir])
-#
-# ARGUMENTS:
-# in_file: IN : input file (if relative path is given, full file path is computed from current source dir).
-# out_file: IN : output file (if relative path is given, full file path is computed from current build dir).
-# If INSTALL is specified, then 'out_file' will be installed to the 'dir' directory.
-#----------------------------------------------------------------------------
-MACRO(SALOME_CONFIGURE_FILE IN_FILE OUT_FILE)
- IF(IS_ABSOLUTE ${IN_FILE})
- SET(_in_file ${IN_FILE})
- ELSE()
- SET(_in_file ${CMAKE_CURRENT_SOURCE_DIR}/${IN_FILE})
- ENDIF()
- IF(IS_ABSOLUTE ${OUT_FILE})
- SET(_out_file ${OUT_FILE})
- ELSE()
- SET(_out_file ${CMAKE_CURRENT_BINARY_DIR}/${OUT_FILE})
- ENDIF()
- MESSAGE(STATUS "Creation of ${_out_file}")
- CONFIGURE_FILE(${_in_file} ${_out_file} @ONLY)
- PARSE_ARGUMENTS(SALOME_CONFIGURE_FILE "INSTALL" "" ${ARGN})
- IF(SALOME_CONFIGURE_FILE_INSTALL)
- INSTALL(FILES ${_out_file} DESTINATION ${SALOME_CONFIGURE_FILE_INSTALL})
- ENDIF(SALOME_CONFIGURE_FILE_INSTALL)
-ENDMACRO(SALOME_CONFIGURE_FILE)
-
-
-#######################################################################################
-# Useful macros for SALOME own package detection system
-#
-
-###
-# SALOME_CHECK_EQUAL_PATHS(result path1 path2)
-# Check if two paths are identical, resolving links. If the paths do not exist a simple
-# text comparison is performed.
-# result is a boolean.
-###
-MACRO(SALOME_CHECK_EQUAL_PATHS varRes path1 path2)
- SET("${varRes}" OFF)
- IF(EXISTS "${path1}")
- GET_FILENAME_COMPONENT(_tmp1 "${path1}" REALPATH)
- ELSE()
- SET(_tmp1 "${path1}")
- ENDIF()
-
- IF(EXISTS "${path2}")
- GET_FILENAME_COMPONENT(_tmp2 "${path2}" REALPATH)
- ELSE()
- SET(_tmp2 "${path2}")
- ENDIF()
-
- IF("${_tmp1}" STREQUAL "${_tmp2}")
- SET("${varRes}" ON)
- ENDIF()
-# MESSAGE(${${varRes}})
-ENDMACRO()
-
-####
-# SALOME_LOG_OPTIONAL_PACKAGE(pkg flag)
-#
-# Register in global variables the detection status (found or not) of the optional package 'pkg'
-# and the configuration flag that should be turned off to avoid detection of the package.
-# The global variables are read again by SALOME_PACKAGE_REPORT_AND_CHECK to produce
-# a summary report of the detection status and stops the process if necessary.
-MACRO(SALOME_LOG_OPTIONAL_PACKAGE pkg flag)
- # Was the package found
- STRING(TOUPPER ${pkg} _pkg_UC)
- IF(${pkg}_FOUND OR ${_pkg_UC}_FOUND)
- SET(_isFound TRUE)
- ELSE()
- SET(_isFound FALSE)
- ENDIF()
-
- # Is the package already in the list? Then update its status:
- LIST(FIND _SALOME_OPTIONAL_PACKAGES_names ${pkg} _result)
- IF(NOT ${_result} EQUAL -1)
- LIST(REMOVE_AT _SALOME_OPTIONAL_PACKAGES_found ${_result})
- LIST(REMOVE_AT _SALOME_OPTIONAL_PACKAGES_flags ${_result})
- LIST(INSERT _SALOME_OPTIONAL_PACKAGES_found ${_result} ${_isFound})
- LIST(INSERT _SALOME_OPTIONAL_PACKAGES_flags ${_result} ${flag})
- ELSE()
- # Otherwise insert it
- LIST(APPEND _SALOME_OPTIONAL_PACKAGES_names ${pkg})
- LIST(APPEND _SALOME_OPTIONAL_PACKAGES_found ${_isFound})
- LIST(APPEND _SALOME_OPTIONAL_PACKAGES_flags ${flag})
- ENDIF()
-
-ENDMACRO(SALOME_LOG_OPTIONAL_PACKAGE)
-
-####
-# SALOME_JUSTIFY_STRING()
-#
-# Justifies the string specified as an argument to the given length
-# adding required number of spaces to the end. Does noting if input
-# string is longer as required length.
-# Puts the result to the output variable.
-#
-# USAGE: SALOME_JUSTIFY_STRING(input length result)
-#
-# ARGUMENTS:
-# input [in] input string
-# length [in] required length of resulting string
-# result [out] name of variable where the result string is put to
-#
-MACRO(SALOME_JUSTIFY_STRING input length result)
- SET(${result} ${input})
- STRING(LENGTH ${input} _input_length)
- MATH(EXPR _nb_spaces "${length}-${_input_length}-1")
- IF (_nb_spaces GREATER 0)
- FOREACH(_idx RANGE ${_nb_spaces})
- SET(${result} "${${result}} ")
- ENDFOREACH()
- ENDIF()
-ENDMACRO(SALOME_JUSTIFY_STRING)
-
-####
-# SALOME_PACKAGE_REPORT_AND_CHECK()
-#
-# Print a quick summary of the detection of optional prerequisites.
-# If a package was not found, the configuration is stopped. The summary also indicates
-# which flag should be turned off to skip the detection of the package.
-#
-# If optional JUSTIFY argument is specified, names of packages
-# are left-justified to the given length; default value is 10.
-#
-# USAGE: SALOME_PACKAGE_REPORT_AND_CHECK([JUSTIFY length])
-#
-MACRO(SALOME_PACKAGE_REPORT_AND_CHECK)
- SET(_will_fail OFF)
- PARSE_ARGUMENTS(SALOME_PACKAGE_REPORT "JUSTIFY" "" ${ARGN})
- IF(SALOME_PACKAGE_REPORT_JUSTIFY)
- SET(_length ${SALOME_PACKAGE_REPORT_JUSTIFY})
- ELSE()
- SET(_length 23)
- ENDIF()
- MESSAGE(STATUS "")
- MESSAGE(STATUS " Optional packages - Detection report ")
- MESSAGE(STATUS " ==================================== ")
- MESSAGE(STATUS "")
- IF(DEFINED _SALOME_OPTIONAL_PACKAGES_names)
- LIST(LENGTH _SALOME_OPTIONAL_PACKAGES_names _list_len)
- # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
- MATH(EXPR _range "${_list_len}-1")
- FOREACH(_idx RANGE ${_range})
- LIST(GET _SALOME_OPTIONAL_PACKAGES_names ${_idx} _pkg_name)
- LIST(GET _SALOME_OPTIONAL_PACKAGES_found ${_idx} _pkg_found)
- LIST(GET _SALOME_OPTIONAL_PACKAGES_flags ${_idx} _pkg_flag)
- SALOME_JUSTIFY_STRING(${_pkg_name} ${_length} _pkg_name)
- IF(_pkg_found)
- SET(_found_msg "Found")
- SET(_flag_msg "")
- ELSE()
- SET(_will_fail ON)
- SET(_found_msg "NOT Found")
- SET(_flag_msg " - ${_pkg_flag} can be switched OFF to skip this prerequisite.")
- ENDIF()
-
- MESSAGE(STATUS " * ${_pkg_name} -> ${_found_msg}${_flag_msg}")
- ENDFOREACH()
- ENDIF(DEFINED _SALOME_OPTIONAL_PACKAGES_names)
- MESSAGE(STATUS "")
- MESSAGE(STATUS "")
-
- # Failure if some packages were missing:
- IF(_will_fail)
- MESSAGE(FATAL_ERROR "Some required prerequisites have NOT been found. Take a look at the report above to fix this.")
- ENDIF()
-ENDMACRO(SALOME_PACKAGE_REPORT_AND_CHECK)
-
-####
-# SALOME_FIND_PACKAGE(englobingPackageName standardPackageName modus [onlyTryQuietly])
-#
-# example: SALOME_FIND_PACKAGE(SalomeVTK VTK CONFIG)
-#
-# Encapsulate the call to the standard FIND_PACKAGE(standardPackageName) passing all the options
-# given when calling the command FIND_PACKAGE(SalomeXYZ). Those options are stored implicitly in
-# CMake variables: xyz__FIND_QUIETLY, xyz_FIND_REQUIRED, etc ...
-#
-# If a list of components was specified when invoking the initial FIND_PACKAGE(SalomeXyz ...) this is
-# also handled properly.
-#
-# Modus is either MODULE or CONFIG (cf standard FIND_PACKAGE() documentation).
-# The last argument is optional and if set to TRUE will force the search to be OPTIONAL and QUIET.
-# If the package is looked for in CONFIG mode, the standard system paths are skipped. If you still want a
-# system installation to be found in this mode, you have to set the ROOT_DIR variable explicitly to /usr (for
-# example).
-#
-# This macro is to be called from within the FindSalomeXXXX.cmake file.
-#
-####
-MACRO(SALOME_FIND_PACKAGE englobPkg stdPkg mode)
- SET(_OPT_ARG ${ARGV3})
- # Only bother if the package was not already found:
- # Some old packages use the lower case version - standard should be to always use
- # upper case:
- STRING(TOUPPER ${stdPkg} stdPkgUC)
- IF(NOT (${stdPkg}_FOUND OR ${stdPkgUC}_FOUND))
- IF(${englobPkg}_FIND_QUIETLY OR _OPT_ARG)
- SET(_tmp_quiet "QUIET")
- ELSE()
- SET(_tmp_quiet)
- ENDIF()
- IF(${englobPkg}_FIND_REQUIRED AND NOT _OPT_ARG)
- SET(_tmp_req "REQUIRED")
- ELSE()
- SET(_tmp_req)
- ENDIF()
- IF(${englobPkg}_FIND_VERSION_EXACT)
- SET(_tmp_exact "EXACT")
- ELSE()
- SET(_tmp_exact)
- ENDIF()
-
- # Call the CMake FIND_PACKAGE() command:
- STRING(TOLOWER ${stdPkg} _pkg_lc)
- IF(("${mode}" STREQUAL "NO_MODULE") OR ("${mode}" STREQUAL "CONFIG"))
- # Hope to find direclty a CMake config file, indicating the SALOME CMake file
- # paths (the command already looks in places like "share/cmake", etc ... by default)
- # Note the options NO_CMAKE_BUILDS_PATH, NO_CMAKE_PACKAGE_REGISTRY to avoid (under Windows)
- # looking into a previous CMake build done via a GUI, or into the Win registry.
- # NO_CMAKE_SYSTEM_PATH and NO_SYSTEM_ENVIRONMENT_PATH ensure any _system_ files like 'xyz-config.cmake'
- # don't get loaded (typically Boost). To force their loading, set the XYZ_ROOT_DIR variable to '/usr'.
- # See documentation of FIND_PACKAGE() for full details.
-
- # Do we need to call the signature using components?
- IF(${englobPkg}_FIND_COMPONENTS)
- FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact}
- NO_MODULE ${_tmp_quiet} ${_tmp_req} COMPONENTS ${${englobPkg}_FIND_COMPONENTS}
- PATH_SUFFIXES "salome_adm/cmake_files" "adm_local/cmake_files" "adm/cmake"
- NO_CMAKE_BUILDS_PATH NO_CMAKE_PACKAGE_REGISTRY NO_CMAKE_SYSTEM_PACKAGE_REGISTRY NO_CMAKE_SYSTEM_PATH
- NO_SYSTEM_ENVIRONMENT_PATH)
- ELSE()
- FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact}
- NO_MODULE ${_tmp_quiet} ${_tmp_req}
- PATH_SUFFIXES "salome_adm/cmake_files" "adm_local/cmake_files" "adm/cmake"
- NO_CMAKE_BUILDS_PATH NO_CMAKE_PACKAGE_REGISTRY NO_CMAKE_SYSTEM_PACKAGE_REGISTRY NO_CMAKE_SYSTEM_PATH
- NO_SYSTEM_ENVIRONMENT_PATH)
- ENDIF()
- MARK_AS_ADVANCED(${stdPkg}_DIR)
-
- ELSEIF("${mode}" STREQUAL "MODULE")
-
- # Do we need to call the signature using components?
- IF(${englobPkg}_FIND_COMPONENTS)
- FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact}
- MODULE ${_tmp_quiet} ${_tmp_req} COMPONENTS ${${englobPkg}_FIND_COMPONENTS})
- ELSE()
- FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact}
- MODULE ${_tmp_quiet} ${_tmp_req})
- ENDIF()
-
- ELSE()
-
- MESSAGE(FATAL_ERROR "Invalid mode argument in the call to the macro SALOME_FIND_PACKAGE. Should be CONFIG or MODULE.")
-
- ENDIF()
-
- ENDIF()
-ENDMACRO()
-
-
-####################################################################
-# SALOME_FIND_PACKAGE_DETECT_CONFLICTS(pkg referenceVariable upCount)
-# pkg : name of the system package to be detected
-# referenceVariable: variable containing a path that can be browsed up to
-# retrieve the package root directory (xxx_ROOT_DIR)
-# upCount : number of times we have to go up from the path <referenceVariable>
-# to obtain the package root directory.
-# If this is a path to a file, going up one time gives the directory containing the file
-# going up 2 times gives the parent directory.
-#
-# For example: SALOME_FIND_PACKAGE_DETECT_CONFLICTS(SWIG SWIG_EXECUTABLE 2)
-# with SWIG_EXECUTABLE set to '/usr/bin/swig'
-# will produce '/usr'
-#
-# Generic detection (and conflict check) procedure for package XYZ:
-# 1. Load a potential env variable XYZ_ROOT_DIR as a default choice for the cache entry XYZ_ROOT_DIR
-# If empty, load a potential XYZ_ROOT_DIR_EXP as default value (path exposed by another package depending
-# directly on XYZ)
-# 2. Invoke FIND_PACKAGE() in this order:
-# * in CONFIG mode first (if possible): priority is given to a potential
-# "XYZ-config.cmake" file
-# * then switch to the standard MODULE mode, appending on CMAKE_PREFIX_PATH
-# the above XYZ_ROOT_DIR variable
-# 3. Extract the path actually found into a temp variable _XYZ_TMP_DIR
-# 4. Warn if XYZ_ROOT_DIR is set and doesn't match what was found (e.g. when CMake found the system installation
-# instead of what is pointed to by XYZ_ROOT_DIR - happens when a typo in the content of XYZ_ROOT_DIR).
-# 5. Conflict detection:
-# * check the temp variable against a potentially existing XYZ_ROOT_DIR_EXP
-# 6. Finally expose what was *actually* found in XYZ_ROOT_DIR.
-# 7. Specific stuff: for example exposing a prerequisite of XYZ to the rest of the world for future
-# conflict detection. This is added after the call to the macro by the callee.
-#
-MACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS pkg referenceVariable upCount)
- ##
- ## 0. Initialization
- ##
- PARSE_ARGUMENTS(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS "ENVVAR" "" ${ARGN})
-
- # Package name, upper case
- STRING(TOUPPER ${pkg} pkg_UC)
-
- ##
- ## 1. Load environment or any previously detected root dir for the package
- ##
- SET(_envvar ${pkg_UC}_ROOT_DIR)
- IF(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS_ENVVAR)
- SET(_envvar "${SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS_ENVVAR}")
- ENDIF()
- IF(DEFINED ENV{${_envvar}})
- FILE(TO_CMAKE_PATH "$ENV{${_envvar}}" _${pkg_UC}_ROOT_DIR_ENV)
- SET(_dflt_value "${_${pkg_UC}_ROOT_DIR_ENV}")
- ELSE()
- # will be blank if no package was previously loaded:
- SET(_dflt_value "${${pkg_UC}_ROOT_DIR_EXP}")
- ENDIF()
- # Detect if the variable has been set on the command line or elsewhere:
- IF(DEFINED ${_envvar})
- SET(_var_already_there TRUE)
- ELSE()
- SET(_var_already_there FALSE)
- ENDIF()
- # Make cache entry
- SET(${_envvar} "${_dflt_value}" CACHE PATH "Path to ${pkg_UC} directory")
-
- ##
- ## 2. Find package - try CONFIG mode first (i.e. looking for XYZ-config.cmake)
- ##
-
- # Override the variable - don't append to it, as it would give precedence
- # to what was stored there before!
- IF(DEFINED ${_envvar})
- SET(CMAKE_PREFIX_PATH "${${_envvar}}")
- ENDIF()
-
- # Try find_package in config mode. This has the priority, but is
- # performed QUIET and not REQUIRED:
- SALOME_FIND_PACKAGE("Salome${pkg}" ${pkg} NO_MODULE TRUE)
-
- IF (${pkg_UC}_FOUND OR ${pkg}_FOUND)
- MESSAGE(STATUS "Found ${pkg} in CONFIG mode!")
- ENDIF()
-
- # Otherwise try the standard way (module mode, with the standard CMake Find*** macro):
- # We do it quietly to produce our own error message, except if we are in debug mode:
- IF(SALOME_CMAKE_DEBUG)
- SALOME_FIND_PACKAGE("Salome${pkg}" ${pkg} MODULE FALSE)
- ELSE()
- SALOME_FIND_PACKAGE("Salome${pkg}" ${pkg} MODULE TRUE)
- ENDIF()
-
- # Set the "FOUND" variable for the SALOME wrapper:
- IF(${pkg_UC}_FOUND OR ${pkg}_FOUND)
- SET(SALOME${pkg_UC}_FOUND TRUE)
- ELSE()
- SET(SALOME${pkg_UC}_FOUND FALSE)
- IF(NOT Salome${pkg}_FIND_QUIETLY)
- IF(Salome${pkg}_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Package ${pkg} couldn't be found - did you set the corresponing root dir correctly? "
- "It currently contains ${_envvar}=${${_envvar}} "
- "Append -DSALOME_CMAKE_DEBUG=ON on the command line if you want to see the original CMake error.")
- ELSE()
- MESSAGE(WARNING "Package ${pkg} couldn't be found - did you set the corresponing root dir correctly? "
- "It currently contains ${_envvar}=${${_envvar}} "
- "Append -DSALOME_CMAKE_DEBUG=ON on the command line if you want to see the original CMake error.")
- ENDIF()
- ENDIF()
- ENDIF()
-
- IF (${pkg_UC}_FOUND OR ${pkg}_FOUND)
- ## 3. Set the root dir which was finally retained by going up "upDir" times
- ## from the given reference path. The variable "referenceVariable" may be a list.
- ## In this case we take its first element.
-
- # First test if the variable exists, warn otherwise:
- IF(NOT DEFINED ${referenceVariable})
- MESSAGE(WARNING "${pkg}: the reference variable '${referenceVariable}' used when calling the macro "
- "SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS() is not defined.")
- ENDIF()
-
- LIST(LENGTH ${referenceVariable} _tmp_len)
- IF(_tmp_len)
- LIST(GET ${referenceVariable} 0 _tmp_ROOT_DIR)
- ELSE()
- # Note the double de-reference of "referenceVariable":
- SET(_tmp_ROOT_DIR "${${referenceVariable}}")
- ENDIF()
- # Up cound can be reset by detection procedure
- SET(_upCount ${upCount})
- IF(DEFINED ${pkg_UC}_UPCOUNT)
- SET(_upCount ${${pkg_UC}_UPCOUNT})
- ENDIF()
- IF(${_upCount})
- FOREACH(_unused RANGE 1 ${_upCount})
- GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH)
- ENDFOREACH()
- ENDIF()
-
- ##
- ## 4. Warn if CMake found something not located under ENV(XYZ_ROOT_DIR)
- ##
- IF(DEFINED ENV{${_envvar}})
- SALOME_CHECK_EQUAL_PATHS(_res "${_tmp_ROOT_DIR}" "${_${pkg_UC}_ROOT_DIR_ENV}")
- IF(NOT _res)
- MESSAGE(WARNING "${pkg} was found, but not at the path given by the "
- "environment ${_envvar}! Is the variable correctly set? "
- "The two paths are: ${_tmp_ROOT_DIR} and: ${_${pkg_UC}_ROOT_DIR_ENV}")
-
- ELSE()
- MESSAGE(STATUS "${pkg} found directory matches what was specified in the ${_envvar} variable, all good!")
- ENDIF()
- ELSE()
- IF(NOT _var_already_there)
- MESSAGE(STATUS "Variable ${_envvar} was not explicitly defined. "
- "An installation was found anyway: ${_tmp_ROOT_DIR}")
- ENDIF()
- ENDIF()
-
- ##
- ## 5. Conflict detection
- ## From another prerequisite using the package:
- ##
- IF(${pkg_UC}_ROOT_DIR_EXP)
- SALOME_CHECK_EQUAL_PATHS(_res "${_tmp_ROOT_DIR}" "${${pkg_UC}_ROOT_DIR_EXP}")
- IF(NOT _res)
- MESSAGE(WARNING "Warning: ${pkg}: detected version conflicts with a previously found ${pkg}!"
- " The two paths are " ${_tmp_ROOT_DIR} " vs " ${${pkg_UC}_ROOT_DIR_EXP})
- ELSE()
- MESSAGE(STATUS "${pkg} directory matches what was previously exposed by another prereq, all good!")
- ENDIF()
- ENDIF()
-
- ##
- ## 6. Save the detected installation
- ##
- SET(${_envvar} "${_tmp_ROOT_DIR}")
-
- ELSE()
- MESSAGE(STATUS "${pkg} was not found.")
- ENDIF()
-
- SET(Salome${pkg}_FOUND "${pkg}_FOUND")
-ENDMACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS)
-
-
-####################################################################
-# SALOME_ADD_MPI_TO_HDF5()
-#
-# Overload the HDF5 flags so that they also contain MPI references.
-# This is to be used when HDF5 was compiled with MPI support;
-MACRO(SALOME_ADD_MPI_TO_HDF5)
- SET(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS} ${MPI_INCLUDE_DIRS})
- SET(HDF5_DEFINITIONS "${HDF5_DEFINITIONS} ${MPI_DEFINITIONS}")
- SET(HDF5_LIBRARIES ${HDF5_LIBRARIES} ${MPI_LIBRARIES})
-ENDMACRO(SALOME_ADD_MPI_TO_HDF5)
-
-####################################################################
-# SALOME_TOHEXA()
-# Convert a number (smaller than 16) into hexadecimal representation
-# with a leading 0.
-MACRO(SALOME_TOHEXA num result)
- SET(_hexa_map a b c d e f)
- IF(${num} LESS 10)
- SET(${result} "0${num}")
- ELSE()
- MATH(EXPR _res "${num}-10" )
- LIST(GET _hexa_map ${_res} _out)
- SET(${result} "0${_out}")
- ENDIF()
-ENDMACRO(SALOME_TOHEXA)
-
-####################################################################
-# SALOME_XVERSION()
-#
-# Computes hexadecimal version of SALOME package
-#
-# USAGE: SALOME_XVERSION(package)
-#
-# ARGUMENTS:
-#
-# package: IN: SALOME package name
-#
-# The macro reads SALOME package version from PACKAGE_VERSION variable
-# (note package name in uppercase as assumed for SALOME modules);
-# hexadecimal version value in form 0xAABBCC (where AA, BB and CC are
-# major, minor and maintenance components of package version in
-# hexadecimal form) is put to the PACKAGE_XVERSION variable
-MACRO(SALOME_XVERSION pkg)
- STRING(TOUPPER ${pkg} _pkg_UC)
- IF(${_pkg_UC}_VERSION)
- SET(_major)
- SET(_minor)
- SET(_patch)
- SALOME_TOHEXA(${${_pkg_UC}_MAJOR_VERSION} _major)
- SALOME_TOHEXA(${${_pkg_UC}_MINOR_VERSION} _minor)
- SALOME_TOHEXA(${${_pkg_UC}_PATCH_VERSION} _patch)
- SET(${_pkg_UC}_XVERSION "0x${_major}${_minor}${_patch}")
- ENDIF()
-ENDMACRO(SALOME_XVERSION)
-
-
-#########################################################################
-# SALOME_ACCUMULATE_HEADERS()
-#
-# This macro is called in the various FindSalomeXYZ.cmake modules to accumulate
-# internally the list of include headers to be saved for future export.
-# The full set of include is saved in a variable called
-# _${PROJECT_NAME}_EXTRA_HEADERS
-#
-MACRO(SALOME_ACCUMULATE_HEADERS lst)
- FOREACH(l IN LISTS ${lst})
- LIST(FIND _${PROJECT_NAME}_EXTRA_HEADERS "${l}" _res)
- IF(_res EQUAL "-1")
- IF(NOT "${l}" STREQUAL "/usr/include")
- LIST(APPEND _${PROJECT_NAME}_EXTRA_HEADERS "${l}")
- ENDIF()
- ENDIF()
- ENDFOREACH()
-ENDMACRO(SALOME_ACCUMULATE_HEADERS)
-
-#########################################################################
-# SALOME_ACCUMULATE_ENVIRONMENT()
-#
-# USAGE: SALOME_ACCUMULATE_ENVIRONMENT(envvar value [value ...])
-#
-# ARGUMENTS:
-# envvar [in] environment variable name, e.g. PATH
-# value [in] value(s) to be added to environment variable
-#
-# This macro is called in the various FindSalomeXYZ.cmake modules to
-# accumulate environment variables, to be used later to run some command
-# in proper environment.
-#
-# 1. Each envrironment variable is stored in specific CMake variable
-# _${PROJECT_NAME}_EXTRA_ENV_<var>, where <var> is name of variable.
-# 2. Full list of environment variable names is stored in CMake variable
-# _${PROJECT_NAME}_EXTRA_ENV.
-#
-# Notes:
-# - The arguments list can include optional CHECK or NOCHECK keywords:
-# * For all arguments following CHECK keyword the macro perform an
-# additional check (see below); this is the default mode, it is suitable
-# for path variables (PATH, LD_LIBRARY_PATH, etc).
-# * For all arguments following NOCHECK keyword, no additional check is
-# performed.
-# Checking an argument means that we check:
-# - That the path actually exists
-# - That this is not a standard system path (starting with "/usr"); this avoids
-# polluting LD_LIBRARY_PATH or PATH with things like "/usr/lib64" ...
-#
-MACRO(SALOME_ACCUMULATE_ENVIRONMENT envvar)
- SET(_is_check ON)
- FOREACH(_item ${ARGN})
- IF(${_item} STREQUAL "NOCHECK")
- SET(_is_check OFF)
- ELSEIF(${_item} STREQUAL "CHECK")
- SET(_is_check ON)
- ELSE()
- IF(_is_check)
- IF(NOT IS_DIRECTORY ${_item})
- IF(TARGET ${_item})
- GET_TARGET_PROPERTY(_item ${_item} LOCATION)
- ENDIF()
- GET_FILENAME_COMPONENT(_item ${_item} PATH)
- ENDIF()
- IF(EXISTS ${_item})
- STRING(REGEX MATCH "^(/usr|/lib|/bin)" _usr_find ${_item})
- LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item} _res)
- IF(NOT _usr_find AND _res EQUAL -1)
- LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item})
- ENDIF()
- ENDIF()
- ELSE(_is_check)
- LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item} _res)
- IF( _res EQUAL -1)
- LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item})
- ENDIF()
- ENDIF(_is_check)
- ENDIF()
- ENDFOREACH()
-
- LIST(FIND _${PROJECT_NAME}_EXTRA_ENV ${envvar} _res)
- IF(_res EQUAL -1)
- LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV ${envvar})
- ENDIF()
- SET(_${PROJECT_NAME}_EXTRA_ENV_FULL "SET\(${PROJECT_NAME}_EXTRA_ENV ${_${PROJECT_NAME}_EXTRA_ENV}\)")
- FOREACH(_res ${_${PROJECT_NAME}_EXTRA_ENV})
- STRING(REPLACE "${CMAKE_INSTALL_PREFIX}" "\${PACKAGE_PREFIX_DIR}" _res_path "${_${PROJECT_NAME}_EXTRA_ENV_${_res}}")
- SET(_${PROJECT_NAME}_EXTRA_ENV_FULL "${_${PROJECT_NAME}_EXTRA_ENV_FULL}\nSET\(${PROJECT_NAME}_EXTRA_ENV_${_res} ${_res_path}\)")
- ENDFOREACH()
-ENDMACRO(SALOME_ACCUMULATE_ENVIRONMENT)
-
-#########################################################################
-# SALOME_GENERATE_ENVIRONMENT_SCRIPT()
-#
-# USAGE: SALOME_GENERATE_ENVIRONMENT_SCRIPT(output script cmd opts)
-#
-# ARGUMENTS:
-# output [out] output command, e.g. for creation of target.
-# script [in] output environement script name
-# cmd [in] input command, e.g. sphinx or python command.
-# opts [in] options for input command (cmd).
-#
-# This macro is called when it's necessary to use given environment to run some command.
-# Macro generates environement script using previously created variables
-# _${PROJECT_NAME}_EXTRA_ENV_<var>, where <var> is name of variable and
-# _${PROJECT_NAME}_EXTRA_ENV (see marco SALOME_ACCUMULATE_ENVIRONMENT);
-# and puts generated command in proper environment into <output> argument.
-#
-# Notes:
-# - If <script> is specified as relative path, it is computed from the current build
-# directory.
-#
-MACRO(SALOME_GENERATE_ENVIRONMENT_SCRIPT output script cmd opts)
- IF(IS_ABSOLUTE ${script})
- SET(_script ${script})
- ELSE()
- SET(_script ${CMAKE_CURRENT_BINARY_DIR}/${script})
- ENDIF()
-
- IF(WIN32)
- SET(_ext "bat")
- SET(_call_cmd "call")
- ELSE()
- SET(_ext "sh")
- SET(_call_cmd ".")
- ENDIF()
-
- SET(_env)
- FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})
- FOREACH(_val ${_${PROJECT_NAME}_EXTRA_ENV_${_item}})
- IF(WIN32)
- IF(${_item} STREQUAL "LD_LIBRARY_PATH")
- SET(_item PATH)
- ENDIF()
- STRING(REPLACE "/" "\\" _env "${_env} @SET ${_item}=${_val};%${_item}%\n")
- ELSE(WIN32)
- SET(_env "${_env} export ${_item}=${_val}:\${${_item}}\n")
- ENDIF(WIN32)
- ENDFOREACH()
- ENDFOREACH()
-
- SET(_script ${_script}.${_ext})
- FILE(WRITE ${_script} "${_env}")
-
- SET(${output} ${_call_cmd} ${_script} && ${cmd} ${opts})
-
-ENDMACRO(SALOME_GENERATE_ENVIRONMENT_SCRIPT)
-
-#########################################################################
-# SALOME_GENERATE_TESTS_ENVIRONMENT()
-#
-# USAGE: SALOME_GENERATE_TESTS_ENVIRONMENT(output)
-#
-# ARGUMENTS:
-# output [out] output environement variable.
-#
-# This macro generates <output> variable to use given environment to run some tests.
-# Macro generates environement variable using previously created variables
-# _${PROJECT_NAME}_EXTRA_ENV_<var>, where <var> is name of variable and
-# _${PROJECT_NAME}_EXTRA_ENV (see marco SALOME_ACCUMULATE_ENVIRONMENT);
-# and puts this variable into <output> argument.
-#
-MACRO(SALOME_GENERATE_TESTS_ENVIRONMENT output)
- SET(_env)
- SET(_WIN_LD_LIBRARY OFF)
- FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})
- IF(${_item} STREQUAL "LD_LIBRARY_PATH")
- SET(_WIN_LD_LIBRARY ON)
- ENDIF()
- SET(_env_${_item})
- FOREACH(_val ${_${PROJECT_NAME}_EXTRA_ENV_${_item}})
- IF(WIN32)
- STRING(REPLACE "/" "\\" _val "${_val}")
- SET(_env_${_item} "${_val};${_env_${_item}}")
- ELSE()
- SET(_env_${_item} "${_val}:${_env_${_item}}")
- ENDIF()
- ENDFOREACH()
- ENDFOREACH()
-
- IF(_WIN_LD_LIBRARY AND WIN32)
- SET(_env_PATH "${_env_PATH}$ENV{LD_LIBRARY_PATH};${_env_LD_LIBRARY_PATH}")
- ENDIF()
-
- IF(WIN32)
- SET(sep ",")
- ELSE()
- SET(sep ";")
- ENDIF()
-
- FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})
- IF(WIN32)
- IF(NOT ${_item} STREQUAL "LD_LIBRARY_PATH")
- SET(_env "${_item}=$ENV{${_item}};${_env_${_item}}${sep}${_env}")
- ENDIF()
- ELSE()
- STRING(REPLACE ";" ":" _iii "$ENV{${_item}}")
- SET(_env "${_item}=${_iii}:${_env_${_item}}${sep}${_env}")
- ENDIF()
- ENDFOREACH()
-
- # Get module name as substring of "Salome<ModuleName>"
- STRING(REGEX MATCH "^Salome" _is_salome_project ${PROJECT_NAME})
- IF(_is_salome_project)
- STRING(SUBSTRING "${PROJECT_NAME}" 6 -1 PRNAME)
- ELSE()
- SET(PRNAME ${PROJECT_NAME})
- ENDIF()
- SET(_env "${PRNAME}_ROOT_DIR=${CMAKE_INSTALL_PREFIX}${sep}${_env}")
-
- # Creating follow string for Windows environement:
- # "VAR1_ENV=1\;2\;3\;...\;...\;...;VAR2_ENV=1\;2\;3\;...\;...\;...;VAR3_ENV=1\;2\;3\;...\;...\;...;..."
- IF(WIN32)
- STRING(REGEX REPLACE "\\\\*;" "\\\\;" _env "${_env}")
- STRING(REGEX REPLACE "\\\\*;*," ";" _env "${_env}")
- ENDIF()
-
- SET(${output} "${_env}")
-
-ENDMACRO(SALOME_GENERATE_TESTS_ENVIRONMENT)
-
-#########################################################################
-# SALOME_APPEND_LIST_OF_LIST()
-#
-# USAGE: SALOME_APPEND_LIST_OF_LIST(result element_list)
-#
-# Build a list of lists. The element_list is first parsed to convert it
-# from
-# a;b;c;d;e
-# to
-# a,b,c,d,e
-#
-# It is then added to the big list 'result'. Hence 'result' looks like:
-# a,b,c,d,e;f,g,h; ...
-#
-MACRO(SALOME_APPEND_LIST_OF_LIST result element_list)
- SET(_tmp_res)
- STRING(REPLACE ";" "," _tmp_res "${${element_list}}")
-
- # Yet another CMake stupidity - LIST(LENGTH ";" var) returns 0
- STRING(LENGTH result _list_len)
- IF(NOT _list_len EQUAL 0)
- SET(${result} "${${result}}${_tmp_res};") # LIST(APPEND ...) doesn't handle well empty elements!?
- ELSE()
- SET(${result} "${_tmp_res};") # to avoid redundant ';' at the beginning of the list
- ENDIF()
-
-ENDMACRO(SALOME_APPEND_LIST_OF_LIST)
-
-#########################################################################
-# SALOME_CONFIGURE_PREPARE()
-#
-# USAGE: SALOME_CONFIGURE_PREPARE(pkg1 pkg2 ...)
-#
-# Prepare the variable that will be used to configure the file Salome<MODULE>Config.cmake,
-# namely:
-# - _PREREQ_LIST : the list of level 1 external prerequisites
-# - _PREREQ_DIR_LIST : their corresponding CMake directories (i.e. where the CMake configuration
-# file for this package can be found, if there is any!)
-# - _PREREQ_COMPO_LIST: the list of components requested when this package was invoked
-#
-# All this information is built from the package_list, the list of level 1 packages for this module.
-# Only the packages found in CONFIG mode are retained.
-#
-MACRO(SALOME_CONFIGURE_PREPARE)
- SET(_tmp_prereq "${ARGV}")
- SET(_PREREQ_LIST)
- SET(_PREREQ_DIR_LIST)
- SET(_PREREQ_COMPO_LIST)
- FOREACH(_prereq IN LISTS _tmp_prereq)
- IF(${_prereq}_DIR)
- SET(_PREREQ_LIST "${_PREREQ_LIST} ${_prereq}")
- FILE(TO_CMAKE_PATH ${${_prereq}_DIR} CURR_DIR)
- SET(_PREREQ_DIR_LIST "${_PREREQ_DIR_LIST} \"${CURR_DIR}\"")
- SALOME_APPEND_LIST_OF_LIST(_PREREQ_COMPO_LIST Salome${_prereq}_COMPONENTS)
- ENDIF()
- ENDFOREACH()
-ENDMACRO(SALOME_CONFIGURE_PREPARE)
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-## Detect architecture
-IF(WIN32)
- SET(MACHINE WINDOWS)
-ELSE()
- SET(MACHINE PCLINUX)
-ENDIF()
-
-## Test for 64 bits
-IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
- SET(MACHINE_IS_64 TRUE)
-ELSE()
- SET(MACHINE_IS_64 FALSE)
-ENDIF()
-
-## Force CMAKE_BUILD_TYPE to Release if not set
-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)
-
-## Define the log level according to the build type
-IF(CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "Debug")
- SET(PYLOGLEVEL DEBUG)
-ELSE()
- SET(PYLOGLEVEL WARNING)
-ENDIF()
-
-## Make all warnings errors on non-windows platforms
-# CURRENTLY DISABLED
-IF(NOT (WIN32 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})
- SET(VAL $ENV{${name}})
- IF("${VAL}" STREQUAL "0")
- SET(ADD_WERROR ON)
- ENDIF()
- IF("${VAL}" STREQUAL "1")
- SET(ADD_WERROR OFF)
- ENDIF()
- ENDFOREACH()
-
- IF(ADD_WERROR)
-# SET(CMAKE_C_FLAGS "-Werror")
-# SET(CMAKE_CXX_FLAGS "-Werror")
- ENDIF()
-ENDIF()
-
-## TODO: remove this ?
-#IF(WIN32)
-# MARK_AS_ADVANCED(CLEAR CMAKE_CONFIGURATION_TYPES)
-# SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE} CACHE STRING "compilation types" FORCE)
-#ELSE()
-# 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()
-
-IF(WIN32)
- ## Windows specific:
- ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) # To disable windows warnings for strcpy, fopen, ...
- ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS) # To disable windows warnings generated by checked iterators(e.g. std::copy, std::transform, ...)
- ADD_DEFINITIONS(-DWNT -DWIN32)
- ADD_DEFINITIONS(-D_WIN32_WINNT=0x0500) # Windows 2000 or later API is required
- ADD_DEFINITIONS(-DPPRO_NT) # For medfile
- #ADD_DEFINITIONS(-D_USE_MATH_DEFINES) # for MEDMEM
-
- SET(PLATFORM_LIBS Ws2_32.lib)
- LIST(APPEND PLATFORM_LIBS Userenv.lib) # At least for GEOM suit
-
-################################################################################################
-#
-# RNV: In the SALOME sometimes operating with STL collections is done in not fully valid way.
-# To avoid run-time exception in Debug mode default values of the _SECURE_SCL,
-# _SECURE_SCL_THROWS and _HAS_ITERATOR_DEBUGGING macros were redefined. It solved a problem
-# then we used tne Microsoft Visual Studio 2008 to build SALOME on Windows platform.
-# But in the Microsoft Visual Studio 2010 these macros affect on the size of STL collection
-# classes(in difference from the Microsoft Visual Studio 2008: in this version of MSVS size
-# of the STL collection classes does not depend on these macros).
-# All pre-requisite products are built by MSVS 2010 in Debug mode with the default
-# values of the metioned above macros (namely _SECURE_SCL=1, _HAS_ITERATOR_DEBUGGING=1 and
-# _SECURE_SCL_THROWS=1). So SALOME modules should be build in the same configuration.
-#
-################################################################################################
-#
-# # Disable iterator debugging on WINDOWS to avoid runtime error during checking iterators
-# # _SECURE_SCL
-# # If defined as 1, unsafe iterator use causes a runtime error.
-# # If defined as 0, checked iterators are disabled.
-# # The default value for _SECURE_SCL is 1
-# # _SECURE_SCL_THROWS
-# # If defined as 1, an out of range iterator use causes an exception at runtime.
-# # If defined as 0, the program is terminated by calling invalid_parameter.
-# # The default value for _SECURE_SCL_THROWS is 0
-#
-# ADD_DEFINITIONS(-D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0)
-#
-# # The symbol _HAS_ITERATOR_DEBUGGING can be used to turn off the iterator debugging feature in a debug build
-# # If defined as 1, iterator debugging is enabled.
-# # If defined as 0, iterator debugging is disabled.
-# # The default value for _HAS_ITERATOR_DEBUGGING is 1
-#
-# IF(NOT CMAKE_BUILD_TYPE STREQUAL "RELEASE" AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
-# ADD_DEFINITIONS(-D_HAS_ITERATOR_DEBUGGING=0)
-# ENDIF(NOT CMAKE_BUILD_TYPE STREQUAL "RELEASE" AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
-################################################################################################
-
- IF(MACHINE_IS_64)
- SET(SIZE_OF_LONG 4) # set sizeof(long) to 4 byte
- ELSE()
- SET(SIZE_OF_LONG ${CMAKE_SIZEOF_VOID_P}) # set sizeof(long) the same as size of pointers
- ENDIF()
-ELSE()
- ## Linux specific:
- SET(PLATFORM_LIBS dl) # Dynamic loading (dlopen, dlsym)
- IF(MACHINE_IS_64)
- ADD_DEFINITIONS(-DPCLINUX64)
- ENDIF(MACHINE_IS_64)
-ENDIF()
-
-## define _DEBUG_ macro
-IF(NOT CMAKE_BUILD_TYPE STREQUAL "RELEASE" AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
- ADD_DEFINITIONS(-D_DEBUG_)
-ENDIF()
-
-## Apple specific:
-IF(APPLE)
- SET(CMAKE_C_COMPILER gcc)
- SET(CMAKE_CXX_COMPILER g++)
- # because default is clang(llvm) with mountain lion at least
-ENDIF()
-
-# Compiler flags for coverage testing
-IF(NOT WIN32)
- OPTION(SALOME_BUILD_FOR_GCOV "Add the compilation flags for GCov/LCov" OFF)
- MARK_AS_ADVANCED(SALOME_BUILD_FOR_GCOV)
- IF(SALOME_BUILD_FOR_GCOV)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
- ENDIF()
-ENDIF()
-
-IF(NOT NO_CXX11_SUPPORT)
- # C++11 support
- INCLUDE(CheckCXXCompilerFlag)
- CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
- CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
- IF(COMPILER_SUPPORTS_CXX11)
- MESSAGE(STATUS "Enable C++11 support")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
- ELSEIF(COMPILER_SUPPORTS_CXX0X)
- MESSAGE(STATUS "Enable C++0x support")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
- ELSE()
- MESSAGE(WARNING "Compiler ${CMAKE_CXX_COMPILER} has no C++11 support.")
- ENDIF()
-ENDIF()
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INSTALL( CODE "
-SET(INSTALL_PYIDL_DIR lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/salome) # R1 CHECK
-IF(WIN32)
- SET(INSTALL_PYIDL_DIR bin/salome) # R1 CHECK
-ENDIF(WIN32)
-
-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)
-")
-
-#----------------------------------------------------------------------------
-# OMNIORB_ADD_MODULE macro: generate CORBA wrappings for a module.
-#
-# USAGE: OMNIORB_ADD_MODULE(module idlfiles incdirs [linklibs])
-#
-# ARGUMENTS:
-# module : module name
-# idlfiles : list of IDL files to be compiled into module. If just a file name is given, the source
-# tree is first inspected. If not found there, the macro assumes the file will be built
-# in the build tree (CMAKE_CURRENT_BINARY_DIR) thanks to some ADD_CUSTOM_COMMAND() call
-# (used in PARAVIS).
-# incdirs : additional include dirs for IDL staff
-# linklibs : additional libraries the module to be linked to (optional)
-#
-# For example, to build CORBA staff from MyModule.idl for module MyModule
-# (that depends only on SALOME KERNEL interfaces), use the following code:
-#
-# INCLUDE(UseOmniORB)
-# INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIR} ${KERNEL_INCLUDE_DIRS})
-# OMNIORB_ADD_MODULE(SalomeIDLMyModule MyModule.idl ${KERNEL_ROOT_DIR}/idl/salome ${KERNEL_SalomeIDLKernel})
-# INSTALL(TARGETS SalomeIDLMyModule EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-#
-# This macro uses the following variables:
-# - From FindOmniORB.cmake
-# OMNIORB_IDL : the path to the omniidl tool
-# OMNIORB_IDLCXXFLAGS : the options to give to omniidl generator for C++ backend
-# OMNIORB_DEFINITIONS : additional compile options for C++
-# - From FindOmniORBPy.cmake
-# OMNIORB_IDLPYFLAGS : the options to give to omniidl generator for Python backend
-# OMNIORB_PYTHON_BACKEND : Python backend
-#
-# The macro automatically adds a target "omniorb_module_<module>" which can be used to set up
-# dependencies on the generation of the files produced by omniidl (typically the header files).
-#
-# TODO:
-# 1. Replace hardcoded dirpaths bin/salome, idl/salome, etc by corresponding configuration options.
-# 2. Revise/improve OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL macro usage.
-# 3. Add proper handling of INCLUDE_DIRECTORIES to minimize this macro usage in target CMakeLists.txt files.
-#
-#----------------------------------------------------------------------------
-MACRO(OMNIORB_ADD_MODULE module idlfiles incdirs)
- # process additional libraries the module to be linked to
- SET(_linklibs ${OMNIORB_LIBRARIES})
- FOREACH(_arg ${ARGN})
- SET(_linklibs ${_linklibs} ${_arg})
- ENDFOREACH()
-
- # module sources
- SET(_sources)
- # module produced files
- SET(_all_outputs)
- # type of the libraries: SHARED for Linux, STATIC for Windows
- SET(_type SHARED)
- IF(WIN32)
- SET(_type STATIC)
- ENDIF()
- IF(NOT WIN32 AND (_type STREQUAL STATIC))
- SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
- ENDIF()
-
- # add additional include dirs to the C++ and Python backend options
- SET(_cxx_flags ${OMNIORB_IDLCXXFLAGS})
- SET(_py_flags "${OMNIORB_IDLPYFLAGS}")
- FOREACH(_f ${incdirs})
- LIST(APPEND _cxx_flags "-I${_f}")
- LIST(APPEND _py_flags "-I${_f}")
- ENDFOREACH()
-
- FOREACH(_input ${idlfiles})
- GET_FILENAME_COMPONENT(_base ${_input} NAME_WE)
- GET_FILENAME_COMPONENT(_path ${_input} PATH)
- IF(NOT _path)
- IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_input})
- SET(_input_cmd ${CMAKE_CURRENT_SOURCE_DIR}/${_input})
- ELSE()
- SET(_input_cmd ${CMAKE_CURRENT_BINARY_DIR}/${_input})
- ENDIF()
- ELSE()
- SET(_input_cmd ${_input})
- ENDIF()
-
- SET(_inc ${CMAKE_CURRENT_BINARY_DIR}/${_base}.hh)
- SET(_src ${CMAKE_CURRENT_BINARY_DIR}/${_base}SK.cc)
- SET(_dynsrc ${CMAKE_CURRENT_BINARY_DIR}/${_base}DynSK.cc)
-
- LIST(APPEND _sources ${_src})
- LIST(APPEND _sources ${_dynsrc})
- SET(_outputs ${_inc} ${_src} ${_dynsrc})
- LIST(APPEND _all_outputs ${_outputs})
-
- ADD_CUSTOM_COMMAND(OUTPUT ${_outputs}
- COMMAND ${OMNIORB_IDL_COMPILER} ${_cxx_flags} ${_input_cmd}
- DEPENDS ${_input_cmd})
-
- INSTALL(FILES ${_input_cmd} DESTINATION idl/salome)
- INSTALL(FILES ${_inc} DESTINATION include/salome)
-
- IF(OMNIORB_PYTHON_BACKEND)
- STRING(REPLACE ";" " " _tmp "${_py_flags}")
- INSTALL(CODE "OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL( \"${OMNIORB_IDL_COMPILER}\" \"${_tmp}\" \"${_input_cmd}\" \"${CMAKE_INSTALL_PREFIX}/\${INSTALL_PYIDL_DIR}\" )")
- ENDIF()
- ENDFOREACH()
-
- ADD_LIBRARY(${module} ${_type} ${_sources})
- TARGET_LINK_LIBRARIES(${module} ${_linklibs})
- SET_TARGET_PROPERTIES(${module} PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
- ADD_CUSTOM_TARGET(omniorb_module_${module} DEPENDS ${_all_outputs})
-ENDMACRO(OMNIORB_ADD_MODULE)
+++ /dev/null
-# Copyright (C) 2012-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# ===============================================================
-# Files to be installed
-# ===============================================================
-
-# These files are 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 ${SALOME_INSTALL_CMAKE}/deprecated)
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# ------
-
-MESSAGE(STATUS "Check for boost ...")
-
-# ------
-
-SET (boost_versions 1_35 1_38 1_42 1_46_1 1_49 1_52)
-
-IF(BOOST_IS_MANDATORY STREQUAL 0)
- SET(BOOST_IS_MANDATORY 0)
- SET(BOOST_IS_OPTIONAL 1)
-ENDIF(BOOST_IS_MANDATORY STREQUAL 0)
-IF(BOOST_IS_OPTIONAL STREQUAL 0)
- SET(BOOST_IS_MANDATORY 1)
- SET(BOOST_IS_OPTIONAL 0)
-ENDIF(BOOST_IS_OPTIONAL STREQUAL 0)
-IF(NOT BOOST_IS_MANDATORY AND NOT BOOST_IS_OPTIONAL)
- SET(BOOST_IS_MANDATORY 1)
- SET(BOOST_IS_OPTIONAL 0)
-ENDIF(NOT BOOST_IS_MANDATORY AND NOT BOOST_IS_OPTIONAL)
-
-# ------
-
-SET(BOOST_STATUS 1)
-IF(WITHOUT_BOOST OR WITH_BOOST STREQUAL 0)
- SET(BOOST_STATUS 0)
- MESSAGE(STATUS "boost disabled from command line.")
-ENDIF(WITHOUT_BOOST OR WITH_BOOST STREQUAL 0)
-
-# ------
-
-IF(BOOST_STATUS)
- IF(WITH_BOOST)
- SET(BOOST_ROOT_USER ${WITH_BOOST})
- ELSE(WITH_BOOST)
- SET(BOOST_ROOT_USER $ENV{BOOST_ROOT})
- IF(NOT BOOST_ROOT_USER)
- SET(BOOST_ROOT_USER $ENV{BOOSTDIR})
- ENDIF(NOT BOOST_ROOT_USER)
- ENDIF(WITH_BOOST)
-ENDIF(BOOST_STATUS)
-
-# -----
-
-IF(BOOST_STATUS)
- IF(BOOST_ROOT_USER)
- SET(BOOST_FIND_PATHS_OPTION NO_DEFAULT_PATH)
- ELSE(BOOST_ROOT_USER)
- SET(BOOST_FIND_PATHS_OPTION)
- ENDIF(BOOST_ROOT_USER)
-ENDIF(BOOST_STATUS)
-
-# -----
-
-IF(BOOST_STATUS)
- IF(BOOST_ROOT_USER)
- SET(BOOST_INCLUDE_PATHS ${BOOST_ROOT_USER} ${BOOST_ROOT_USER}/include)
- FOREACH(version ${boost_versions})
- SET(BOOST_INCLUDE_PATHS ${BOOST_INCLUDE_PATHS} ${BOOST_ROOT_USER}/include/boost-${version})
- ENDFOREACH(version ${boost_versions})
- ELSE(BOOST_ROOT_USER)
- SET(BOOST_INCLUDE_PATHS)
- ENDIF(BOOST_ROOT_USER)
- SET(BOOST_INCLUDE_TO_FIND boost/shared_ptr.hpp)
- FIND_PATH(BOOST_INCLUDE_DIR ${BOOST_INCLUDE_TO_FIND} PATHS ${BOOST_INCLUDE_PATHS} ${BOOST_FIND_PATHS_OPTION})
- IF(BOOST_INCLUDE_DIR)
- IF(BOOST_ROOT_USER)
- SET(BOOST_CPPFLAGS -I${BOOST_INCLUDE_DIR})# to be removed
- SET(BOOST_INCLUDE_DIRS ${BOOST_INCLUDE_DIR})
- ENDIF(BOOST_ROOT_USER)
- MESSAGE(STATUS "${BOOST_INCLUDE_TO_FIND} found in ${BOOST_INCLUDE_DIR}")
- ELSE(BOOST_INCLUDE_DIR)
- SET(BOOST_STATUS 0)
- IF(BOOST_ROOT_USER)
- MESSAGE(STATUS "${BOOST_INCLUDE_TO_FIND} not found in ${BOOST_INCLUDE_PATHS}, check your BOOST installation.")
- ELSE(BOOST_ROOT_USER)
- MESSAGE(STATUS "${BOOST_INCLUDE_TO_FIND} not found on system, try to use WITH_BOOST option or BOOST_ROOT environment variable.")
- ENDIF(BOOST_ROOT_USER)
- ENDIF(BOOST_INCLUDE_DIR)
-ENDIF(BOOST_STATUS)
-
-# ----
-
-IF(BOOST_STATUS)
- IF(BOOST_ROOT_USER)
- SET(BOOST_LIB_PATHS ${BOOST_ROOT_USER}/lib)
- ELSE(BOOST_ROOT_USER)
- SET(BOOST_LIB_PATHS)
- ENDIF(BOOST_ROOT_USER)
-ENDIF(BOOST_STATUS)
-
-IF(WINDOWS)
- SET(BOOST_ENABLE_DLL 1)
-ELSE(WINDOWS)
- SET(BOOST_ENABLE_DLL 0)
-ENDIF(WINDOWS)
-
-IF(BOOST_STATUS)
- SET(BOOST_LIBS)
- FOREACH(name thread date_time signals filesystem system regex chrono)
- IF(WINDOWS)
- IF(CMAKE_BUILD_TYPE STREQUAL Debug)
- SET(EXTENSION -gd)
- ELSE(CMAKE_BUILD_TYPE STREQUAL Debug)
- SET(EXTENSION)
- ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug)
- SET(LIB_NAMES)
- SET(STATIC_LIB_NAMES)
- FOREACH(version ${boost_versions})
- SET(LIB_NAMES ${LIB_NAMES} boost_${name}-vc90-mt${EXTENSION}-${version})
- SET(STATIC_LIB_NAMES ${STATIC_LIB_NAMES} libboost_${name}-vc90-mt${EXTENSION}-${version})
- ENDFOREACH(version ${boost_versions})
- FIND_LIBRARY(BOOST_LIB_${name} NAMES ${LIB_NAMES} PATHS ${BOOST_LIB_PATHS} ${BOOST_FIND_PATHS_OPTION})
- SET(BOOST_LIB_${name}_FOUNDED ${BOOST_LIB_${name}})
- IF(NOT BOOST_LIB_${name})
- FIND_LIBRARY(STATIC_BOOST_LIB_${name} NAMES ${STATIC_LIB_NAMES} PATHS ${BOOST_LIB_PATHS} ${BOOST_FIND_PATHS_OPTION})
- SET(BOOST_LIB_${name}_FOUNDED ${STATIC_BOOST_LIB_${name}})
- SET(BOOST_ENABLE_DLL 0)
- ENDIF(NOT BOOST_LIB_${name})
- ELSE(WINDOWS)
- FIND_LIBRARY(BOOST_LIB_${name} NAMES boost_${name} boost_${name}-mt PATHS ${BOOST_LIB_PATHS} ${BOOST_FIND_PATHS_OPTION})
- SET(BOOST_LIB_${name}_FOUNDED ${BOOST_LIB_${name}})
- ENDIF(WINDOWS)
- IF(NOT BOOST_LIB_${name}_FOUNDED)
- MESSAGE(STATUS "boost lib ${name} not found")
- SET(BOOST_STATUS 0)
- ENDIF(NOT BOOST_LIB_${name}_FOUNDED)
- STRING(TOUPPER ${name} upname)
- SET(BOOST_LIB_${upname} ${BOOST_LIB_${name}_FOUNDED})
- SET(BOOST_LIBS ${BOOST_LIBS} ${BOOST_LIB_${name}_FOUNDED})
- ENDFOREACH(name thread date_time signals filesystem system)
-ENDIF(BOOST_STATUS)
-
-# ------
-
-IF(BOOST_STATUS)
- IF(WINDOWS)
- SET(BOOST_CPPFLAGS ${BOOST_CPPFLAGS} -DBOOST_DISABLE_ASSERTS)# to be removed
- SET(BOOST_DEFINITIONS -DBOOST_DISABLE_ASSERTS)
- IF(BOOST_ENABLE_DLL)
- SET(BOOST_CPPFLAGS ${BOOST_CPPFLAGS} -DBOOST_ALL_DYN_LINK)# to be removed
- SET(BOOST_DEFINITIONS "${BOOST_DEFINITIONS} -DBOOST_ALL_DYN_LINK")
- ENDIF(BOOST_ENABLE_DLL)
- ENDIF(WINDOWS)
-ELSE(BOOST_STATUS)
- IF(BOOST_IS_MANDATORY)
- MESSAGE(FATAL_ERROR "boost not found ... mandatory ... abort")
- ELSE(BOOST_IS_MANDATORY)
- MESSAGE(STATUS "boost not found ... optional ... disabled")
- ENDIF(BOOST_IS_MANDATORY)
-ENDIF(BOOST_STATUS)
-
-# ------
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# ------
-
-MESSAGE(STATUS "Check for doxygen ...")
-
-# ------
-
-IF(DOXYGEN_IS_MANDATORY STREQUAL 0)
- SET(DOXYGEN_IS_MANDATORY 0)
- SET(DOXYGEN_IS_OPTIONAL 1)
-ENDIF(DOXYGEN_IS_MANDATORY STREQUAL 0)
-IF(DOXYGEN_IS_OPTIONAL STREQUAL 0)
- SET(DOXYGEN_IS_MANDATORY 1)
- SET(DOXYGEN_IS_OPTIONAL 0)
-ENDIF(DOXYGEN_IS_OPTIONAL STREQUAL 0)
-IF(NOT DOXYGEN_IS_MANDATORY AND NOT DOXYGEN_IS_OPTIONAL)
- SET(DOXYGEN_IS_MANDATORY 0)
- SET(DOXYGEN_IS_OPTIONAL 1)
-ENDIF(NOT DOXYGEN_IS_MANDATORY AND NOT DOXYGEN_IS_OPTIONAL)
-
-# ------
-
-SET(DOXYGEN_STATUS 1)
-IF(WITHOUT_DOXYGEN OR WITH_DOXYGEN STREQUAL 0)
- SET(DOXYGEN_STATUS 0)
- MESSAGE(STATUS "doxygen disabled from command line.")
-ENDIF(WITHOUT_DOXYGEN OR WITH_DOXYGEN STREQUAL 0)
-
-# ------
-
-IF(DOXYGEN_STATUS)
- IF(WITH_DOXYGEN)
- SET(DOXYGEN_ROOT_USER ${WITH_DOXYGEN})
- ENDIF(WITH_DOXYGEN)
- IF(NOT DOXYGEN_ROOT_USER)
- SET(DOXYGEN_ROOT_USER $ENV{DOXYGEN_ROOT})
- ENDIF(NOT DOXYGEN_ROOT_USER)
- IF(NOT DOXYGEN_ROOT_USER)
- SET(DOXYGEN_ROOT_USER $ENV{DOXYGENHOME})
- ENDIF(NOT DOXYGEN_ROOT_USER)
-ENDIF(DOXYGEN_STATUS)
-
-# ------
-
-IF(DOXYGEN_STATUS)
- SET(DOXYGEN_EXECUTABLE_TO_FIND doxygen)
- IF(DOXYGEN_ROOT_USER)
- FIND_PROGRAM(DOXYGEN_EXECUTABLE ${DOXYGEN_EXECUTABLE_TO_FIND} PATHS ${DOXYGEN_ROOT_USER}/bin NO_DEFAULT_PATH)
- ELSE(DOXYGEN_ROOT_USER)
- FIND_PROGRAM(DOXYGEN_EXECUTABLE ${DOXYGEN_EXECUTABLE_TO_FIND})
- ENDIF(DOXYGEN_ROOT_USER)
- IF(DOXYGEN_EXECUTABLE)
- MESSAGE(STATUS "${DOXYGEN_EXECUTABLE_TO_FIND} found: ${DOXYGEN_EXECUTABLE}")
- ELSE(DOXYGEN_EXECUTABLE)
- MESSAGE(STATUS "${DOXYGEN_EXECUTABLE_TO_FIND} not found, try to use WITH_DOXYGEN option or DOXYGEN_ROOT (or DOXYGENHOME) environment variable")
- SET(DOXYGEN_STATUS 0)
- ENDIF(DOXYGEN_EXECUTABLE)
-ENDIF(DOXYGEN_STATUS)
-
-# ----
-
-IF(DOXYGEN_STATUS)
- SET(DOXYGEN_IS_OK 1)
-ELSE(DOXYGEN_STATUS)
- SET(DOXYGEN_IS_OK 0)
- IF(DOXYGEN_IS_MANDATORY)
- MESSAGE(FATAL_ERROR "doxygen not found ... mandatory ... abort")
- ELSE(DOXYGEN_IS_MANDATORY)
- MESSAGE(STATUS "doxygen not found ... optional ... disabled")
- ENDIF(DOXYGEN_IS_MANDATORY)
-ENDIF(DOXYGEN_STATUS)
-
-# ----
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# ------
-
-MESSAGE(STATUS "Check for hdf5 ...")
-
-# ------
-
-IF(HDF5_IS_MANDATORY STREQUAL 0)
- SET(HDF5_IS_MANDATORY 0)
- SET(HDF5_IS_OPTIONAL 1)
-ENDIF(HDF5_IS_MANDATORY STREQUAL 0)
-IF(HDF5_IS_OPTIONAL STREQUAL 0)
- SET(HDF5_IS_MANDATORY 1)
- SET(HDF5_IS_OPTIONAL 0)
-ENDIF(HDF5_IS_OPTIONAL STREQUAL 0)
-IF(NOT HDF5_IS_MANDATORY AND NOT HDF5_IS_OPTIONAL)
- SET(HDF5_IS_MANDATORY 1)
- SET(HDF5_IS_OPTIONAL 0)
-ENDIF(NOT HDF5_IS_MANDATORY AND NOT HDF5_IS_OPTIONAL)
-
-# ------
-
-SET(HDF5_STATUS 1)
-IF(WITHOUT_HDF5 OR WITH_HDF5 STREQUAL 0)
- SET(HDF5_STATUS 0)
- MESSAGE(STATUS "hdf5 disabled from command line.")
-ENDIF(WITHOUT_HDF5 OR WITH_HDF5 STREQUAL 0)
-
-# ------
-
-IF(HDF5_STATUS)
- IF(WITH_HDF5)
- SET(HDF5_ROOT_USER ${WITH_HDF5})
- ENDIF(WITH_HDF5)
- IF(NOT HDF5_ROOT_USER)
- SET(HDF5_ROOT_USER $ENV{HDF5_ROOT})
- ENDIF(NOT HDF5_ROOT_USER)
- IF(NOT HDF5_ROOT_USER)
- SET(HDF5_ROOT_USER $ENV{HDF5HOME})
- ENDIF(NOT HDF5_ROOT_USER)
-ENDIF(HDF5_STATUS)
-
-# ------
-
-IF(HDF5_STATUS)
- IF(NOT HDF5_ROOT_USER)
- FIND_PROGRAM(HDF5_DUMP h5dump)
- IF(HDF5_DUMP)
- MESSAGE(STATUS "h5dump found: ${HDF5_DUMP}")
- IF(HDF5_DUMP STREQUAL /usr/bin/h5dump)
- ELSE(HDF5_DUMP STREQUAL /usr/bin/h5dump)
- SET(HDF5_ROOT_USER ${HDF5_DUMP})
- GET_FILENAME_COMPONENT(HDF5_ROOT_USER ${HDF5_ROOT_USER} PATH)
- GET_FILENAME_COMPONENT(HDF5_ROOT_USER ${HDF5_ROOT_USER} PATH)
- ENDIF(HDF5_DUMP STREQUAL /usr/bin/h5dump)
- ELSE(HDF5_DUMP)
- MESSAGE(STATUS "h5dump not found, try to use WITH_HDF5 option or HDF5_ROOT (or HDF5HOME) environment variable")
- SET(HDF5_STATUS 0)
- ENDIF(HDF5_DUMP)
- ENDIF(NOT HDF5_ROOT_USER)
-ENDIF(HDF5_STATUS)
-
-# ------
-
-IF(HDF5_STATUS)
- IF(HDF5_ROOT_USER)
- SET(HDF5_FIND_PATHS_OPTION NO_DEFAULT_PATH)
- ELSE(HDF5_ROOT_USER)
- SET(HDF5_FIND_PATHS_OPTION)
- ENDIF(HDF5_ROOT_USER)
-ENDIF(HDF5_STATUS)
-
-# ------
-
-IF(HDF5_STATUS)
- IF(HDF5_ROOT_USER)
- SET(HDF5_INCLUDE_PATHS ${HDF5_ROOT_USER}/include)
- ELSE(HDF5_ROOT_USER)
- SET(HDF5_INCLUDE_PATHS)
- ENDIF(HDF5_ROOT_USER)
- SET(HDF5_INCLUDE_TO_FIND H5public.h)
- FIND_PATH(HDF5_INCLUDE_DIR ${HDF5_INCLUDE_TO_FIND} PATHS ${HDF5_INCLUDE_PATHS} ${HDF5_FIND_PATHS_OPTION})
- IF(HDF5_INCLUDE_DIR)
- IF(HDF5_ROOT_USER)
- SET(HDF5_INCLUDES -I${HDF5_INCLUDE_DIR})# to be removed
- IF(${HDF5_INCLUDE_DIR} STREQUAL /usr/include)
- SET(HDF5_INCLUDE_DIRS)
- ELSE(${HDF5_INCLUDE_DIR} STREQUAL /usr/include)
- SET(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR})
- ENDIF(${HDF5_INCLUDE_DIR} STREQUAL /usr/include)
- ENDIF(HDF5_ROOT_USER)
- SET(HDF5_DEFINITIONS "-DH5_USE_16_API -D_HDF5USEDLL_")
- SET(HDF5_INCLUDES -DH5_USE_16_API -D_HDF5USEDLL_ ${HDF5_INCLUDES})# to be removed
- MESSAGE(STATUS "${HDF5_INCLUDE_TO_FIND} found in ${HDF5_INCLUDE_DIR}")
- ELSE(HDF5_INCLUDE_DIR)
- SET(HDF5_STATUS 0)
- IF(HDF5_ROOT_USER)
- MESSAGE(STATUS "${HDF5_INCLUDE_TO_FIND} not found in ${HDF5_INCLUDE_PATHS}, check your HDF5 installation.")
- ELSE(HDF5_ROOT_USER)
- MESSAGE(STATUS "${HDF5_INCLUDE_TO_FIND} not found on system, try to use WITH_HDF5 option or HDF5_ROOT (or HDF5HOME) environment variable.")
- ENDIF(HDF5_ROOT_USER)
- ENDIF(HDF5_INCLUDE_DIR)
-ENDIF(HDF5_STATUS)
-
-# ----
-
-IF(HDF5_STATUS)
- IF(HDF5_ROOT_USER)
- IF(WINDOWS)
- SET(HDF5_LIB_PATHS ${HDF5_ROOT_USER}/dll ${HDF5_ROOT_USER}/lib)
- ELSE(WINDOWS)
- SET(HDF5_LIB_PATHS ${HDF5_ROOT_USER}/lib)
- ENDIF(WINDOWS)
- ELSE(HDF5_ROOT_USER)
- SET(HDF5_LIB_PATHS)
- ENDIF(HDF5_ROOT_USER)
- IF(WINDOWS)
- IF(CMAKE_BUILD_TYPE STREQUAL Release)
- FIND_LIBRARY(HDF5_LIB hdf5dll PATHS ${HDF5_LIB_PATHS} ${HDF5_FIND_PATHS_OPTION})
- ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
- FIND_LIBRARY(HDF5_LIB hdf5ddll PATHS ${HDF5_LIB_PATHS} ${HDF5_FIND_PATHS_OPTION})
- ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
- ELSE(WINDOWS)
- FIND_LIBRARY(HDF5_LIB hdf5 PATHS ${HDF5_LIB_PATHS} ${HDF5_FIND_PATHS_OPTION})
- ENDIF(WINDOWS)
- SET(HDF5_LIBS)
- IF(HDF5_LIB)
- SET(HDF5_LIBS ${HDF5_LIBS} ${HDF5_LIB})
- MESSAGE(STATUS "hdf5 lib found: ${HDF5_LIB}")
- ELSE(HDF5_LIB)
- SET(HDF5_STATUS 0)
- IF(HDF5_ROOT_USER)
- MESSAGE(STATUS "hdf5 lib not found in ${HDF5_LIB_PATHS}, check your HDF5 installation.")
- ELSE(HDF5_ROOT_USER)
- MESSAGE(STATUS "hdf5 lib not found on system, try to use WITH_HDF5 option or HDF5_ROOT (or HDF5HOME) environment variable.")
- ENDIF(HDF5_ROOT_USER)
- ENDIF(HDF5_LIB)
-ENDIF(HDF5_STATUS)
-
-IF(HDF5_STATUS)
- FILE(TO_NATIVE_PATH "${HDF5_INCLUDE_DIR}/H5public.h" HDF5_H5PUBLIC_FILE)
- EXECUTE_PROCESS(
- COMMAND ${PYTHON_EXECUTABLE} -c "import re,sys ; f=file(sys.argv[1]) ; s=f.read() ; c=re.compile('^#[\\s]*include[\\s]*\\\"(?P<nm>[A-Za-z0-9\\-]+\\.h)\\\"',re.M) ; sys.stdout.write(c.search(s).group('nm'))"
- ${HDF5_H5PUBLIC_FILE}
- OUTPUT_VARIABLE HDF5_H5PUBLIC_DEFS_FILE
- )
- FILE(TO_NATIVE_PATH "${HDF5_INCLUDE_DIR}/${HDF5_H5PUBLIC_DEFS_FILE}" HDF5_H5PUBLIC_DEFS_FILE)
- EXECUTE_PROCESS(
- COMMAND ${PYTHON_EXECUTABLE} -c "import re,sys ; f=file(sys.argv[1]) ; s=f.read() ; c=re.compile('^#[\\s]*define[\\s]+H5_HAVE_PARALLEL[\\s]+(?P<nm>[\\d]+)',re.M) ; m=c.search(s); exec('if m: sys.stdout.write(m.group(\\'nm\\'))') ; exec('if not m: sys.stdout.write(\\'0\\')')"
- ${HDF5_H5PUBLIC_DEFS_FILE}
- OUTPUT_VARIABLE HDF5_HAVE_PARALLEL
- )
- IF(HDF5_HAVE_PARALLEL)
- MESSAGE(STATUS "hdf5 is parallel")
- SET(HDF5_INCLUDES ${HDF5_INCLUDES} -I${MPI_INCLUDE_DIRS}) # to remove after "cmakeization"
- SET(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS} ${MPI_INCLUDE_DIRS})
- SET(HDF5_DEFINITIONS "${HDF5_DEFINITIONS} ${MPI_DEFINITIONS}")
- SET(HDF5_LIBS ${HDF5_LIBS} ${MPI_LIBS})
- ENDIF(HDF5_HAVE_PARALLEL)
-ENDIF(HDF5_STATUS)
-
-# ----
-
-IF(HDF5_STATUS)
- SET(HDF5_CPPFLAGS ${HDF5_INCLUDES})# to be removed
-ELSE(HDF5_STATUS)
- IF(HDF5_IS_MANDATORY)
- MESSAGE(FATAL_ERROR "hdf5 not found ... mandatory ... abort")
- ELSE(HDF5_IS_MANDATORY)
- MESSAGE(STATUS "hdf5 not found ... optional ... disabled")
- ENDIF(HDF5_IS_MANDATORY)
-ENDIF(HDF5_STATUS)
-
-# ------
-
-#SET(ZLIB_ROOT $ENV{ZLIB_ROOT})
-#STRING(LENGTH "${ZLIB_ROOT}" NB)
-#IF(${NB} GREATER 0)
-# FIND_LIBRARY(ZLIB_LIBS zlib ${ZLIB_ROOT}/lib)
-# SET(HDF5_LIBS ${HDF5_LIBS} ${ZLIB_LIBS})
-#ENDIF(${NB} GREATER 0)
-
-#SET(SZIP_ROOT $ENV{SZIP_ROOT})
-#STRING(LENGTH "${SZIP_ROOT}" NB)
-#IF(${NB} GREATER 0)
-# FIND_LIBRARY(SZIP_LIBS szlib ${SZIP_ROOT}/lib)
-# SET(HDF5_LIBS ${HDF5_LIBS} ${SZIP_LIBS})
-#ENDIF(${NB} GREATER 0)
-
-# ------
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-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)
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# ------
-
-MESSAGE(STATUS "Check for libxml2 ...")
-
-# ------
-
-IF(LIBXML2_IS_MANDATORY STREQUAL 0)
- SET(LIBXML2_IS_MANDATORY 0)
- SET(LIBXML2_IS_OPTIONAL 1)
-ENDIF(LIBXML2_IS_MANDATORY STREQUAL 0)
-IF(LIBXML2_IS_OPTIONAL STREQUAL 0)
- SET(LIBXML2_IS_MANDATORY 1)
- SET(LIBXML2_IS_OPTIONAL 0)
-ENDIF(LIBXML2_IS_OPTIONAL STREQUAL 0)
-IF(NOT LIBXML2_IS_MANDATORY AND NOT LIBXML2_IS_OPTIONAL)
- SET(LIBXML2_IS_MANDATORY 1)
- SET(LIBXML2_IS_OPTIONAL 0)
-ENDIF(NOT LIBXML2_IS_MANDATORY AND NOT LIBXML2_IS_OPTIONAL)
-
-# ------
-
-SET(LIBXML2_STATUS 1)
-IF(WITHOUT_LIBXML2 OR WITH_LIBXML2 STREQUAL 0)
- SET(LIBXML2_STATUS 0)
- MESSAGE(STATUS "libxml2 disabled from command line.")
-ENDIF(WITHOUT_LIBXML2 OR WITH_LIBXML2 STREQUAL 0)
-
-# ------
-
-IF(LIBXML2_STATUS)
- IF(WITH_LIBXML2)
- SET(LIBXML2_ROOT_USER ${WITH_LIBXML2})
- ELSE(WITH_LIBXML2)
- SET(LIBXML2_ROOT_USER $ENV{LIBXML2_ROOT})
- IF(NOT LIBXML2_ROOT_USER)
- SET(LIBXML2_ROOT_USER $ENV{LIBXML_DIR})
- ENDIF(NOT LIBXML2_ROOT_USER)
- ENDIF(WITH_LIBXML2)
-ENDIF(LIBXML2_STATUS)
-
-# -----
-
-IF(LIBXML2_STATUS)
- IF(LIBXML2_ROOT_USER)
- SET(LIBXML2_FIND_PATHS_OPTION NO_DEFAULT_PATH)
- ELSE(LIBXML2_ROOT_USER)
- SET(LIBXML2_FIND_PATHS_OPTION)
- ENDIF(LIBXML2_ROOT_USER)
-ENDIF(LIBXML2_STATUS)
-
-# -----
-
-IF(LIBXML2_STATUS)
- IF(LIBXML2_ROOT_USER)
- IF(WINDOWS)
- SET(LIBXML2_INCLUDE_PATHS ${LIBXML2_ROOT_USER}/include)
- ELSE(WINDOWS)
- SET(LIBXML2_INCLUDE_PATHS ${LIBXML2_ROOT_USER}/include/libxml2)
- ENDIF(WINDOWS)
- ELSE(LIBXML2_ROOT_USER)
- SET(LIBXML2_INCLUDE_PATHS /usr/include/libxml2)
- ENDIF(LIBXML2_ROOT_USER)
- SET(LIBXML2_INCLUDE_TO_FIND libxml/parser.h)
- FIND_PATH(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_TO_FIND} PATHS ${LIBXML2_INCLUDE_PATHS} ${LIBXML2_FIND_PATHS_OPTION})
- IF(LIBXML2_INCLUDE_DIR)
- SET(LIBXML2_INCLUDES -I${LIBXML2_INCLUDE_DIR})# to remove
- SET(LIBXML_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR})
- MESSAGE(STATUS "${LIBXML2_INCLUDE_TO_FIND} found in ${LIBXML2_INCLUDE_DIR}")
- ELSE(LIBXML2_INCLUDE_DIR)
- SET(LIBXML2_STATUS 0)
- IF(LIBXML2_ROOT_USER)
- MESSAGE(STATUS "${LIBXML2_INCLUDE_TO_FIND} not found in ${LIBXML2_INCLUDE_PATHS}, check your LIBXML2 installation.")
- ELSE(LIBXML2_ROOT_USER)
- MESSAGE(STATUS "${LIBXML2_INCLUDE_TO_FIND} not found on system, try to use WITH_LIBXML2 option or LIBXML2_ROOT environment variable.")
- ENDIF(LIBXML2_ROOT_USER)
- ENDIF(LIBXML2_INCLUDE_DIR)
-ENDIF(LIBXML2_STATUS)
-
-# ----
-
-IF(LIBXML2_STATUS)
- IF(LIBXML2_ROOT_USER)
- SET(LIBXML2_LIB_PATHS ${LIBXML2_ROOT_USER}/lib)
- ELSE(LIBXML2_ROOT_USER)
- SET(LIBXML2_LIB_PATHS)
- ENDIF(LIBXML2_ROOT_USER)
-ENDIF(LIBXML2_STATUS)
-
-IF(LIBXML2_STATUS)
- IF(WINDOWS)
- FIND_LIBRARY(LIBXML2_LIB libxml2 PATHS ${LIBXML2_LIB_PATHS} ${LIBXML2_FIND_PATHS_OPTION})
- ELSE(WINDOWS)
- 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)
- SET(LIBXML2_LIBS ${LIBXML2_LIBS} ${LIBXML2_LIB})
- MESSAGE(STATUS "libxml2 lib found: ${LIBXML2_LIB}")
- ELSE(LIBXML2_LIB)
- SET(LIBXML2_STATUS 0)
- IF(LIBXML2_ROOT_USER)
- MESSAGE(STATUS "libxml2 lib not found in ${LIBXML2_LIB_PATHS}, check your LIBXML2 installation.")
- ELSE(LIBXML2_ROOT_USER)
- MESSAGE(STATUS "libxml2 lib not found on system, try to use WITH_LIBXML2 option or LIBXML2_ROOT environment variable.")
- ENDIF(LIBXML2_ROOT_USER)
- ENDIF(LIBXML2_LIB)
-ENDIF(LIBXML2_STATUS)
-
-# ----
-
-IF(WINDOWS)
- SET(ICONV_ROOT $ENV{ICONV_ROOT})
- IF(ICONV_ROOT)
- FIND_PATH(ICONV_INCLUDE_DIR iconv.h ${ICONV_ROOT}/include)
- FIND_LIBRARY(ICONV_LIBS iconv ${ICONV_ROOT}/lib)
- SET(LIBXML2_INCLUDES ${LIBXML2_INCLUDES} -I${ICONV_INCLUDE_DIR})# to remove
- SET(LIBXML_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIRS} ${ICONV_INCLUDE_DIR})
- SET(LIBXML2_LIBS ${LIBXML2_LIBS} ${ICONV_LIBS})
- ENDIF(ICONV_ROOT)
-ENDIF(WINDOWS)
-
-# ------
-IF(LIBXML2_STATUS)
- SET(LIBXML_INCLUDES ${LIBXML2_INCLUDES})# to remove
- SET(LIBXML_CPPFLAGS ${LIBXML2_INCLUDES})
- SET(LIBXML_DEFINITIONS)
- SET(LIBXML_LIBS ${LIBXML2_LIBS})
-ELSE(LIBXML2_STATUS)
- IF(LIBXML2_IS_MANDATORY)
- MESSAGE(FATAL_ERROR "libxml2 not found ... mandatory ... abort")
- ELSE(LIBXML2_IS_MANDATORY)
- MESSAGE(STATUS "libxml2 not found ... optional ... disabled")
- ENDIF(LIBXML2_IS_MANDATORY)
-ENDIF(LIBXML2_STATUS)
-
-# ------
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# ------
-#
-MESSAGE(STATUS "Check for MPI ...")
-
-# ------
-
-SET(MPI_STATUS 1)
-IF(WITHOUT_MPI OR WITH_MPI STREQUAL 0)
- SET(MPI_STATUS 0)
- MESSAGE(STATUS "mpi disabled from command line.")
-ENDIF(WITHOUT_MPI OR WITH_MPI STREQUAL 0)
-
-IF(WITH_MPI)
- SET(MPI_ROOT_USER ${WITH_MPI})
-ELSE(WITH_MPI)
- SET(MPI_ROOT_USER $ENV{MPI_ROOT})
-ENDIF(WITH_MPI)
-
-IF(NOT MPI_ROOT_USER)
- FIND_PROGRAM(MPICC mpicc)
- IF(MPICC)
- MESSAGE(STATUS "mpicc found: ${MPICC}")
- SET(MPI_ROOT ${MPICC})
- GET_FILENAME_COMPONENT(MPI_ROOT ${MPI_ROOT} PATH)
- GET_FILENAME_COMPONENT(MPI_ROOT ${MPI_ROOT} PATH)
- IF(MPICC STREQUAL /usr/bin/mpicc)
- ELSE(MPICC STREQUAL /usr/bin/mpicc)
- SET(MPI_ROOT_USER ${MPI_ROOT})
- ENDIF(MPICC STREQUAL /usr/bin/mpicc)
- ENDIF(MPICC)
-ELSE(NOT MPI_ROOT_USER)
- SET(MPI_ROOT ${MPI_ROOT_USER})
-ENDIF(NOT MPI_ROOT_USER)
-
-# ------
-
-IF(NOT MPI_ROOT)
- MESSAGE(STATUS "MPI not found, try to use WITH_MPI option or MPI_ROOT environment variable.")
- SET(MPI_STATUS 0)
-ENDIF(NOT MPI_ROOT)
-
-# ------
-
-IF(MPI_STATUS)
- MESSAGE(STATUS "Check MPI in ${MPI_ROOT}")
-
- SET(MPI_INCLUDE_TO_FIND mpi.h)
-
- IF(MPI_ROOT_USER)
- SET(MPI_ROOT ${MPI_ROOT_USER})
- SET(MPI_INCLUDE_PATHS ${MPI_ROOT} ${MPI_ROOT}/include)
- FIND_PATH(MPI_INCLUDES ${MPI_INCLUDE_TO_FIND} PATHS ${MPI_INCLUDE_PATHS} NO_DEFAULT_PATH)
- IF(NOT MPI_INCLUDES)
- MESSAGE(STATUS "MPI include ${MPI_INCLUDE_TO_FIND} not found in ${MPI_INCLUDE_PATHS}, check your MPI installation.")
- SET(MPI_STATUS 0)
- ENDIF(NOT MPI_INCLUDES)
- ELSE(MPI_ROOT_USER)
- FIND_PATH(MPI_INCLUDES ${MPI_INCLUDE_TO_FIND})
- IF(NOT MPI_INCLUDES)
- MESSAGE(STATUS "MPI include ${MPI_INCLUDE_TO_FIND} not found on system, try to use WITH_MPI option or MPI_ROOT environment variable.")
- SET(MPI_STATUS 0)
- ENDIF(NOT MPI_INCLUDES)
- GET_FILENAME_COMPONENT(MPI_ROOT ${MPI_INCLUDES} PATH)
- ENDIF(MPI_ROOT_USER)
-
- IF(MPI_INCLUDES)
- MESSAGE(STATUS "MPI include ${MPI_INCLUDE_TO_FIND} found in ${MPI_INCLUDES}")
-
- SET(MPI_INCLUDE_DIR ${MPI_INCLUDES})
- SET(MPI_INCLUDE_DIRS ${MPI_INCLUDES})
- SET(MPI_INCLUDES -I${MPI_INCLUDES})# to remove
- ENDIF(MPI_INCLUDES)
-
- # ------
-
- IF(WINDOWS)
- FIND_LIBRARY(MPI_LIB_THREAD libboost_thread-vc90-mt-gd-1_35 ${MPI_ROOT}/lib)
- FIND_LIBRARY(MPI_LIB_DATE_TIME libboost_date_time-vc90-mt-gd-1_35 ${MPI_ROOT}/lib)
- ELSE(WINDOWS)
- SET(MPI_LIB_FOUND 0)
- FOREACH(lib mpi_cxx mpi mpich)
- FIND_LIBRARY(MPI_LIB_${lib} ${lib} ${MPI_ROOT}/lib)
- IF(MPI_LIB_${lib})
- SET(MPI_LIB_FOUND 1)
- ENDIF(MPI_LIB_${lib})
- ENDFOREACH(lib mpi_cxx mpi mpich)
- IF(MPI_LIB_FOUND)
- IF(MPI_LIB_mpi_cxx AND MPI_LIB_mpi)
- SET(MPI_LIBS ${MPI_LIB_mpi_cxx} ${MPI_LIB_mpi})
- SET(MPI_INCLUDES ${MPI_INCLUDES} -DOMPI_IGNORE_CXX_SEEK)# to remove
- SET(MPI_DEFINITIONS -DOMPI_IGNORE_CXX_SEEK)
- ELSEIF(MPI_LIB_mpi_cxx)
- SET(MPI_LIBS ${MPI_LIB_mpi_cxx})
- SET(MPI_INCLUDES ${MPI_INCLUDES} -DOMPI_IGNORE_CXX_SEEK)# to remove
- SET(MPI_DEFINITIONS -DOMPI_IGNORE_CXX_SEEK)
- ELSEIF(MPI_LIB_mpi)
- SET(MPI_LIBS ${MPI_LIB_mpi})
- SET(MPI_INCLUDES ${MPI_INCLUDES} -DOMPI_IGNORE_CXX_SEEK)# to remove
- SET(MPI_DEFINITIONS -DOMPI_IGNORE_CXX_SEEK)
- ELSEIF(MPI_LIB_mpich)
- SET(MPI_LIBS ${MPI_LIB_mpich})
- SET(MPI_INCLUDES ${MPI_INCLUDES} -DMPICH_IGNORE_CXX_SEEK)# to remove
- SET(MPI_DEFINITIONS -DMPICH_IGNORE_CXX_SEEK)
- ENDIF()
- ELSE(MPI_LIB_FOUND)
- MESSAGE(STATUS "MPI lib not found, check your MPI installation.")
- SET(MPI_STATUS 0)
- ENDIF(MPI_LIB_FOUND)
- ENDIF(WINDOWS)
- MESSAGE(STATUS "MPI libs: ${MPI_LIBS}")
-ENDIF(MPI_STATUS)
-
-# ------
-
-IF(MPI_STATUS)
- include(CheckSymbolExists)
- SET(CMAKE_REQUIRED_LIBRARIES ${MPI_LIBS})
- CHECK_SYMBOL_EXISTS(MPI_Publish_name ${MPI_INCLUDE_DIR}/mpi.h MPI2_IS_OK)
- IF(MPI2_IS_OK)
- MESSAGE(STATUS "Your mpi implemtentation is compatible with mpi2 ... adding -DHAVE_MPI2")
- SET(MPI_INCLUDES ${MPI_INCLUDES} -DHAVE_MPI2)# to remove
- SET(MPI_DEFINITIONS "${MPI_DEFINITIONS} -DHAVE_MPI2")
- ENDIF(MPI2_IS_OK)
-ENDIF(MPI_STATUS)
-
-# ------
-
-IF(MPI_STATUS)
- SET(MPI_IS_OK ON)
-ELSE(MPI_STATUS)
- IF(MPI_IS_MANDATORY)
- MESSAGE(FATAL_ERROR "MPI not found but mandatory")
- ELSE(MPI_IS_MANDATORY)
- MESSAGE(STATUS "MPI not found. Build procedure depending of mpi will be disable")
- ENDIF(MPI_IS_MANDATORY)
-ENDIF(MPI_STATUS)
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# ------
-
-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(WINDOWS)
- SET( FIND_PATH ${OMNIORB_ROOT_USER}/bin/x86_win32)
- ELSE(WINDOWS)
- SET( FIND_PATH ${OMNIORB_ROOT_USER}/bin)
- ENDIF(WINDOWS)
- IF(OMNIORB_ROOT_USER)
- FIND_PROGRAM(OMNIIDL_EXECUTABLE ${OMNIIDL_EXECUTABLE_TO_FIND} PATHS ${FIND_PATH} )
- 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)
-
-# ----
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-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
- # To avoid runtime error during checking iterators # to be removed
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_SECURE_SCL=0)
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_SECURE_SCL_THROWS=0)
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_HAS_ITERATOR_DEBUGGING=0)
- 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")
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# ------
-
-MESSAGE(STATUS "Check for pthreads ...")
-
-# ------
-
-IF(PTHREADS_IS_MANDATORY STREQUAL 0)
- SET(PTHREADS_IS_MANDATORY 0)
- SET(PTHREADS_IS_OPTIONAL 1)
-ENDIF(PTHREADS_IS_MANDATORY STREQUAL 0)
-IF(PTHREADS_IS_OPTIONAL STREQUAL 0)
- SET(PTHREADS_IS_MANDATORY 1)
- SET(PTHREADS_IS_OPTIONAL 0)
-ENDIF(PTHREADS_IS_OPTIONAL STREQUAL 0)
-IF(NOT PTHREADS_IS_MANDATORY AND NOT PTHREADS_IS_OPTIONAL)
- SET(PTHREADS_IS_MANDATORY 1)
- SET(PTHREADS_IS_OPTIONAL 0)
-ENDIF(NOT PTHREADS_IS_MANDATORY AND NOT PTHREADS_IS_OPTIONAL)
-
-# ------
-
-SET(PTHREADS_STATUS 1)
-IF(WITHOUT_PTHREADS OR WITH_PTHREADS STREQUAL 0)
- SET(PTHREADS_STATUS 0)
- MESSAGE(STATUS "pthreads disabled from command line.")
-ENDIF(WITHOUT_PTHREADS OR WITH_PTHREADS STREQUAL 0)
-
-# ------
-
-IF(PTHREADS_STATUS)
- IF(WITH_PTHREADS)
- SET(PTHREADS_ROOT_USER ${WITH_PTHREADS})
- ELSE(WITH_PTHREADS)
- SET(PTHREADS_ROOT_USER $ENV{PTHREADS_ROOT})
- ENDIF(WITH_PTHREADS)
-ENDIF(PTHREADS_STATUS)
-
-# -----
-
-IF(PTHREADS_STATUS)
- IF(PTHREADS_ROOT_USER)
- SET(PTHREADS_FIND_PATHS_OPTION NO_DEFAULT_PATH)
- ELSE(PTHREADS_ROOT_USER)
- SET(PTHREADS_FIND_PATHS_OPTION)
- ENDIF(PTHREADS_ROOT_USER)
-ENDIF(PTHREADS_STATUS)
-
-# -----
-
-IF(PTHREADS_STATUS)
- IF(PTHREADS_ROOT_USER)
- SET(PTHREADS_INCLUDE_PATHS ${PTHREADS_ROOT_USER}/include)
- ELSE(PTHREADS_ROOT_USER)
- SET(PTHREADS_INCLUDE_PATHS)
- ENDIF(PTHREADS_ROOT_USER)
- SET(PTHREADS_INCLUDE_TO_FIND pthread.h)
- FIND_PATH(PTHREADS_INCLUDE_DIR ${PTHREADS_INCLUDE_TO_FIND} PATHS ${PTHREADS_INCLUDE_PATHS} ${PTHREADS_FIND_PATHS_OPTION})
- IF(PTHREADS_INCLUDE_DIR)
- IF(PTHREADS_ROOT_USER)
- SET(PTHREAD_CFLAGS -I${PTHREADS_INCLUDE_DIR}) # to remove
- SET(PTHREAD_INCLUDE_DIRS ${PTHREADS_INCLUDE_DIR})
- ENDIF(PTHREADS_ROOT_USER)
- MESSAGE(STATUS "${PTHREADS_INCLUDE_TO_FIND} found in ${PTHREADS_INCLUDE_DIR}")
- ELSE(PTHREADS_INCLUDE_DIR)
- SET(PTHREADS_STATUS 0)
- IF(PTHREADS_ROOT_USER)
- MESSAGE(STATUS "${PTHREADS_INCLUDE_TO_FIND} not found in ${PTHREADS_INCLUDE_PATHS}, check your PTHREADS installation.")
- ELSE(PTHREADS_ROOT_USER)
- MESSAGE(STATUS "${PTHREADS_INCLUDE_TO_FIND} not found on system, try to use WITH_PTHREADS option or PTHREADS_ROOT environment variable.")
- ENDIF(PTHREADS_ROOT_USER)
- ENDIF(PTHREADS_INCLUDE_DIR)
-ENDIF(PTHREADS_STATUS)
-
-# ----
-
-IF(PTHREADS_STATUS)
- IF(PTHREADS_ROOT_USER)
- SET(PTHREADS_LIB_PATHS ${PTHREADS_ROOT_USER}/lib)
- ELSE(PTHREADS_ROOT_USER)
- SET(PTHREADS_LIB_PATHS)
- ENDIF(PTHREADS_ROOT_USER)
-ENDIF(PTHREADS_STATUS)
-
-IF(PTHREADS_STATUS)
- IF(WINDOWS)
- IF(CMAKE_BUILD_TYPE STREQUAL Release)
- FIND_LIBRARY(PTHREAD_LIB pthreadVSE2 pthreadVC2 PATHS ${PTHREADS_LIB_PATHS} ${PTHREADS_FIND_PATHS_OPTION})
- ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
- FIND_LIBRARY(PTHREAD_LIB pthreadVSE2d pthreadVC2d PATHS ${PTHREADS_LIB_PATHS} ${PTHREADS_FIND_PATHS_OPTION})
- ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
- ELSE(WINDOWS)
- FIND_LIBRARY(PTHREAD_LIB pthread PATHS ${PTHREADS_LIB_PATHS} ${PTHREADS_FIND_PATHS_OPTION})
- ENDIF(WINDOWS)
- SET(PTHREAD_LIBS)
- IF(PTHREAD_LIB)
- SET(PTHREAD_LIBS ${PTHREAD_LIBS} ${PTHREAD_LIB})
- MESSAGE(STATUS "pthread lib found: ${PTHREAD_LIB}")
- ELSE(PTHREAD_LIB)
- SET(PTHREADS_STATUS 0)
- IF(PTHREADS_ROOT_USER)
- MESSAGE(STATUS "pthread lib not found in ${PTHREADS_LIB_PATHS}, check your PTHREADS installation.")
- ELSE(PTHREADS_ROOT_USER)
- MESSAGE(STATUS "pthread lib not found on system, try to use WITH_PTHREADS option or PTHREADS_ROOT environment variable.")
- ENDIF(PTHREADS_ROOT_USER)
- ENDIF(PTHREAD_LIB)
-ENDIF(PTHREADS_STATUS)
-
-# ----
-
-IF(PTHREADS_STATUS)
-ELSE(PTHREADS_STATUS)
- IF(PTHREADS_IS_MANDATORY)
- MESSAGE(FATAL_ERROR "pthreads not found ... mandatory ... abort")
- ELSE(PTHREADS_IS_MANDATORY)
- MESSAGE(STATUS "pthreads not found ... optional ... disabled")
- ENDIF(PTHREADS_IS_MANDATORY)
-ENDIF(PTHREADS_STATUS)
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# ------
-
-MESSAGE(STATUS "Check for python ...")
-
-# ------
-
-IF(PYTHON_IS_MANDATORY STREQUAL 0)
- SET(PYTHON_IS_MANDATORY 0)
- SET(PYTHON_IS_OPTIONAL 1)
-ENDIF(PYTHON_IS_MANDATORY STREQUAL 0)
-IF(PYTHON_IS_OPTIONAL STREQUAL 0)
- SET(PYTHON_IS_MANDATORY 1)
- SET(PYTHON_IS_OPTIONAL 0)
-ENDIF(PYTHON_IS_OPTIONAL STREQUAL 0)
-IF(NOT PYTHON_IS_MANDATORY AND NOT PYTHON_IS_OPTIONAL)
- SET(PYTHON_IS_MANDATORY 1)
- SET(PYTHON_IS_OPTIONAL 0)
-ENDIF(NOT PYTHON_IS_MANDATORY AND NOT PYTHON_IS_OPTIONAL)
-
-# ------
-
-SET(PYTHON_STATUS 1)
-IF(WITHOUT_PYTHON OR WITH_PYTHON STREQUAL 0)
- SET(PYTHON_STATUS 0)
- MESSAGE(STATUS "python disabled from command line.")
-ENDIF(WITHOUT_PYTHON OR WITH_PYTHON STREQUAL 0)
-
-# ------
-
-IF(PYTHON_STATUS)
- IF(WITH_PYTHON)
- SET(PYTHON_ROOT_USER ${WITH_PYTHON})
- ENDIF(WITH_PYTHON)
- IF(NOT PYTHON_ROOT_USER)
- SET(PYTHON_ROOT_USER $ENV{PYTHON_ROOT})
- ENDIF(NOT PYTHON_ROOT_USER)
- IF(NOT PYTHON_ROOT_USER)
- SET(PYTHON_ROOT_USER $ENV{PYTHONHOME})
- ENDIF(NOT PYTHON_ROOT_USER)
-ENDIF(PYTHON_STATUS)
-
-# ------
-
-IF(PYTHON_STATUS)
- IF(PYTHON_ROOT_USER)
- SET(PYTHON_FIND_PATHS_OPTION NO_DEFAULT_PATH)
- ELSE(PYTHON_ROOT_USER)
- SET(PYTHON_FIND_PATHS_OPTION)
- ENDIF(PYTHON_ROOT_USER)
-ENDIF(PYTHON_STATUS)
-
-# ------
-
-IF(PYTHON_STATUS)
- IF(WINDOWS)
- IF(CMAKE_BUILD_TYPE STREQUAL Release)
- SET(PYTHON_EXECUTABLE_TO_FIND python)
- ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
- SET(PYTHON_EXECUTABLE_TO_FIND python_d)
- ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
- ELSE(WINDOWS)
- SET(PYTHON_EXECUTABLE_TO_FIND python)
- ENDIF(WINDOWS)
- IF(NOT PYTHON_ROOT_USER)
- SET(PYTHON_EXECUTABLE_PATHS)
- ELSE(NOT PYTHON_ROOT_USER)
- IF(WINDOWS)
- SET(PYTHON_EXECUTABLE_PATHS ${PYTHON_ROOT_USER})
- ELSE(WINDOWS)
- SET(PYTHON_EXECUTABLE_PATHS ${PYTHON_ROOT_USER}/bin)
- ENDIF(WINDOWS)
- ENDIF(NOT PYTHON_ROOT_USER)
- FIND_PROGRAM(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE_TO_FIND} PATHS ${PYTHON_EXECUTABLE_PATHS} ${PYTHON_FIND_PATHS_OPTION})
- IF(PYTHON_EXECUTABLE)
- MESSAGE(STATUS "python found: ${PYTHON_EXECUTABLE}")
- IF(PYTHON_EXECUTABLE STREQUAL /usr/bin/python)
- ELSE(PYTHON_EXECUTABLE STREQUAL /usr/bin/python)
- SET(PYTHON_ROOT_USER ${PYTHON_EXECUTABLE})
- GET_FILENAME_COMPONENT(PYTHON_ROOT_USER ${PYTHON_ROOT_USER} PATH)
- IF(NOT WINDOWS)
- GET_FILENAME_COMPONENT(PYTHON_ROOT_USER ${PYTHON_ROOT_USER} PATH)
- ENDIF(NOT WINDOWS)
- ENDIF(PYTHON_EXECUTABLE STREQUAL /usr/bin/python)
- ELSE(PYTHON_EXECUTABLE)
- IF(PYTHON_ROOT_USER)
- MESSAGE(STATUS "${PYTHON_EXECUTABLE_TO_FIND} not found in ${PYTHON_EXECUTABLE_PATHS}, check your PYTHON installation.")
- ELSE(PYTHON_ROOT_USER)
- MESSAGE(STATUS "${PYTHON_EXECUTABLE_TO_FIND} not found on system, try to use WITH_PYTHON option or PYTHON_ROOT environment variable.")
- ENDIF(PYTHON_ROOT_USER)
- SET(PYTHON_STATUS 0)
- ENDIF(PYTHON_EXECUTABLE)
-ENDIF(PYTHON_STATUS)
-
-# ------
-
-IF(PYTHON_STATUS)
- EXECUTE_PROCESS(
- COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write(sys.version[:3])"
- OUTPUT_VARIABLE PYTHON_VERSION
- )
-ENDIF(PYTHON_STATUS)
-
-# ------
-
-IF(PYTHON_STATUS)
- IF(PYTHON_ROOT_USER)
- SET(PYTHON_FIND_PATHS_OPTION NO_DEFAULT_PATH)
- ELSE(PYTHON_ROOT_USER)
- SET(PYTHON_FIND_PATHS_OPTION)
- ENDIF(PYTHON_ROOT_USER)
-ENDIF(PYTHON_STATUS)
-
-# ------
-
-IF(PYTHON_STATUS)
- IF(PYTHON_ROOT_USER)
- SET(PYTHON_INCLUDE_PATHS ${PYTHON_ROOT_USER}/include ${PYTHON_ROOT_USER}/include/python${PYTHON_VERSION})
- ELSE(PYTHON_ROOT_USER)
- SET(PYTHON_INCLUDE_PATHS /usr/include/python${PYTHON_VERSION})
- ENDIF(PYTHON_ROOT_USER)
- SET(PYTHON_INCLUDE_TO_FIND Python.h)
- FIND_PATH(PYTHON_INCLUDE_DIR ${PYTHON_INCLUDE_TO_FIND} PATHS ${PYTHON_INCLUDE_PATHS} ${PYTHON_FIND_PATHS_OPTION})
- SET(PYTHON_DEFINITIONS)
- IF(PYTHON_INCLUDE_DIR)
- SET(PYTHON_INCLUDES -I${PYTHON_INCLUDE_DIR})# to remove
- SET(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR})
- IF(WINDOWS)
- IF(CMAKE_BUILD_TYPE STREQUAL Release)
- ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
- SET(PYTHON_INCLUDES ${PYTHON_INCLUDES} -DHAVE_DEBUG_PYTHON)# to remove
- SET(PYTHON_DEFINITIONS "-DHAVE_DEBUG_PYTHON")
- ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
- ENDIF(WINDOWS)
- MESSAGE(STATUS "${PYTHON_INCLUDE_TO_FIND} found in ${PYTHON_INCLUDE_DIR}")
- ELSE(PYTHON_INCLUDE_DIR)
- SET(PYTHON_STATUS 0)
- IF(PYTHON_ROOT_USER)
- MESSAGE(STATUS "${PYTHON_INCLUDE_TO_FIND} not found in ${PYTHON_INCLUDE_PATHS}, check your PYTHON installation.")
- ELSE(PYTHON_ROOT_USER)
- MESSAGE(STATUS "${PYTHON_INCLUDE_TO_FIND} not found on system, try to use WITH_PYTHON option or PYTHON_ROOT environment variable.")
- ENDIF(PYTHON_ROOT_USER)
- ENDIF(PYTHON_INCLUDE_DIR)
-ENDIF(PYTHON_STATUS)
-
-# ----
-
-IF(PYTHON_STATUS)
- IF(PYTHON_ROOT_USER)
- IF(WINDOWS)
- SET(PYTHON_LIB_PATHS ${PYTHON_ROOT_USER}/libs)
- ELSE(WINDOWS)
- SET(PYTHON_LIB_PATHS ${PYTHON_ROOT_USER}/lib ${PYTHON_ROOT_USER}/lib/python${PYTHON_VERSION}/config)
- ENDIF(WINDOWS)
- ELSE(PYTHON_ROOT_USER)
- SET(PYTHON_LIB_PATHS)
- ENDIF(PYTHON_ROOT_USER)
- IF(WINDOWS)
- STRING(REPLACE "." "" PYTHON_VERSION_WITHOUT_DOT ${PYTHON_VERSION})
- IF(CMAKE_BUILD_TYPE STREQUAL Release)
- FIND_LIBRARY(PYTHON_LIB python${PYTHON_VERSION_WITHOUT_DOT} PATHS ${PYTHON_LIB_PATHS} ${PYTHON_FIND_PATHS_OPTION})
- ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
- FIND_LIBRARY(PYTHON_LIB python${PYTHON_VERSION_WITHOUT_DOT}_d PATHS ${PYTHON_LIB_PATHS} ${PYTHON_FIND_PATHS_OPTION})
- ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
- ELSE(WINDOWS)
- FIND_LIBRARY(PYTHON_LIB python${PYTHON_VERSION} PATHS ${PYTHON_LIB_PATHS} ${PYTHON_FIND_PATHS_OPTION})
- ENDIF(WINDOWS)
- SET(PYTHON_LIBS)
- IF(PYTHON_LIB)
- SET(PYTHON_LIBS ${PYTHON_LIBS} ${PYTHON_LIB})
- MESSAGE(STATUS "python lib found: ${PYTHON_LIB}")
- SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${PYTHON_LIB_PATHS})
- ELSE(PYTHON_LIB)
- SET(PYTHON_STATUS 0)
- IF(PYTHON_ROOT_USER)
- MESSAGE(STATUS "python lib not found in ${PYTHON_LIB_PATHS}, check your PYTHON installation.")
- ELSE(PYTHON_ROOT_USER)
- MESSAGE(STATUS "python lib not found on system, try to use WITH_PYTHON option or PYTHON_ROOT environment variable.")
- ENDIF(PYTHON_ROOT_USER)
- ENDIF(PYTHON_LIB)
-ENDIF(PYTHON_STATUS)
-
-# ----
-
-SET(NUMPY_STATUS 0)
-IF(PYTHON_STATUS)
- EXECUTE_PROCESS(
- COMMAND ${PYTHON_EXECUTABLE} -c "import numpy ; import sys ; sys.stdout.write(numpy.get_include())"
- OUTPUT_VARIABLE NUMPY_INCLUDE_DIR
- ERROR_QUIET
- )
- IF(NUMPY_INCLUDE_DIR)
- SET(NUMPY_STATUS 1)
- ENDIF(NUMPY_INCLUDE_DIR)
- IF(NUMPY_STATUS)
- SET(PYTHON_INCLUDES ${PYTHON_INCLUDES} -DWITH_NUMPY -I${NUMPY_INCLUDE_DIR})# to remove
- SET(PYTHON_INCLUDE_DIRS ${NUMPY_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS})
- SET(PYTHON_DEFINITIONS "${PYTHON_DEFINITIONS} -DWITH_NUMPY")
- MESSAGE(STATUS "numpy found : ${NUMPY_INCLUDE_DIR}")
- ELSE(NUMPY_STATUS)
- MESSAGE(STATUS "numpy not found")
- ENDIF(NUMPY_STATUS)
-ENDIF(PYTHON_STATUS)
-
-# ----
-
-IF(PYTHON_STATUS)
- SET(PYTHON_CPPFLAGS ${PYTHON_INCLUDES})# to remove
- SET(PYLOGLEVEL WARNING)
-ELSE(PYTHON_STATUS)
- IF(PYTHON_IS_MANDATORY)
- MESSAGE(FATAL_ERROR "python not found ... mandatory ... abort")
- ELSE(PYTHON_IS_MANDATORY)
- MESSAGE(STATUS "python not found ... optional ... disabled")
- ENDIF(PYTHON_IS_MANDATORY)
-ENDIF(PYTHON_STATUS)
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# ------
-
-MESSAGE(STATUS "Check for swig ...")
-
-# ------
-
-IF(SWIG_IS_MANDATORY STREQUAL 0)
- SET(SWIG_IS_MANDATORY 0)
- SET(SWIG_IS_OPTIONAL 1)
-ENDIF(SWIG_IS_MANDATORY STREQUAL 0)
-IF(SWIG_IS_OPTIONAL STREQUAL 0)
- SET(SWIG_IS_MANDATORY 1)
- SET(SWIG_IS_OPTIONAL 0)
-ENDIF(SWIG_IS_OPTIONAL STREQUAL 0)
-IF(NOT SWIG_IS_MANDATORY AND NOT SWIG_IS_OPTIONAL)
- SET(SWIG_IS_MANDATORY 1)
- SET(SWIG_IS_OPTIONAL 0)
-ENDIF(NOT SWIG_IS_MANDATORY AND NOT SWIG_IS_OPTIONAL)
-
-# ------
-
-SET(SWIG_STATUS 1)
-IF(WITHOUT_SWIG OR WITH_SWIG STREQUAL 0)
- SET(SWIG_STATUS 0)
- MESSAGE(STATUS "swig disabled from command line.")
-ENDIF(WITHOUT_SWIG OR WITH_SWIG STREQUAL 0)
-
-# ------
-
-IF(SWIG_STATUS)
- IF(WITH_SWIG)
- SET(SWIG_ROOT_USER ${WITH_SWIG})
- ENDIF(WITH_SWIG)
- IF(NOT SWIG_ROOT_USER)
- SET(SWIG_ROOT_USER $ENV{SWIG_ROOT})
- ENDIF(NOT SWIG_ROOT_USER)
- IF(NOT SWIG_ROOT_USER)
- SET(SWIG_ROOT_USER $ENV{SWIGHOME})
- ENDIF(NOT SWIG_ROOT_USER)
-ENDIF(SWIG_STATUS)
-
-# ------
-
-IF(SWIG_STATUS)
- SET(SWIG_EXECUTABLE_TO_FIND swig)
- IF(SWIG_ROOT_USER)
- FIND_PROGRAM(SWIG_EXECUTABLE ${SWIG_EXECUTABLE_TO_FIND} PATHS ${SWIG_ROOT_USER}/bin NO_DEFAULT_PATH)
- ELSE(SWIG_ROOT_USER)
- FIND_PROGRAM(SWIG_EXECUTABLE ${SWIG_EXECUTABLE_TO_FIND})
- ENDIF(SWIG_ROOT_USER)
- IF(SWIG_EXECUTABLE)
- MESSAGE(STATUS "${SWIG_EXECUTABLE_TO_FIND} found: ${SWIG_EXECUTABLE}")
- ELSE(SWIG_EXECUTABLE)
- MESSAGE(STATUS "${SWIG_EXECUTABLE_TO_FIND} not found, try to use WITH_SWIG option or SWIG_ROOT (or SWIGHOME) environment variable")
- SET(SWIG_STATUS 0)
- ENDIF(SWIG_EXECUTABLE)
-ENDIF(SWIG_STATUS)
-
-# ----
-
-IF(SWIG_STATUS)
- SET(SWIG_FLAGS -c++ -python -shadow)
-ELSE(SWIG_STATUS)
- IF(SWIG_IS_MANDATORY)
- MESSAGE(FATAL_ERROR "swig not found ... mandatory ... abort")
- ELSE(SWIG_IS_MANDATORY)
- MESSAGE(STATUS "swig not found ... optional ... disabled")
- ENDIF(SWIG_IS_MANDATORY)
-ENDIF(SWIG_STATUS)
-
-# ----
-
-IF(NUMPY_STATUS)
- SET(SWIG_FLAGS ${SWIG_FLAGS} -DWITH_NUMPY=WITH_NUMPY)
-ENDIF(NUMPY_STATUS)
-
-# ----
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-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)
+++ /dev/null
-# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-import re
-
-# ----
-# A set of regular expressions used ...
-# ----
-
-p_multiline = re.compile(r"""
-\\ # One backslash
-\s* # 0 or more space
-\n # One CR
-""", re.VERBOSE)
-
-p_dollar = re.compile(r"""
-\$\( # a $ then a (
-(?P<val> # open the group val
-[^()]* # the group contain 0 or more non ) characters
-) # close the group
-\) # a ) at the end
-""", re.VERBOSE)
-
-p_arobas = re.compile(r"""
-@ # a @
-(?P<val> # open the group val
-[^@]* # the group contain 0 or more non @ characters
-) # close the group
-@ # a @ at the end
-""", re.VERBOSE)
-
-p_if = re.compile(r"""
-^ # beginning of the string
-\s* # 0 or more space
-if # an if
-\s+ # 1 or more space
-(?P<val> # open the group val
-.+ # the group contain 1 or more non space characters
-) # close the group
-""", re.VERBOSE)
-
-p_else = re.compile(r"""
-^ # beginning of the line
-\s* # 0 or more space
-else #
-\s* # 0 or more space
-""", re.VERBOSE)
-
-p_endif = re.compile(r"""
-^ # beginning of the line
-\s* # 0 or more space
-endif # a endif
-\s* # 0 or more space
-""", re.VERBOSE)
-
-p_attribution = re.compile(r"""
-^ # beginning of the line
-(?P<spaces> # open the group spaces
-\s* # 0 or more space
-) # close the group
-(?P<key> # open the group key
-\w+ # the group contain 1 or more alphanumeric characters
-) # close the group
-\s* # 0 or more space
-(?P<method> # open the group method
-\+? # 0 or 1 +
-= # One =
-) # close the group
-(?P<value> # open the group value
-.* # 0 or more any characters
-) # close the group
-""", re.VERBOSE)
-
-# -----
-
-class CMakeFile(object):
-
- def __init__(self, the_root, root, dirs, files, f, module):
- #
- self.the_root = the_root
- self.root = root
- self.dirs = dirs
- self.files = files
- self.module = module
- #
- from os.path import join
- self.amFile = join(root, f)
- self.listsFile = join(root, "CMakeLists.txt")
- #
- self.parseFile()
- #
- return
-
- def parseFile(self):
-
- # --
- # Read the Makefile.am file
- # --
- amFile = self.amFile
- stream = open(amFile)
- content = stream.read()
- stream.close()
-
- # --
- # Replace the composed lines separated by "\\n" by an unique line
- # --
- content = p_multiline.sub(r' ', content)
-
- # --
- # Compatibility netgen plugin
- # --
- content = content.replace("../NETGEN/libNETGEN.la", "${NETGEN_LIBS}")
-
- # --
- # Compatibility VTK 6.0
- # --
- content = content.replace("VTK_LIBS", "VTK_LIBRARIES")
-
- # --
- cas_list = [
- "BinLPlugin",
- "BinPlugin",
- "BinTObjPlugin",
- "BinXCAFPlugin",
- "FWOSPlugin",
- "PTKernel",
- "StdLPlugin",
- "StdPlugin",
- "TKAdvTools",
- "TKBin",
- "TKBinL",
- "TKBinTObj",
- "TKBinXCAF",
- "TKBO",
- "TKBool",
- "TKBRep",
- "TKCAF",
- "TKCDF",
- "TKernel",
- "TKFeat",
- "TKFillet",
- "TKG2d",
- "TKG3d",
- "TKGeomAlgo",
- "TKGeomBase",
- "TKHLR",
- "TKIGES",
- "TKLCAF",
- "TKMath",
- "TKMesh",
- "TKMeshVS",
- "TKNIS",
- "TKOffset",
- "TKOpenGl",
- "TKPCAF",
- "TKPLCAF",
- "TKPrim",
- "TKPShape",
- "TKService",
- "TKShapeSchema",
- "TKShHealing",
- "TKStdLSchema",
- "TKStdSchema",
- "TKSTEP",
- "TKSTEP209",
- "TKSTEPAttr",
- "TKSTEPBase",
- "TKSTL",
- "TKTObj",
- "TKTopAlgo",
- "TKV2d",
- "TKV3d",
- "TKVRML",
- "TKXCAF",
- "TKXCAFSchema",
- "TKXDEIGES",
- "TKXDESTEP",
- "TKXMesh",
- "TKXml",
- "TKXmlL",
- "TKXmlTObj",
- "TKXmlXCAF",
- "TKXSBase",
- "XCAFPlugin",
- "XmlLPlugin",
- "XmlPlugin",
- "XmlTObjPlugin",
- "XmlXCAFPlugin",
- ]
- vtk_list = [
- "vtkCommonPythonD",
- "vtkGraphicsPythonD",
- "vtkImagingPythonD",
- "vtkPythonCore",
- "vtkIOImage",
- ]
- kernel_list = [
- "CalciumC",
- "DF",
- "Launcher",
- "LifeCycleCORBATest",
- "NamingServiceTest",
- "OpUtil",
- "Registry",
- "ResourcesManager",
- "SALOMEBasics",
- "SalomeCatalog",
- "SalomeCommunication",
- "SalomeContainer",
- "SalomeDatastream",
- "SalomeDSCContainer",
- "SalomeDSClient",
- "SalomeDSCSupervBasic",
- "SalomeDSCSuperv",
- "SalomeDSImpl",
- "SALOMEDSImplTest",
- "SalomeDS",
- "SALOMEDSTest",
- "SalomeGenericObj",
- "SalomeHDFPersist",
- "SalomeIDLKernel",
- "SalomeLauncher",
- "SalomeLifeCycleCORBA",
- "SALOMELocalTrace",
- "SALOMELocalTraceTest",
- "SalomeLoggerServer",
- "SalomeMPIContainer",
- "SalomeNotification",
- "SalomeNS",
- "SalomeResourcesManager",
- "SalomeTestComponentEngine",
- "SalomeTestMPIComponentEngine",
- "SALOMETraceCollectorTest",
- "TOOLSDS",
- "UtilsTest",
- "with_loggerTraceCollector",
- "SalomeKernelHelpers",
- ]
- gui_list = [
- "caf",
- "CAM",
- "CASCatch",
- "DDS",
- "Event",
- "GLViewer",
- "LightApp",
- "LogWindow",
- "ObjBrowser",
- "OCCViewer",
- "OpenGLUtils",
- "Plot2d",
- "PyConsole",
- "PyInterp",
- "QDS",
- "qtx",
- "QxScene",
- "SalomeApp",
- "SalomeAppTest",
- "SalomeIDLGUI",
- "SalomeObject",
- "SalomePrs",
- "SalomePyQtGUILight",
- "SalomePyQtGUI",
- "SalomePyQt",
- "SalomePy",
- "SalomeSession",
- "SalomeStyle",
- "SOCC",
- "SPlot2d",
- "std",
- "SUITApp",
- "suit",
- "SUPERVGraph",
- "SVTK",
- "ToolsGUI",
- "ViewerTools",
- "VTKViewer",
- "vtkEDFOverloads",
- "vtkTools"
- ]
- geom_list = [
- "AdvancedGUI",
- "BasicGUI",
- "BlocksGUI",
- "BooleanGUI",
- "BREPExport",
- "BREPImport",
- "BuildGUI",
- "DisplayGUI",
- "DlgRef",
- "EntityGUI",
- "GenerationGUI",
- "GEOMAlgo",
- "GEOMAlgo_NEW",
- "GEOMArchimede",
- "GEOMBase",
- "GEOMbasic",
- "GEOMClient",
- "GEOMEngine",
- "GEOMFiltersSelection",
- "GEOMimpl",
- "GEOMObject",
- "GEOMSketcher",
- "GEOM",
- "GEOM_SupervEngine",
- "GEOMToolsGUI",
- "GroupGUI",
- "IGESExport",
- "IGESImport",
- "MeasureGUI",
- "Material",
- "NMTDS",
- "NMTDS_NEW",
- "NMTTools",
- "NMTTools_NEW",
- "OCC2VTK",
- "OperationGUI",
- "PrimitiveGUI",
- "RepairGUI",
- "SalomeIDLGEOM",
- "ShHealOper",
- "STEPExport",
- "STEPImport",
- "STLExport",
- "TransformationGUI",
- "VTKExport",
- ]
- med_list = [
- "interpkernel",
- "InterpKernelTest",
- "MEDClientcmodule",
- "medcouplingclient",
- "medcouplingcorba",
- "medcouplingremapper",
- "medcoupling",
- "MEDEngine",
- "medloader",
- "MEDMEMCppTest",
- "MEDMEMImpl",
- "medmem",
- "MED",
- "medsplitter",
- "MEDSPLITTERTest",
- "med_V2_1",
- "MEDWrapperBase",
- "MEDWrapper",
- "MEDWrapper_V2_1",
- "MEDWrapper_V2_2",
- "paramedcouplingcorba",
- "paramedloader",
- "paramedmemcompo",
- "paramedmem",
- "ParaMEDMEMTest",
- "SalomeIDLMED",
- "SalomeIDLMEDTests",
- ]
- smesh_list = [
- "GeomSelectionTools",
- "MEFISTO2D",
- "MeshDriverDAT",
- "MeshDriverMED",
- "MeshDriverGMF",
- "MeshDriver",
- "MeshDriverSTL",
- "MeshDriverUNV",
- "SalomeIDLSMESH",
- "SMDS",
- "SMESHClient",
- "SMESHControls",
- "SMESHDS",
- "SMESHEngine",
- "SMESHFiltersSelection",
- "SMESHimpl",
- "SMESHObject",
- "SMESH",
- "SMESHUtils",
- "StdMeshersEngine",
- "StdMeshersGUI",
- "StdMeshers",
- ]
- full_list = cas_list + vtk_list
- full_list += kernel_list + gui_list
- full_list += geom_list + med_list + smesh_list
- # --
- # E.A. : sort by len before substitution ...
- # Why ? Thing to "-lMEDWrapper" then "-lMEDWrapper_V2_1" substition
- # And you understand ...
- # --
- full_list.sort(cmp = lambda x, y : cmp(len(y), len(x)))
- # --
- for key in full_list:
- content = content.replace("-l%s"%(key), "${%s}"%(key))
-
- pass
-
- # --
- # Split content in lines to treat each one separately
- # --
- lines = content.split('\n')
-
- # --
- # newlines contains the lines of the future CMakeLists.txt file
- # --
- newlines = []
-
- # --
- # opened_ifs is used to deals with nested conditionnals
- # --
- opened_ifs = []
-
- # --
- # the __thedict__ dictionnary contains key, val
- # of the Makefile.am file
- # --
- self.__thedict__ = {}
-
- # --
- # Initialize file ... mainly includes other cmake files
- # --
- self.initialize(newlines)
-
- # --
- # Do the job for each line
- # --
- for line in lines:
- self.treatLine(line, newlines, opened_ifs)
- pass
-
- # --
- # Finalize file ... it is in here the cmake job is done
- # --
- self.finalize(newlines)
-
- # --
- # Concatenate newlines into content
- # --
- content = '\n'.join(newlines)
-
- # --
- # Add a CR at end if necessary
- # --
- lines = content.split('\n')
- # lines = [ l.strip() for l in lines ]
- if len(lines[-1]) != 0:
- lines.append('')
- pass
- content = '\n'.join(lines)
-
- # --
- self.content = "# ---------------------------------------------------------------------\n"
- self.content += "# This file was automatically generated by am2cmake (erwan.adam@cea.fr)\n"
- self.content += "# ---------------------------------------------------------------------\n"
- self.content += content
-
- # --
- return
-
- def initialize(self, newlines):
- if self.root == self.the_root:
- # --
- newlines.append("""
- CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7 FATAL_ERROR)
- IF(COMMAND cmake_policy)
- cmake_policy(SET CMP0003 NEW)
- ENDIF(COMMAND cmake_policy)
- """)
- # --
- newlines.append("""
- ENABLE_TESTING()
- """)
- # --
- newlines.append("""
- SET(MODULE %s)
- """%(self.module.upper()))
- # --
- if self.module == "netgen":
- newlines.append("""
- INCLUDE(${CMAKE_SOURCE_DIR}/cmake/FindPLATFORM.cmake)
- INCLUDE(${CMAKE_SOURCE_DIR}/cmake/FindCAS.cmake)
- """)
- else:
- if self.module == "kernel":
- newlines.append("""
- 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/FindOMNIORB.cmake)
- INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake)
- INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindMPI.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/FindSalomeLIBBATCH.cmake)
- INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindSPHINX.cmake)
- """)
- pass
- else:
- if self.module == "med":
- newlines.append("""
- SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR})
- IF(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/FindCPPUNIT.cmake)
- INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindDOXYGEN.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)
- INCLUDE(${CMAKE_SOURCE_DIR}/adm_local_without_kernel/cmake_files/FindMPI.cmake)
- ENDIF(KERNEL_ROOT_DIR)
- """)
- else:
- newlines.append("""
- SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR})
- 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/deprecated/FindDOXYGEN.cmake)
- INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.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":
- newlines.append("""
- INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindCAS.cmake)
- INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindQT4.cmake)
- INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindOPENGL.cmake)
- INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindVTK.cmake)
- INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindQWT.cmake)
- INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindSIPPYQT.cmake)
- """)
- else:
- newlines.append("""
- SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR})
- IF(GUI_ROOT_DIR)
- 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":
- #METIS must be after PARMETIS to prevent to activate METIS if PARMETIS already exists
- newlines.append("""
- INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindPARMETIS.cmake)
- INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindMETIS.cmake)
- INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindSCOTCH.cmake)
- INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindSPLITTER.cmake)
- INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindRENUMBER.cmake)
- INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindMEDFILE.cmake)
- IF(WINDOWS)
- INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindXDR.cmake)
- ENDIF(WINDOWS)
- """)
- pass
- if self.module == "smesh":
- newlines.append("""
- SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR})
- SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR})
- INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindQWT.cmake)
- INCLUDE(${GEOM_ROOT_DIR}/adm_local/cmake_files/FindGEOM.cmake)
- INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake)
-
- INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindSalomeMED.cmake)
- INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSPHINX.cmake)
- """)
- pass
- if self.module == "geom":
- newlines.append("""
- INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSPHINX.cmake)
- """)
- pass
-
- if self.module == "netgenplugin":
- newlines.append("""
- SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR})
- SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR})
- SET(SMESH_ROOT_DIR $ENV{SMESH_ROOT_DIR})
- INCLUDE(${GEOM_ROOT_DIR}/adm_local/cmake_files/FindGEOM.cmake)
- INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake)
- INCLUDE(${SMESH_ROOT_DIR}/adm_local/cmake_files/FindSMESH.cmake)
- INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindNETGEN.cmake)
- """)
- pass
- if self.module == "blsurfplugin":
- newlines.append("""
- SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR})
- SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR})
- SET(SMESH_ROOT_DIR $ENV{SMESH_ROOT_DIR})
- INCLUDE(${GEOM_ROOT_DIR}/adm_local/cmake_files/FindGEOM.cmake)
- INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake)
- INCLUDE(${SMESH_ROOT_DIR}/adm_local/cmake_files/FindSMESH.cmake)
- INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindCADSURF.cmake)
- """)
- pass
- if self.module in ["ghs3dplugin", "hexoticplugin"]:
- newlines.append("""
- SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR})
- SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR})
- SET(SMESH_ROOT_DIR $ENV{SMESH_ROOT_DIR})
- INCLUDE(${GEOM_ROOT_DIR}/adm_local/cmake_files/FindGEOM.cmake)
- INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake)
- INCLUDE(${SMESH_ROOT_DIR}/adm_local/cmake_files/FindSMESH.cmake)
- """)
- pass
- if self.module == "ghs3dprlplugin":
- newlines.append("""
- SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR})
- SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR})
- SET(SMESH_ROOT_DIR $ENV{SMESH_ROOT_DIR})
- INCLUDE(${GEOM_ROOT_DIR}/adm_local/cmake_files/FindGEOM.cmake)
- INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMEDFILE.cmake)
- INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake)
- INCLUDE(${SMESH_ROOT_DIR}/adm_local/cmake_files/FindSMESH.cmake)
- """)
- pass
- if self.module == "visu":
- newlines.append("""
- SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR})
- INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake)
- """)
- pass
- if self.module == "yacs":
- newlines.append("""
- INCLUDE(${CMAKE_SOURCE_DIR}/adm/cmake/FindEXPAT.cmake)
- INCLUDE(${CMAKE_SOURCE_DIR}/adm/cmake/FindGRAPHVIZ.cmake)
- INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSPHINX.cmake)
-
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_SECURE_SCL=0)
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_SECURE_SCL_THROWS=0)
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_HAS_ITERATOR_DEBUGGING=0) # To avoid runtime error during checking iterators
- """)
- pass
- if self.module == "jobmanager":
- newlines.append("""
- INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSPHINX.cmake)
- """)
- pass
- if self.module == "hxx2salome":
- newlines.append("""
- SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR})
- INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMEDFILE.cmake)
- INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake)
- """)
- pass
- pass
- pass
- pass
- # --
- newlines.append("""
- SET(DOXYGEN_IS_OK 0)
- """)
- if self.module not in ['med']:
- newlines.append("""
- IF(WINDOWS)
- SET(CPPUNIT_IS_OK 0)
- MESSAGE(STATUS "cppunit is disabled.")
- ENDIF(WINDOWS)
- """)
- pass
- # --
- if self.module == "kernel":
- newlines.append("""
- SET(WITH_LOCAL 1)
- SET(WITH_BATCH 1)
- SET(CALCIUM_IDL_INT_F77 long)
- SET(CALCIUM_CORBA_INT_F77 CORBA::Long)
- SET(LONG_OR_INT int)
- """)
- elif self.module == "gui":
- newlines.append("""
- SET(GUI_ENABLE_CORBA ${CORBA_GEN})
- SET(ENABLE_VTKVIEWER ON)
- SET(ENABLE_SALOMEOBJECT ON)
- SET(ENABLE_OCCVIEWER ON)
- SET(ENABLE_GLVIEWER ON)
- SET(ENABLE_PLOT2DVIEWER ON)
- SET(ENABLE_PYCONSOLE ON)
- SET(ENABLE_SUPERVGRAPHVIEWER ON)
- SET(ENABLE_QXGRAPHVIEWER ON)
- """)
- pass
- elif self.module == "jobmanager":
- newlines.append("""
- IF(GUI_ROOT_DIR)
- SET(HAS_GUI ON)
- ENDIF(GUI_ROOT_DIR)
- """)
- pass
- elif self.module == "geom":
- newlines.append("""
- IF(GUI_ROOT_DIR)
- SET(GEOM_ENABLE_GUI ON)
- ENDIF(GUI_ROOT_DIR)
- """)
- pass
- elif self.module == "medfile":
- newlines.append("""
- SET(MED_NUM_MAJEUR 3)
- SET(MED_NUM_MINEUR 0)
- SET(MED_NUM_RELEASE 3)
- SET(LONG_OR_INT int)
- IF(NOT WINDOWS)
- SET(FLIBS -lgfortranbegin -lgfortran)
- ENDIF(NOT WINDOWS)
- """)
- pass
- elif self.module == "med":
- newlines.append("""
- IF(KERNEL_ROOT_DIR)
- SET(MED_ENABLE_KERNEL ON)
- IF(NOT WINDOWS)
- SET(MED_ENABLE_SPLITTER ON)
- ENDIF(NOT WINDOWS)
- ENDIF(KERNEL_ROOT_DIR)
- IF(GUI_ROOT_DIR)
- SET(MED_ENABLE_GUI ON)
- ENDIF(GUI_ROOT_DIR)
- """)
- pass
- elif self.module == "smesh":
- newlines.append("""
- IF(GUI_ROOT_DIR)
- SET(SMESH_ENABLE_GUI ON)
- ENDIF(GUI_ROOT_DIR)
- """)
- pass
- elif self.module == "netgen":
- newlines.append("""
- SET(OCCFLAGS ${CAS_CPPFLAGS})
- SET(OCCLIBS ${CAS_LDPATH})
- SET(OCCLIBS ${OCCLIBS} ${TKernel} ${TKGeomBase} ${TKMath} ${TKG2d} ${TKG3d} ${TKXSBase} ${TKOffset} ${TKFillet} ${TKShHealing})
- SET(OCCLIBS ${OCCLIBS} ${TKMesh} ${TKMeshVS} ${TKTopAlgo} ${TKGeomAlgo} ${TKBool} ${TKPrim} ${TKBO} ${TKIGES} ${TKBRep})
- SET(OCCLIBS ${OCCLIBS} ${TKSTEPBase} ${TKSTEP} ${TKSTL} ${TKSTEPAttr} ${TKSTEP209} ${TKXDESTEP} ${TKXDEIGES} ${TKXCAF} ${TKLCAF} ${FWOSPlugin})
- """)
- pass
- elif self.module == "netgenplugin":
- newlines.append("""
- IF(GUI_ROOT_DIR)
- SET(NETGENPLUGIN_ENABLE_GUI ON)
- ENDIF(GUI_ROOT_DIR)
- """)
- pass
- elif self.module == "blsurfplugin":
- newlines.append("""
- IF(GUI_ROOT_DIR)
- SET(BLSURFPLUGIN_ENABLE_GUI ON)
- ENDIF(GUI_ROOT_DIR)
- """)
- pass
- elif self.module == "ghs3dplugin":
- newlines.append("""
- IF(GUI_ROOT_DIR)
- SET(GHS3DPLUGIN_ENABLE_GUI ON)
- ENDIF(GUI_ROOT_DIR)
- """)
- pass
- elif self.module == "hexoticplugin":
- newlines.append("""
- IF(GUI_ROOT_DIR)
- SET(HEXOTICPLUGIN_ENABLE_GUI ON)
- ENDIF(GUI_ROOT_DIR)
- """)
- pass
- elif self.module == "ghs3dprlplugin":
- newlines.append("""
- IF(GUI_ROOT_DIR)
- SET(GHS3DPRLPLUGIN_ENABLE_GUI ON)
- ENDIF(GUI_ROOT_DIR)
- """)
- pass
- elif self.module == "yacs":
- newlines.append("""
- SET(SALOME_KERNEL ON)
- SET(HAS_GUI ON)
- SET(WITH_QT4 ON)
- """)
- pass
- # --
- newlines.append("""
- set(VERSION 8.0.0)
- set(SHORT_VERSION 8.0)
- set(XVERSION 0x080000)
- set(VERSION_DEV 0)
- """)
- pass
- # --
- newlines.append("""
- SET(VERSION_INFO 0.0.0)
- SET(SOVERSION_INFO 0)
- SET(SUBDIRS)
- SET(bin_PROGRAMS)
- SET(AM_CPPFLAGS -I${CMAKE_BINARY_DIR} )
- SET(AM_CXXFLAGS -I${CMAKE_BINARY_DIR})
- SET(LDADD)
- SET(pythondir lib/python${PYTHON_VERSION}/site-packages)
- SET(salomepythondir ${pythondir}/salome)
- SET(salomepypkgdir ${salomepythondir}/salome)
- """)
-
- if self.module == "smesh" and self.root[-len('SMESH_PY'):] == 'SMESH_PY':
- newlines.append("""
- SET(smeshpypkgdir ${salomepythondir}/salome/smesh)
- """)
- pass
- if self.module == "netgen":
- newlines.append(r'''
- SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DNO_PARALLEL_THREADS -DOCCGEOMETRY -I${CMAKE_CURRENT_SOURCE_DIR})
- ''')
- elif self.module == "kernel":
- newlines.append(r'''
- SET(AM_CPPFLAGS ${AM_CPPFLAGS} -DHAVE_SALOME_CONFIG -I${CMAKE_BINARY_DIR}/salome_adm -include SALOMEconfig.h)
- SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DHAVE_SALOME_CONFIG -I${CMAKE_BINARY_DIR}/salome_adm -include SALOMEconfig.h)
- ''')
- else:
- if self.module not in ["yacs"]:
- newlines.append(r'''
- IF(KERNEL_ROOT_DIR)
- SET(AM_CPPFLAGS ${AM_CPPFLAGS} -DHAVE_SALOME_CONFIG -I${KERNEL_ROOT_DIR}/include/salome -include SALOMEconfig.h)
- SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DHAVE_SALOME_CONFIG -I${KERNEL_ROOT_DIR}/include/salome -include SALOMEconfig.h)
- ENDIF(KERNEL_ROOT_DIR)
- ''')
- pass
- if self.module == "gui":
- newlines.append(r'''
- IF(KERNEL_ROOT_DIR)
- SET(AM_CPPFLAGS ${AM_CPPFLAGS} -DWITH_SALOMEDS_OBSERVER -DSUIT_ENABLE_PYTHON)
- SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DWITH_SALOMEDS_OBSERVER -DSUIT_ENABLE_PYTHON)
- ENDIF(KERNEL_ROOT_DIR)
- ''')
- pass
- if self.module in ["smesh", "netgenplugin", "blsurfplugin", "ghs3dplugin", "hexoticplugin"]:
- newlines.append(r'''
- SET(AM_CPPFLAGS ${AM_CPPFLAGS} -DWITH_SMESH_CANCEL_COMPUTE)
- SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DWITH_SMESH_CANCEL_COMPUTE)
- ''')
- pass
- if self.module == "ghs3dplugin":
- # TODO: Auto-detect TetGen-GHS3D version automatically
- newlines.append(r'''
- SET(AM_CPPFLAGS ${AM_CPPFLAGS} -DGHS3D_VERSION=42)
- SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DGHS3D_VERSION=42)
- ''')
- pass
- if self.module == "hxx2salome":
- key = "_SRC"
- if self.the_root[-len(key):] != key:
- msg = "Source dir must finished with %s !"%(key)
- raise Exception(msg)
- hxxmodule = self.the_root[:-len(key)]
- from os.path import basename
- hxxmodule = basename(hxxmodule)
- hxxmodule = hxxmodule.lower()
- self.hxxmodule = hxxmodule
- newlines.append(r'''
- SET(HXXCPP_ROOT_DIR $ENV{%sCPP_ROOT_DIR})
- SET(AM_CPPFLAGS ${AM_CPPFLAGS} -I${HXXCPP_ROOT_DIR}/include)
- SET(AM_CXXFLAGS ${AM_CXXFLAGS} -I${HXXCPP_ROOT_DIR}/include)
- SET(LDADD ${LDADD} -L${HXXCPP_ROOT_DIR}/lib)
- '''%(hxxmodule.upper()))
- pass
- pass
- # --
- return
-
- def treatLine(self, line, newlines, opened_ifs):
-
- # --
- # Print the comment above the line itself
- # --
- if line.find('#') >= 0:
- fields = line.split('#')
- line = fields[0]
- comment = '#'.join([''] + fields[1:])
- newlines.append(comment)
- if len(line) == 0:
- return
- pass
-
- # --
- # If the line begins with 'include ', just comment it
- # --
- if line.find("include ") == 0:
- if line.find("include $(top_srcdir)/config/automake.common") == 0:
- for l in [
- "MAINTAINERCLEANFILES = Makefile.in",
- "AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_builddir)/include",
- "AM_FFLAGS=-I$(top_srcdir)/include -I$(top_builddir)/include",
- "AM_FCFLAGS=-I$(top_srcdir)/include -I$(top_builddir)/include",
- "AM_CPPFLAGS+=@HDF5_CPPFLAGS@",
- "AM_LDFLAGS=@HDF5_LDFLAGS@",
- ]:
- self.treatLine(l, newlines, opened_ifs)
- pass
- pass
- else:
- newlines.append("# " + line)
- pass
- return
-
- # --
- # If the line begins with '-include', just comment it
- # --
- if line.find("-include") == 0:
- newlines.append("# " + line)
- return
-
- # --
- # If the line is a definition of a make rule, just comment it
- # --
- if line.count(':') == 1:
- newlines.append("# " + line)
- return
-
- # --
- # A particuliar case where there are two ":" on the same line
- # --
- if line.find('install-exec-local:') == 0:
- newlines.append("# " + line)
- return
-
- # --
- # If the line begin by a tabulation, consider it's a makefile command and comment it
- # --
- if line.find("\t") == 0:
- newlines.append("# " + line)
- return
-
- # --
- # --
- key = "-version-info"
- if line.find(key) >= 0:
- # --
- before = line.split(key)[0]
- after = line[len(before)+len(key):]
- sep = after[0]
- after = after[1:]
- version_info = after.split()[0]
- line = line.replace(key+sep+version_info, "")
- # --
- version_info = version_info.replace(':', '.')
- soversion_info = version_info.split('.')[0]
- newlines.append("SET(VERSION_INFO " + version_info + ")")
- newlines.append("SET(SOVERSION_INFO " + soversion_info + ")")
- # --
- pass
-
- # --
- # Replace the $(TOTO) by ${TOTO}
- # Replace the @TOTO@ by ${TOTO}
- # --
- # VSR 15.04.2013 - process nesting substitutions properly, e.g. $(aaa$(bbb))
- #line = p_dollar.sub(r"${\1}", line)
- m_dollar = p_dollar.search(line)
- while m_dollar:
- line = p_dollar.sub(r"${\1}", line)
- m_dollar = p_dollar.search(line)
- pass
- line = p_arobas.sub(r"${\1}", line)
-
- # --
- line = line.replace(r"${top_builddir}", r"${CMAKE_BINARY_DIR}")
- line = line.replace(r"${top_srcdir}", r"${CMAKE_SOURCE_DIR}")
- line = line.replace(r"${srcdir}", r"${CMAKE_CURRENT_SOURCE_DIR}")
- line = line.replace(r"${builddir}", r"${CMAKE_CURRENT_BINARY_DIR}")
- line = line.replace(r"${datadir}", r"${CMAKE_INSTALL_PREFIX}/share")
-
- # --
- # Check if the line is a 'if' condition
- # If yes, replace it by a cmake grammar
- # --
- match = p_if.match(line)
- if match:
- theif = match.group("val")
- if theif[0] == "!":
- theif = "NOT " + theif[1:]
- pass
- line = p_if.sub(r"IF(%s)"%(theif), line)
- opened_ifs.append(theif)
- newlines.append(line)
- return
-
- # --
- # Check if the line is a 'else' condition
- # If yes, replace it by a cmake grammar
- # --
- match = p_else.match(line)
- if match:
- line = "ELSE(%s)"%(opened_ifs[-1])
- newlines.append(line)
- return
-
- # --
- # Check if the line is a 'endif' condition
- # If yes, replace it by a cmake grammar
- # --
- match = p_endif.match(line)
- if match:
- line = "ENDIF(%s)"%(opened_ifs[-1])
- opened_ifs[-1:] = []
- newlines.append(line)
- return
-
- # --
- # Check if the line is an attribution '=' or '+='
- # --
- match = p_attribution.match(line)
- if match:
- self.treatAttribution(match, newlines)
- return
-
- # --
- newlines.append(line)
-
- # --
- return
-
- def treatAttribution(self, match, newlines):
-
- spaces = match.group("spaces")
- key = match.group("key")
- method = match.group("method")
- value = match.group("value")
- # print [spaces, key, method, value]
-
- # --
- # Open cmake SET command
- # --
- newlines.append(spaces + "SET(" + key)
-
- # --
- # If method is '+=', put the previous definition as first value
- # --
- if method == "+=":
- newlines.append("%s ${%s}"%(spaces, key))
- pass
-
- # --
- fields = value.split()
-
- for i in range(len(fields)):
- newlines.append("%s %s"%(spaces, fields[i]))
- pass
-
- # --
- if method == "+=":
- # --
- # The try: except KeyError is here if the +=
- # is an error which occurs in salome ...
- # --
- try:
- self.__thedict__[key] += fields[:]
- except KeyError:
- self.__thedict__[key] = fields[:]
- pass
- pass
- else:
- self.__thedict__[key] = fields[:]
- pass
-
- # --
- # Close cmake SET command
- # --
-
- newlines.append("%s)"%(spaces))
-
- return
-
- def finalize(self, newlines):
-
- # --
- # Convert the .in files in build dir
- # --
- upmod = ""
- if self.module == "hexoticplugin" :
- upmod = "HexoticPLUGIN"
- else :
- upmod = self.module.upper()
-
- import operator
- mod = self.module
- if mod in ['kernel', 'gui'] and self.root[-len('gui'):] == 'gui' or mod == 'med' and operator.contains(self.root, 'doxygen'):
- newlines.append(r'''
- SET(top_builddir
- ${CMAKE_BINARY_DIR}
- )
- SET(top_srcdir
- ${CMAKE_SOURCE_DIR}
- )
- SET(srcdir
- ${CMAKE_CURRENT_SOURCE_DIR}
- )
- SET(builddir
- ${CMAKE_CURRENT_BINARY_DIR}
- )
- SET(datadir
- ${CMAKE_INSTALL_PREFIX}/share
- )
- SET(docdir
- ${datadir}/doc/salome
- )
- ''')
- self.files.append("static/header.html.in")
- elif self.root[-len(mod):] == upmod and operator.contains(self.root, 'doc') or mod in ['kernel', 'gui', 'geom', 'med', 'smesh', 'visu', 'blsurfplugin'] and self.root[-len('tui'):] == 'tui' or operator.contains(self.root, 'doc') and mod in ['pyhello', 'yacs']:
- newlines.append(r'''
- SET(top_builddir
- ${CMAKE_BINARY_DIR}
- )
- SET(top_srcdir
- ${CMAKE_SOURCE_DIR}
- )
- SET(srcdir
- ${CMAKE_CURRENT_SOURCE_DIR}
- )
- SET(builddir
- ${CMAKE_CURRENT_BINARY_DIR}
- )
- SET(datadir
- ${CMAKE_INSTALL_PREFIX}/share
- )
- SET(docdir
- ${datadir}/doc/salome
- )
- ''')
- if mod in ['yacs']:
- self.files.append("sources/header.html.in")
- else:
- self.files.append("static/header.html.in")
- if mod in ['geom', 'smesh', 'visu','netgenplugin','blsurfplugin','hexoticplugin','ghs3dplugin',"ghs3dprlplugin"] and self.root[-len(mod):] == upmod:
- self.files.append("static/header_py.html.in")
-
- if self.module == "yacs":
- key = "salomegui"
- if self.root[-len(key):] == key:
- self.files.append("resources/YACSCatalog.xml.in")
- self.files.append("resources/SalomeApp.xml.in")
- pass
- pass
-
- if self.module == "jobmanager":
- key = "salomegui"
- if self.root[-len(key):] == key:
- self.files.append("resources/SalomeApp.xml.in")
- pass
- pass
- for f in self.files:
- if f[-3:] == ".in":
- if f == "sstream.in":
- continue
- if f in ["runContainer.in", "stopContainer.in"]:
- if self.module == "med":
- if self.root[-3:] == "csh":
- continue
- pass
- pass
- if f == "SALOMEconfig.ref.in":
- out = "SALOMEconfig.h"
- else:
- out = f[:-3]
- pass
- newlines.append(r'''
- SET(input ${CMAKE_CURRENT_SOURCE_DIR}/%s)
- '''%(f))
- newlines.append(r'''
- SET(output ${CMAKE_CURRENT_BINARY_DIR}/%s)
- '''%(out))
- newlines.append(r'''
- MESSAGE(STATUS "Creation of ${output}")
- CONFIGURE_FILE(${input} ${output})
- ''')
- pass
- pass
-
- # --
- # add commands for generating of user's documentation
- # --
- doc_gui_destination = "${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/%s"%(upmod)
- doc_tui_destination = "${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/%s"%(upmod)
- doc_destination = "${CMAKE_INSTALL_PREFIX}/share/doc/salome"
- head_source = "${CMAKE_CURRENT_SOURCE_DIR}/images/head.png"
- if mod == 'kernel':
- prepare_generating_doc_src = "${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/prepare_generating_doc.py"
- else:
- prepare_generating_doc_src = "$ENV{KERNEL_ROOT_DIR}/bin/salome/prepare_generating_doc.py"
- if mod in ['kernel', 'gui'] and self.root[-len('gui'):] == 'gui' or mod == 'med' and operator.contains(self.root, 'doxygen'):
- if mod == 'med':
- doc_source = "${CMAKE_CURRENT_BINARY_DIR}/doc_ref_user/html"
- input = "Doxyfile_med_user"
- else:
- doc_source = "${CMAKE_CURRENT_BINARY_DIR}/%s"%(upmod)
- input = ""
- newlines.append("""\t ADD_CUSTOM_TARGET(usr_docs ${DOXYGEN_EXECUTABLE} %s
- COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''', True); shutil.copytree(r'''%s''', r'''%s'''); shutil.copy(r'''%s''', r'''%s''')"
- VERBATIM
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- )"""%(input, doc_gui_destination, doc_source, doc_gui_destination, head_source, doc_gui_destination))
- from os import path
- if mod in ['geom', 'smesh', 'visu', 'netgenplugin','blsurfplugin','hexoticplugin','ghs3dplugin','ghs3dprlplugin','pyhello'] and self.root[-len(mod):] == upmod and operator.contains(self.root, 'doc') or mod in ['pyhello'] and operator.contains(self.root, 'doc'):
- ign = r"""'*usr_docs*', '*CMakeFiles*', '*.cmake', 'doxyfile*', '*.vcproj', 'static', 'Makefile*'"""
- if mod in ['geom']:
- if mod == 'geom':
- tmp = 'geomBuilder'
- input = "COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_tui \n\t\t"
- newlines.append(r"""
- IF(WINDOWS)
- STRING(REPLACE "/" "\\" f "%s")
- ELSE(WINDOWS)
- SET(f "%s")
- ENDIF(WINDOWS)
- ADD_CUSTOM_TARGET(usr_docs ${PYTHON_EXECUTABLE} ${f} ${CMAKE_SOURCE_DIR}/src/%s_SWIG/%s.py
- %sCOMMAND ${DOXYGEN_EXECUTABLE} doxyfile_py
- COMMAND ${DOXYGEN_EXECUTABLE} doxyfile
- COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.remove(r'''%s.py''')"
- COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}''', r'''%s''', ignore=shutil.ignore_patterns(%s)); shutil.copy(r'''%s''', r'''%s''')"
- VERBATIM
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- )"""%(prepare_generating_doc_src, prepare_generating_doc_src, upmod, tmp, input, tmp, doc_gui_destination, doc_gui_destination, ign, head_source, doc_gui_destination))
- newlines.append(r"""ADD_DEPENDENCIES(usr_docs html_docs)""")
- else:
- config_f = ""
- extra_doc_dir = ""
- if mod in ['netgenplugin','blsurfplugin','hexoticplugin','ghs3dplugin', "ghs3dprlplugin"] :
- config_f = "${DOXYGEN_EXECUTABLE} doxyfile_py"
- extra_doc_dir = "%spy_doc"%(mod)
- elif mod not in ['pyhello']:
- config_f = "${DOXYGEN_EXECUTABLE} doxyfile_idl"
- if mod == 'visu':
- extra_doc_dir = "%sgen_doc"%(mod)
- inst_head_command = ""
- if extra_doc_dir != "":
- inst_head_command = "; shutil.copy(r'''%s''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/%s/%s''')"%(head_source, upmod, extra_doc_dir)
- newlines.append("""\t ADD_CUSTOM_TARGET(usr_docs %s
- COMMAND ${DOXYGEN_EXECUTABLE} doxyfile
- COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''',True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}''',r'''%s''', ignore=shutil.ignore_patterns(%s)); shutil.copy(r'''%s''',r'''%s''')%s"
- VERBATIM
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- )"""%(config_f, doc_gui_destination, doc_gui_destination, ign, head_source, doc_gui_destination, inst_head_command))
- elif mod in ['yacs', 'jobmanager'] and operator.contains(self.root, upmod + '_SRC'+path.sep+'doc'):
- from sys import platform
- params = '';
- if platform == "win32":
- params = '-Q';
- newlines.append(r"""
- ADD_CUSTOM_TARGET(html_docs ${SPHINX_EXECUTABLE} %s -c ${CMAKE_BINARY_DIR}/doc -b html ${ALLSPHINXOPTS} html
- COMMAND ${PYTHON_EXECUTABLE} -c \"import shutil\;shutil.rmtree('''%s''', True)\;shutil.copytree('''${CMAKE_CURRENT_BINARY_DIR}/html''', '''%s''')\"
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})"""%(params, doc_gui_destination, doc_gui_destination))
- elif mod in ['kernel', 'smesh', 'geom'] and operator.contains(self.root, upmod + '_SRC'+path.sep+'doc'+path.sep+'docutils'):
- from sys import platform
- params = ""
- ext = ""
- prf = ""
- if platform == "win32":
- params = '-Q';
- ext = "bat"
- prf = "call"
- cmd = "STRING(REPLACE \"/\" \"\\\\\" SCR"
- else:
- ext = "sh"
- prf = ". "
- cmd = "SET(SCR"
- doc_gui_destination = "${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/%s/docutils"%(upmod)
- scr = self.writeEnvScript(upmod)
- newlines.append(r"""
- %s "%s")
- FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/env_s.%s "${SCR}")
- ADD_CUSTOM_TARGET(html_docs %s ${CMAKE_CURRENT_BINARY_DIR}/env_s.%s && ${SPHINX_EXECUTABLE} %s -c ${CMAKE_BINARY_DIR}/doc/docutils -b html ${ALLSPHINXOPTS} html
- COMMAND ${PYTHON_EXECUTABLE} -c \"import shutil\;shutil.rmtree('''%s''', True)\;shutil.copytree('''${CMAKE_CURRENT_BINARY_DIR}/html''', '''%s''')\"
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})"""%(cmd, scr, ext, prf, ext, params, doc_gui_destination, doc_gui_destination))
-
-
-
-
- # --
- # add commands for generating of developer's documentation
- # --
-
- upmod = self.module.upper()
- if ( mod in ['kernel', 'gui', 'med', 'smesh', 'visu', 'blsurfplugin'] and self.root[-len('tui'):] == 'tui' ) or ( mod in ['yacs'] and self.root[-len('doc'):] == 'doc' ):
- if mod == 'kernel':
- tmp = """\tADD_CUSTOM_TARGET(dev_docs ${DOXYGEN_EXECUTABLE} -u
- COMMAND ${DOXYGEN_EXECUTABLE}
- COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.remove(r'''${CMAKE_CURRENT_BINARY_DIR}/doxyfile.bak''')" """
- tmp1=""
- else:
- tmp = """\tADD_CUSTOM_TARGET(dev_docs ${DOXYGEN_EXECUTABLE}"""
- if mod == 'visu':
- tmp1= r"""\n COMMAND ${PYTHON_EXECUTABLE} -c "from shutil import copy; copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/visuscreen.png''', r'''%s''')" """%(doc_tui_destination)
- elif mod == 'smesh':
- tmp1= """\n COMMAND ${PYTHON_EXECUTABLE} -c "from shutil import copy; copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/smeshscreen.png''', r'''%s''')" """%(doc_tui_destination)
- else:
- tmp1=""
- if mod == 'yacs':
- doc_source = "${CMAKE_CURRENT_BINARY_DIR}/htmldev"
- else:
- doc_source = "${CMAKE_CURRENT_BINARY_DIR}/%s"%(upmod)
- inst_head_command=""
- inst_head_command = "; shutil.copy(r'''%s''', r'''%s''')"%(head_source, doc_tui_destination)
- newlines.append(tmp + """
- COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''', True); shutil.copytree(r'''%s''', r'''%s''')%s" """%(doc_tui_destination, doc_source, doc_tui_destination, inst_head_command) + tmp1 + """
- VERBATIM
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- )""")
- if mod == 'geom' and self.root[-len('tui'):] == 'tui':
- tmp = 'geomBuilder'
- doc_source = "${CMAKE_CURRENT_BINARY_DIR}/%s"%(upmod)
- newlines.append(r"""
- IF(WINDOWS)
- STRING(REPLACE "/" "\\" f "%s")
- ELSE(WINDOWS)
- SET(f "%s")
- ENDIF(WINDOWS)
- ADD_CUSTOM_TARGET(dev_docs ${PYTHON_EXECUTABLE} ${f} ${CMAKE_SOURCE_DIR}/src/%s_SWIG/%s.py
- COMMAND ${DOXYGEN_EXECUTABLE} doxyfile
- COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.remove(r'''${CMAKE_CURRENT_BINARY_DIR}/%s.py''')"
- COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''', True); shutil.copytree(r'''%s''', r'''%s'''); shutil.copy(r'''%s''', r'''%s'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/geomscreen.png''', r'''%s''')"
- VERBATIM
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- )"""%(prepare_generating_doc_src, prepare_generating_doc_src, upmod, tmp, tmp, doc_tui_destination, doc_source, doc_tui_destination, head_source, doc_tui_destination, doc_tui_destination))
-
- # --
- # convert the SUBDIRS in cmake grammar
- # --
- if 1: # self.__thedict__.has_key("SUBDIRS"):
- newlines.append(r'''
- FOREACH(dir ${SUBDIRS})
- IF(NOT dir STREQUAL .)
- ADD_SUBDIRECTORY(${dir})
- ENDIF(NOT dir STREQUAL .)
- ENDFOREACH(dir ${SUBDIRS})
- ''')
- pass
-
- # --
- # --
- for key in ["lib_LTLIBRARIES", "noinst_LTLIBRARIES", "salomepyexec_LTLIBRARIES", "libparaview_LTLIBRARIES"] :
- if self.__thedict__.has_key(key):
- self.addLibTarget(key, newlines)
- pass
- pass
-
- # --
- # --
- for key in ["bin_PROGRAMS", "check_PROGRAMS"]:
- if self.__thedict__.has_key(key):
- self.addBinTarget(key, newlines)
- pass
- pass
-
- # --
- # --
- if self.__thedict__.has_key("BASEIDL_FILES"):
- if not self.__thedict__.has_key("IDL_FILES"):
- self.__thedict__["IDL_FILES"] = self.__thedict__["BASEIDL_FILES"]
- newlines.append('''
- SET(IDL_FILES ${BASEIDL_FILES})
- ''')
- pass
- pass
-
- # --
- # --
-
- key = "IDL_FILES"
- if self.__thedict__.has_key(key):
- if self.module == "kernel":
- newlines.append('''
- SET(IDL_FILES ${IDL_FILES} Calcium_Ports.idl)
- ''')
- pass
- newlines.append('''
- FOREACH(input ${IDL_FILES})
- STRING(REGEX REPLACE ".idl" "" base ${input})
- SET(src ${CMAKE_CURRENT_BINARY_DIR}/${base}SK.cc)
- SET(outputs ${src})
- SET(dynsrc ${CMAKE_CURRENT_BINARY_DIR}/${base}DynSK.cc)
- SET(outputs ${outputs} ${dynsrc})
- SET(inc ${CMAKE_CURRENT_BINARY_DIR}/${base}.hh)
- SET(outputs ${outputs} ${inc})
- IF(input STREQUAL Calcium_Ports.idl)
- SET(input ${CMAKE_CURRENT_BINARY_DIR}/${input})
- ELSE(input STREQUAL Calcium_Ports.idl)
- SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input})
- ENDIF(input STREQUAL Calcium_Ports.idl)
- SET(flags ${IDLCXXFLAGS} ${OMNIORB_IDLCXXFLAGS})
- STRING(REGEX MATCH "-bcxx" ISBCXX ${flags})
- IF(NOT ISBCXX)
- SET(flags -bcxx ${flags})
- ENDIF(NOT ISBCXX)
- ADD_CUSTOM_COMMAND(
- OUTPUT ${outputs}
- COMMAND ${OMNIORB_IDL} ${flags} ${input}
- MAIN_DEPENDENCY ${input}
- )
- ''')
- newlines.append('''
- install(FILES ${input} DESTINATION idl/salome)
- ''')
- if self.module not in ["pyhello"]:
- newlines.append('''
- SET(IDL_HEADER ${CMAKE_CURRENT_BINARY_DIR}/${base}.hh)
- install(FILES ${IDL_HEADER} DESTINATION include/salome)
- ''')
- pass
- newlines.append('''
- INSTALL(CODE "SET(IDL_FILE ${input})")
- INSTALL(CODE "SET(DIR ${salomepythondir})")
- IF(WINDOWS)
- INSTALL(CODE "SET(DIR bin/salome)")
- ENDIF(WINDOWS)
- INSTALL(CODE "SET(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})")
- INSTALL(CODE "SET(OMNIORB_IDL_PYTHON ${OMNIORB_IDL_PYTHON})")
- # --
- SET(flags)
- FOREACH(f ${IDLPYFLAGS})
- SET(flags "${flags} ${f}")
- ENDFOREACH(f ${IDLPYFLAGS})
- 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 "SET(IDLPYFLAGS ${IDLPYFLAGS})")
- # --
- ''')
- if self.module == "kernel":
- newlines.append('''
- INSTALL(SCRIPT ${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/install_python_from_idl.cmake)
- ''')
- else:
- newlines.append('''
- STRING(REPLACE "\\\\" "/" KERNEL_ROOT_DIR ${KERNEL_ROOT_DIR})
- INSTALL(SCRIPT ${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/install_python_from_idl.cmake)
- ''')
- pass
- newlines.append('''
- ENDFOREACH(input ${IDL_FILES})
- ''')
- pass
-
- # --
- # --
- for key in ["SWIG_SRC", "SWIGSOURCES", "SWIG_DEF"]:
- if self.__thedict__.has_key(key):
- newlines.append('''
- SET(SWIG_SOURCES ${%s})
- '''%(key))
- self.__thedict__["SWIG_SOURCES"] = self.__thedict__[key]
- pass
- pass
-
- # --
- # --
- if self.__thedict__.has_key("SWIG_SOURCES"):
- newlines.append('''
- IF(SWIG_SOURCES MATCHES ";")
- STRING(REGEX REPLACE ";.*" "" SWIG_SOURCES_FIRST "${SWIG_SOURCES}")
- ELSE(SWIG_SOURCES MATCHES ";")
- SET(SWIG_SOURCES_FIRST "${SWIG_SOURCES}")
- ENDIF(SWIG_SOURCES MATCHES ";")
- SET(flags)
- FOREACH(f ${SWIG_FLAGS} ${MY_SWIG_FLAGS})
- SET(test ON)
- IF(flags)
- LIST(FIND flags ${f} index)
- IF(NOT index EQUAL -1)
- SET(test OFF)
- ENDIF(NOT index EQUAL -1)
- ENDIF(flags)
- IF(test)
- SET(flags ${flags} ${f})
- ENDIF(test)
- ENDFOREACH(f ${SWIG_FLAGS} ${MY_SWIG_FLAGS})
- ADD_CUSTOM_COMMAND(
- OUTPUT ${build_srcs}
- COMMAND ${SWIG_EXECUTABLE} ${flags} -o ${build_srcs} ${CMAKE_CURRENT_SOURCE_DIR}/${SWIG_SOURCES_FIRST}
- MAIN_DEPENDENCY ${SWIG_SOURCES}
- )
- ''')
- pass
-
- # --
- # --
- if self.__thedict__.has_key("BUILT_SOURCES"):
- newlines.append('''
- FOREACH(f ${BUILT_SOURCES})
- IF(f MATCHES "WRAP.cxx$")
- # STRING(REGEX REPLACE "WRAP.cxx" "WRAP.h" inc ${f})
- STRING(REGEX REPLACE "WRAP.cxx" ".i" input ${f})
- ADD_CUSTOM_COMMAND(
- OUTPUT ${f} # ${inc}
- COMMAND ${SWIG_EXECUTABLE} ${SWIG_FLAGS} ${SWIG_PYTHON_INCLUDES} ${MYSWIG_FLAGS} -o ${f} ${CMAKE_CURRENT_SOURCE_DIR}/${input}
- MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/${input}
- )
- ENDIF(f MATCHES "WRAP.cxx$")
- ENDFOREACH(f ${BUILT_SOURCES})
- ''')
- pass
-
- # --
- # --
- key = "MOC_FILES"
- if self.__thedict__.has_key(key):
- newlines.append('''
- FOREACH(output ${MOC_FILES})
- ''')
- if self.module in ["jobmanager", "yacs"]:
- newlines.append('''
- STRING(REGEX REPLACE _moc.cxx .hxx input ${output})
- ''')
- else:
- newlines.append('''
- STRING(REGEX REPLACE _moc.cxx .h input ${output})
- ''')
- pass
- newlines.append('''
- SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input})
- SET(output ${CMAKE_CURRENT_BINARY_DIR}/${output})
- ADD_CUSTOM_COMMAND(
- OUTPUT ${output}
- COMMAND ${QT_MOC_EXECUTABLE} ${MOC_FLAGS} ${input} -o ${output}
- MAIN_DEPENDENCY ${input}
- )
- ENDFOREACH(output ${MOC_FILES})
- ''')
- pass
-
- # --
- # --
- key = "MOC_FILES_HXX"
- if self.__thedict__.has_key(key):
- newlines.append('''
- FOREACH(output ${MOC_FILES_HXX})
- ''')
- newlines.append('''
- STRING(REGEX REPLACE _moc.cxx .hxx input ${output})
- ''')
- newlines.append('''
- SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input})
- SET(output ${CMAKE_CURRENT_BINARY_DIR}/${output})
- ADD_CUSTOM_COMMAND(
- OUTPUT ${output}
- COMMAND ${QT_MOC_EXECUTABLE} ${MOC_FLAGS} ${input} -o ${output}
- MAIN_DEPENDENCY ${input}
- )
- ENDFOREACH(output ${MOC_FILES_HXX})
- ''')
- pass
-
- # --
- # --
- key = "UIC_FILES"
- if self.__thedict__.has_key(key):
- newlines.append('''
- FOREACH(output ${UIC_FILES})
- STRING(REPLACE "ui_" "" input ${output})
- STRING(REPLACE ".h" ".ui" input ${input})
- SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input})
- SET(output ${CMAKE_CURRENT_BINARY_DIR}/${output})
- ADD_CUSTOM_COMMAND(
- OUTPUT ${output}
- COMMAND ${QT_UIC_EXECUTABLE} -o ${output} ${input}
- MAIN_DEPENDENCY ${input}
- )
- ENDFOREACH(output ${UIC_FILES})
- ''')
- pass
-
- # --
- # --
- key = "PYUIC_FILES"
- if self.__thedict__.has_key(key):
- newlines.append('''
- FOREACH(output ${PYUIC_FILES})
- STRING(REPLACE "_ui.py" ".ui" input ${output})
- SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input})
- SET(output ${CMAKE_CURRENT_BINARY_DIR}/${output})
- ADD_CUSTOM_COMMAND(
- OUTPUT ${output}
- COMMAND ${PYUIC_EXECUTABLE} -o ${output} ${input}
- MAIN_DEPENDENCY ${input}
- )
- ENDFOREACH(output ${PYUIC_FILES})
- ADD_CUSTOM_TARGET(BUILD_PY_UI_FILES ALL DEPENDS ${PYUIC_FILES})
- ''')
- pass
-
- # --
- # --
- key = "QRC_FILES"
- if self.__thedict__.has_key(key):
- newlines.append('''
- FOREACH(output ${QRC_FILES})
- STRING(REGEX REPLACE "qrc_" "" input ${output})
- STRING(REGEX REPLACE ".cxx" ".qrc" input ${input})
- STRING(REGEX REPLACE ".qrc" "" name ${input})
- SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input})
- SET(output ${CMAKE_CURRENT_BINARY_DIR}/${output})
- ADD_CUSTOM_COMMAND(
- OUTPUT ${output}
- COMMAND ${QT_RCC_EXECUTABLE} ${input} -o ${output} -name ${name}
- MAIN_DEPENDENCY ${input}
- )
- ENDFOREACH(output ${QRC_FILES})
- ''')
- pass
-
- # --
- # --
- key = "SIP_FILES"
- if self.__thedict__.has_key(key):
- newlines.append('''
- FOREACH(input ${SIP_FILES})
- SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input})
- SET(output)
- FOREACH(out ${SIP_SRC})
- SET(output ${output} ${CMAKE_CURRENT_BINARY_DIR}/${out})
- ENDFOREACH(out ${SIP_SRC})
- ADD_CUSTOM_COMMAND(
- OUTPUT ${output}
- COMMAND ${SIP_EXECUTABLE} ${PYQT_SIPFLAGS} ${input}
- MAIN_DEPENDENCY ${input}
- )
- ENDFOREACH(input ${SIP_FILES})
- ''')
- pass
-
- # --
- # For GUI/tools/dlgfactory
- # --
- key = "UIC_FILES_QDIALOG"
- if self.__thedict__.has_key(key):
- newlines.append('''
- FOREACH(output ${UIC_FILES_QDIALOG} ${UIC_FILES_GDIALOG})
- STRING(REPLACE "ui_" "" input ${output})
- STRING(REPLACE ".hxx" ".ui" input ${input})
- SET(input_path ${CMAKE_CURRENT_SOURCE_DIR}/${input})
- IF (NOT EXISTS ${input_path})
- SET(input_path ${CMAKE_CURRENT_BINARY_DIR}/${input})
- ENDIF (NOT EXISTS ${input_path})
- ADD_CUSTOM_COMMAND(
- OUTPUT ${output}
- COMMAND ${QT_UIC_EXECUTABLE} -o ${output} ${input_path}
- MAIN_DEPENDENCY ${input}
- )
- ENDFOREACH(output ${UIC_FILES})
-
- FOREACH(output ${MOC_FILES_QDIALOG} ${MOC_FILES_GDIALOG})
- STRING(REGEX REPLACE _moc.cxx .hxx input ${output})
- SET(input_path ${CMAKE_CURRENT_SOURCE_DIR}/${input})
- IF (NOT EXISTS ${input_path})
- SET(input_path ${CMAKE_CURRENT_BINARY_DIR}/${input})
- ENDIF (NOT EXISTS ${input_path})
- ADD_CUSTOM_COMMAND(
- OUTPUT ${output}
- COMMAND ${QT_MOC_EXECUTABLE} ${MOC_FLAGS} ${input_path} -o ${output}
- MAIN_DEPENDENCY ${input}
- )
- ENDFOREACH(output ${MOC_FILES})
-
- ADD_CUSTOM_COMMAND(
- OUTPUT QDialogTest.ui QDialogTest.hxx QDialogTest.cxx
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/dlgfactory.py -n QDialogTest -t qdialog
- DEPENDS __QDIALOG__.ui __QDIALOG__.hxx __QDIALOG__.cxx dlgfactory.py
- )
-
- ADD_CUSTOM_COMMAND(
- OUTPUT GDialogTest.ui GDialogTest.hxx GDialogTest.cxx
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/dlgfactory.py -n GDialogTest -t gdialog
- DEPENDS __GDIALOG__.ui __GDIALOG__.hxx __GDIALOG__.cxx dlgfactory.py
- )
- ''')
- pass
-
- # --
- # For make check
- # --
- for key in ["TESTS"]:
- if self.__thedict__.has_key(key):
- newlines.append('''
- SET(UNIT_TEST_PROG ${%s})
- '''%(key))
- self.__thedict__["UNIT_TEST_PROG"] = self.__thedict__[key]
- pass
- pass
- key = "UNIT_TEST_PROG"
- if self.__thedict__.has_key(key):
- newlines.append('''
- FOREACH(input ${UNIT_TEST_PROG})
- GET_FILENAME_COMPONENT(ext ${input} EXT)
- IF(ext STREQUAL .py)
- SET(test ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${input})
- ELSE(ext STREQUAL .py)
- IF(WINDOWS)
- SET(test ${CMAKE_CURRENT_BINARY_DIR}/${input}_exe.exe)
- ELSE()
- SET(test ${CMAKE_CURRENT_BINARY_DIR}/${input}_exe)
- ENDIF()
- ENDIF(ext STREQUAL .py)
- ADD_TEST(${input} ${test})
- SET(fail_regex "KO")
- SET_PROPERTY(TEST ${input} PROPERTY FAIL_REGULAR_EXPRESSION "${fail_regex}")
- # IF(NOT WINDOWS)
- # ADD_TEST(${input}_valgrind valgrind ${test})
- # SET_PROPERTY(TEST ${input}_valgrind PROPERTY FAIL_REGULAR_EXPRESSION "${fail_regex}")
- # SET_PROPERTY(TEST ${input}_valgrind PROPERTY PASS_REGULAR_EXPRESSION "no leaks are possible")
- # ENDIF()
- ENDFOREACH(input ${UNIT_TEST_PROG})
- ''')
- pass
-
- # --
- # Treat the install targets
- # --
- resdir = self.module
- if resdir == "hxx2salome":
- resdir = self.hxxmodule
- pass
- d = {
- "salomeadmux_DATA" : "salome_adm/unix",
- "dist_salomeadmux_DATA" : "salome_adm/unix",
- "dist_salome_cmake_DATA" : "salome_adm/cmake_files",
- "dist_salomem4_DATA" : "salome_adm/unix/config_files",
- "dist_salome4depr_DATA" : "salome_adm/unix/config_files/DEPRECATED",
- "dist_admlocalm4_DATA" : "adm_local/unix/config_files",
- "dist_admlocal_cmake_DATA" : "adm_local/cmake_files",
- "salomeinclude_DATA" : "include/salome",
- "salomeinclude_HEADERS" : "include/salome",
- "nodist_salomeinclude_HEADERS" : "include/salome",
- "dist_salomeres_DATA" : "share/salome/resources/%s"%(resdir),
- "nodist_salomeres_DATA" : "share/salome/resources/%s"%(resdir),
- "nodist_salomeres_SCRIPTS" : "share/salome/resources/%s"%(resdir),
- "dist_salomescript_SCRIPTS" : "bin/salome",
- "dist_salomescript_DATA" : "bin/salome",
- "dist_salomescript_PYTHON" : "bin/salome",
- "dist_appliskel_SCRIPTS" : "bin/salome/appliskel",
- "dist_appliskel_PYTHON" : "bin/salome/appliskel",
- "nodist_salomescript_DATA" : "bin/salome",
- "salomepython_PYTHON" : "${salomepythondir}",
- "nodist_salomepython_PYTHON" : "${salomepythondir}",
- "dist_salomepython_DATA" : "${salomepythondir}",
- "sharedpkgpython_PYTHON" : "${salomepythondir}/shared_modules",
- "salomepypkg_PYTHON" : "${salomepypkgdir}",
- "mypkgpython_PYTHON" : "${mypkgpythondir}",
- "stdpkgpython_PYTHON" : "${stdpkgpythondir}",
- "nodist_mypkgpython_PYTHON" : "${mypkgpythondir}",
- }
- if self.module == "jobmanager":
- d["bin_SCRIPTS"] = "bin"
- pass
- if self.module == "medfile":
- d = {
- "include_HEADERS" : "include",
- "nodist_include_HEADERS" : "include",
- "bin_SCRIPTS" : "bin",
- "doc_DATA" : "${docdir}",
- }
- pass
- if self.module == "netgen":
- d = {
- "include_HEADERS" : "include",
- "noinst_HEADERS" : "share/netgen/include",
- "dist_pkgdata_DATA" : "share/netgen",
- "dist_doc_DATA" : "share/doc/netgen",
- }
- pass
- for key, value in d.items():
- if self.__thedict__.has_key(key):
- self.addInstallTarget(key, value, newlines)
- pass
- pass
-
- # --
- return
-
- def setLibAdd(self, key, newlines):
- # --
- newlines.append(r'''
- SET(libadd)
- ''')
- # --
- newlines.append(r'''
- IF(WINDOWS)
- SET(targets)
- SET(targets ${targets} MEFISTO2D)
- FOREACH(target ${targets})
- IF(name STREQUAL ${target})
- SET(dir $ENV{F2CHOME})
- STRING(REPLACE "\\\\" "/" dir ${dir})
- SET(libadd ${libadd} ${dir}/LIBF77.lib)
- SET(libadd ${libadd} ${dir}/LIBI77.lib)
- ENDIF(name STREQUAL ${target})
- ENDFOREACH(target ${targets})
- ELSE(WINDOWS)
- SET(targets)
- SET(targets ${targets} MEFISTO2D)
- FOREACH(target ${targets})
- IF(name STREQUAL ${target})
- SET(libadd ${libadd} -lf2c)
- ENDIF(name STREQUAL ${target})
- ENDFOREACH(target ${targets})
- ENDIF(WINDOWS)
- ''')
- # --
- newlines.append(r'''
- STRING(REPLACE "-module" "" ${amname}_LDFLAGS "${${amname}_LDFLAGS}")
- SET(libs ${PLATFORM_LIBADD} ${PLATFORM_LDFLAGS} ${LDADD} ${${amname}_LIBADD} ${${amname}_LDADD} ${${amname}_LDFLAGS})
- FOREACH(lib SALOMEBasics SalomeBatch)
- IF(name STREQUAL lib)
- SET(libs ${libs} ${PTHREAD_LIBS})
- ENDIF(name STREQUAL lib)
- ENDFOREACH(lib SALOMEBasics SalomeBatch)
- ''')
- # --
- newlines.append(r'''
- FOREACH(lib ${libs})
- GET_FILENAME_COMPONENT(ext ${lib} EXT)
- IF(ext STREQUAL .la)
- GET_FILENAME_COMPONENT(lib ${lib} NAME_WE)
- STRING(REGEX REPLACE "^lib" "" lib ${lib})
- ENDIF(ext STREQUAL .la)
- SET(vars)
- SET(vars ${vars} -no-undefined)
- SET(vars ${vars} -lvtkWidgets)
- IF(WINDOWS)
- SET(vars ${vars} -module)
- SET(vars ${vars} -Wl,-E)
- SET(vars ${vars} -Xlinker)
- SET(vars ${vars} -export-dynamic)
- SET(vars ${vars} -lm)
- SET(vars ${vars} -lboost_thread)
- SET(vars ${vars} -lboost_signals)
- SET(vars ${vars} -pthread -lpthread -ldl)
- ENDIF(WINDOWS)
- FOREACH(v ${vars})
- IF(lib STREQUAL v)
- SET(lib)
- ENDIF(lib STREQUAL v)
- ENDFOREACH(v ${vars})
- SET(test OFF)
- IF(lib)
- STRING(REGEX MATCH "^-lQt" test ${lib})
- ENDIF(lib)
- IF(NOT test)
- SET(libadd ${libadd} ${lib})
- ENDIF(NOT test)
- ENDFOREACH(lib ${libs})
- TARGET_LINK_LIBRARIES(${name} ${libadd})
- ''')
- # --
- newlines.append(r'''
- IF(WINDOWS)
- SET(targets)
- SET(targets ${targets} MEFISTO2D)
- FOREACH(target ${targets})
- IF(name STREQUAL ${target})
- IF(CMAKE_BUILD_TYPE STREQUAL Debug)
- SET_TARGET_PROPERTIES(${name} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:MSVCRT")
- ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug)
- ENDIF(name STREQUAL ${target})
- ENDFOREACH(target ${targets})
- ENDIF(WINDOWS)
- ''')
- # --
- return
-
- def setCompilationFlags(self, key, newlines):
- newlines.append(r'''
- SET(var)
- IF(WINDOWS)
- SET(targets)
- SET(targets ${targets} SalomeIDLKernel)
- SET(targets ${targets} SalomeDS)
- SET(targets ${targets} SALOMEDSTest)
- SET(targets ${targets} SALOMEDS_Client_exe)
- SET(targets ${targets} SalomeIDLGEOM)
- SET(targets ${targets} GEOMEngine)
- SET(targets ${targets} MEDEngine)
- SET(targets ${targets} SMESHEngine)
- SET(targets ${targets} SMESH)
- SET(targets ${targets} SalomeIDLSPADDER)
- SET(targets ${targets} MeshJobManagerEngine)
- SET(targets ${targets} StdMeshersEngine)
- SET(targets ${targets} VISUEngineImpl)
- FOREACH(target ${targets})
- IF(name STREQUAL ${target})
- SET(var ${var} -DNOGDI)
- ENDIF(name STREQUAL ${target})
- ENDFOREACH(target ${targets})
- ENDIF(WINDOWS)
- ''')
- # --
- if self.module in ["medfile", "yacs"]:
- newlines.append(r'''
- IF(WINDOWS)
- SET(var ${var} -DNOGDI)
- ENDIF(WINDOWS)
- ''')
- pass
- # --
- newlines.append(r'''
- IF(WINDOWS)
- SET(targets)
- SET(targets ${targets} MEFISTO2D)
- FOREACH(target ${targets})
- IF(name STREQUAL ${target})
- SET(dir $ENV{F2CHOME})
- STRING(REPLACE "\\\\" "/" dir ${dir})
- SET(var ${var} -I${dir})
- SET(var ${var} -DF2C_BUILD)
- ENDIF(name STREQUAL ${target})
- ENDFOREACH(target ${targets})
- ENDIF(WINDOWS)
- ''')
- # --
- if self.module in ["geom", "med", "hexoticplugin", "blsurfplugin"]:
- newlines.append(r'''
- SET(var ${var} -I${CMAKE_CURRENT_SOURCE_DIR})
- SET(var ${var} -I${CMAKE_CURRENT_BINARY_DIR})
- ''')
- pass
- newlines.append(r'''
- SET(var ${var} ${AM_CPPFLAGS})
- SET(var ${var} ${AM_CXXFLAGS})
- ''')
- # --
- newlines.append(r'''
- IF(type STREQUAL STATIC)
- SET(var ${var} -fPIC)
- ENDIF(type STREQUAL STATIC)
- ''')
- # --
- if self.module == "yacs":
- newlines.append(r'''
- SET(var ${var} -DYACS_PTHREAD)
- SET(var ${var} -DCMAKE_BUILD)
- SET(var ${var} -DSALOME_KERNEL)
- SET(var ${var} -DDSC_PORTS)
- SET(var ${var} -DOMNIORB)
- ''')
- pass
- newlines.append(r'''
- SET(var ${var} ${PLATFORM_CPPFLAGS})
- SET(var ${var} ${PTHREAD_CFLAGS})
- SET(var ${var} ${${amname}_CPPFLAGS})
- SET(var ${var} ${${amname}_CXXFLAGS})
- SET(var ${var} ${${amname}_CFLAGS})
- SET(vars)
- IF(WINDOWS)
- SET(vars ${vars} -include SALOMEconfig.h)
- SET(vars ${vars} -ftemplate-depth-32)
- SET(vars ${vars} -fPIC)
- SET(vars ${vars} -g)
- IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") # if platform is Windows 64 bit
- IF(name STREQUAL _pilot)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") # to avoid error C1128
- ENDIF(name STREQUAL _pilot)
- ENDIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
- ENDIF(WINDOWS)
- SET(flags)
- FOREACH(f ${var})
- FOREACH(v ${vars})
- IF(f STREQUAL v)
- SET(f)
- ENDIF(f STREQUAL v)
- ENDFOREACH(v ${vars})
- IF(f)
- string(REGEX MATCH "^-I" test_include ${f})
- if(test_include)
- string(REGEX REPLACE "^-I" "" include_dir ${f})
- if(include_dir)
- if(include_dir STREQUAL /usr/include)
- else(include_dir STREQUAL /usr/include)
- string(REGEX MATCH "^\\." test_dot ${include_dir})
- if(test_dot)
- set(include_dir ${CMAKE_CURRENT_BINARY_DIR}/${include_dir})
- endif(test_dot)
- include_directories(${include_dir})
- endif(include_dir STREQUAL /usr/include)
- endif(include_dir)
- else(test_include)
- SET(flags "${flags} ${f}")
- endif(test_include)
- ENDIF(f)
- ENDFOREACH(f ${var})
- SET_TARGET_PROPERTIES(${name} PROPERTIES COMPILE_FLAGS "${flags}")
- ''')
- return
-
- def addLibTarget(self, key, newlines):
- newlines.append(r'''
- FOREACH(amname ${%s})
- '''%(key))
- # --
- # Replace .la by _la ...
- # --
- newlines.append(r'''
- STRING(REPLACE .la _la amname ${amname})
- ''')
- # --
- # Remove the _la for the cmake name
- # --
- newlines.append(r'''
- STRING(LENGTH ${amname} len)
- MATH(EXPR newlen "${len}-3")
- STRING(SUBSTRING ${amname} 0 ${newlen} name)
- ''')
- # --
- # Does the target begins with lib ??
- # If yes, remove lib at beginning for cmake name
- # --
- newlines.append(r'''
- STRING(REGEX MATCH "^lib" BEGIN_WITH_lib ${name})
- IF(BEGIN_WITH_lib)
- STRING(LENGTH ${name} len)
- MATH(EXPR newlen "${len}-3")
- STRING(SUBSTRING ${name} 3 ${newlen} name)
- ENDIF(BEGIN_WITH_lib)
- ''')
- # --
- # Does the target is an idl library
- # --
- newlines.append(r'''
- STRING(REGEX MATCH "IDL" ISIDL ${name})
- ''')
- # --
- # Set the type of the library
- # --
- newlines.append(r'''
- IF(ISIDL)
- IF(WINDOWS)
- SET(type STATIC)
- ELSE(WINDOWS)
- SET(type SHARED)
- ENDIF(WINDOWS)
- ELSE(ISIDL)
- SET(type SHARED)
- ENDIF(ISIDL)
- ''')
- if key == "noinst_LTLIBRARIES":
- newlines.append(r'''
- IF(WINDOWS)
- SET(type STATIC)
- ELSE(WINDOWS)
- SET(type STATIC)
- ENDIF(WINDOWS)
- ''')
- pass
- # --
- # Set sources for the library
- # --
- newlines.append(r'''
- SET(srcs)
- FOREACH(src ${${amname}_SOURCES} ${dist_${amname}_SOURCES})
- GET_FILENAME_COMPONENT(ext ${src} EXT)
- IF(ext STREQUAL .f)
- IF(src STREQUAL trte.f)
- SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${src})
- STRING(REPLACE ".f" ".c" src ${src})
- SET(src ${CMAKE_CURRENT_BINARY_DIR}/${src})
- SET(output ${src})
- SET(cmd f2c)
- IF(NOT WINDOWS)
- IF(CMAKE_SIZEOF_VOID_P STREQUAL 8)
- SET(cmd valgrind f2c) # f2c seems to be buggy on 64 bits ... but with valgrind, it works :)
- ENDIF()
- ENDIF(NOT WINDOWS)
- ADD_CUSTOM_COMMAND(
- OUTPUT ${output}
- COMMAND ${cmd} ${input}
- MAIN_DEPENDENCY ${input}
- )
- ELSE(src STREQUAL trte.f)
- SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${src})
- STRING(REPLACE ".f" ".o" src ${src})
- SET(src ${CMAKE_CURRENT_BINARY_DIR}/${src})
- SET(output ${src})
- IF(WINDOWS)
- SET(F77 g77)
- ELSE(WINDOWS)
- SET(F77 gfortran)
- ENDIF(WINDOWS)
- ADD_CUSTOM_COMMAND(
- OUTPUT ${output}
- COMMAND ${F77} -c -o ${output} ${input}
- MAIN_DEPENDENCY ${input}
- )
- ENDIF(src STREQUAL trte.f)
- ENDIF(ext STREQUAL .f)
- SET(srcs ${srcs} ${src})
- ENDFOREACH(src ${${amname}_SOURCES} ${dist_${amname}_SOURCES})
- ''')
- newlines.append(r'''
- SET(l ${nodist_${amname}_SOURCES} ${UIC_FILES})
- FOREACH(f ${l})
- SET(src ${CMAKE_CURRENT_BINARY_DIR}/${f})
- SET(srcs ${srcs} ${src})
- ENDFOREACH(f ${l})
- ''')
- newlines.append(r'''
- SET(build_srcs)
- SET(l ${nodist_${amname}_SOURCES} ${BUILT_SOURCES})
- FOREACH(f ${l})
- GET_FILENAME_COMPONENT(ext ${f} EXT)
- IF(ext STREQUAL .py)
- SET(fff)
- ELSE(ext STREQUAL .py)
- SET(fff ${CMAKE_CURRENT_BINARY_DIR}/${f})
- ENDIF(ext STREQUAL .py)
- IF(fff)
- IF(build_srcs)
- LIST(FIND build_srcs ${fff} index)
- IF(NOT index EQUAL -1)
- SET(fff)
- ENDIF(NOT index EQUAL -1)
- ENDIF(build_srcs)
- ENDIF(fff)
- IF(fff)
- SET(build_srcs ${build_srcs} ${fff})
- ENDIF(fff)
- ENDFOREACH(f ${l})
- ''')
- # --
- # Add the library to cmake
- # --
- newlines.append(r'''
- ADD_LIBRARY(${name} ${type} ${srcs})
- ''')
- # --
- # The compilation flags
- # --
- self.setCompilationFlags(key, newlines)
- # --
- newlines.append(r'''
- SET_TARGET_PROPERTIES(${name} PROPERTIES VERSION ${VERSION_INFO} SOVERSION ${SOVERSION_INFO})
- ''')
- # --
- self.setLibAdd(key, newlines)
- # --
- if 1: # key != "noinst_LTLIBRARIES":
- newlines.append(r'''
- SET(key %s)
- '''%(key))
- newlines.append(r'''
- SET(test ON)
- IF(${key} STREQUAL noinst_LTLIBRARIES)
- SET(test OFF)
- ENDIF(${key} STREQUAL noinst_LTLIBRARIES)
- ''')
- if self.module == "netgen" :
- newlines.append(r'''
- IF(${key} STREQUAL noinst_LTLIBRARIES)
- IF(WINDOWS)
- SET(test ON)
- ENDIF(WINDOWS)
- ENDIF(${key} STREQUAL noinst_LTLIBRARIES)
- ''')
- pass
- newlines.append(r'''
- IF(test)
- ''')
- if self.module in ["medfile", "netgen"]:
- newlines.append(r'''
- SET(DEST lib)
- ''')
- elif key == "libparaview_LTLIBRARIES":
- newlines.append(r'''
- SET(DEST lib/paraview)
- ''')
- else:
- newlines.append(r'''
- SET(DEST lib/salome)
- ''')
- pass
- newlines.append(r'''
- IF(BEGIN_WITH_lib)
- INSTALL(TARGETS ${name} DESTINATION ${DEST})
- ''')
- if self.module == "gui":
- newlines.append(r'''
- FOREACH(lib SalomePyQt)
- IF(name STREQUAL lib)
- IF(WINDOWS)
- IF(CMAKE_BUILD_TYPE STREQUAL Release)
- INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${DEST}/${name}.dll DESTINATION ${DEST} RENAME ${name}.pyd)
- ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
- INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${DEST}/${name}.dll DESTINATION ${DEST} RENAME ${name}_d.pyd)
- ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
- ELSE(WINDOWS)
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib${name}.so DESTINATION ${DEST} RENAME ${name}.so)
- ENDIF(WINDOWS)
- ENDIF(name STREQUAL lib)
- ENDFOREACH(lib SalomePyQt)
- FOREACH(lib SalomePy)
- IF(name STREQUAL lib)
- IF(WINDOWS)
- IF(CMAKE_BUILD_TYPE STREQUAL Release)
- INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${DEST}/${name}.dll DESTINATION ${DEST} RENAME lib${name}.pyd)
- ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
- INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${DEST}/${name}.dll DESTINATION ${DEST} RENAME lib${name}_d.pyd)
- ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
- ENDIF(WINDOWS)
- ENDIF(name STREQUAL lib)
- ENDFOREACH(lib SalomePy)
- ''')
- pass
- if self.module == "geom":
- newlines.append(r'''
- IF(WINDOWS)
- STRING(REGEX MATCH "Export" ISExport ${name})
- IF(ISExport)
- INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${DEST}/${name}.dll DESTINATION ${DEST} RENAME lib${name}.dll)
- ENDIF(ISExport)
- STRING(REGEX MATCH "Import" ISImport ${name})
- IF(ISImport)
- INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${DEST}/${name}.dll DESTINATION ${DEST} RENAME lib${name}.dll)
- ENDIF(ISImport)
- ENDIF(WINDOWS)
- ''')
- pass
- newlines.append(r'''
- ELSE(BEGIN_WITH_lib)
- ''')
- newlines.append(r'''
- IF(WINDOWS)
- INSTALL(TARGETS ${name} DESTINATION ${salomepythondir})
- IF(CMAKE_BUILD_TYPE STREQUAL Release)
- INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${salomepythondir}/${name}.dll DESTINATION ${salomepythondir} RENAME ${name}.pyd)
- ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
- INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${salomepythondir}/${name}.dll DESTINATION ${salomepythondir} RENAME ${name}_d.pyd)
- ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
- ELSE(WINDOWS)
- GET_TARGET_PROPERTY(version ${name} VERSION)
- GET_TARGET_PROPERTY(soversion ${name} SOVERSION)
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib${name}.so.${version} DESTINATION ${salomepythondir} RENAME ${name}.so.${version})
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib${name}.so.${version} DESTINATION ${salomepythondir} RENAME ${name}.so.${soversion})
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib${name}.so.${version} DESTINATION ${salomepythondir} RENAME ${name}.so)
- ENDIF(WINDOWS)
- ''')
- newlines.append(r'''
- ENDIF(BEGIN_WITH_lib)
- ''')
- newlines.append(r'''
- ENDIF(test)
- ''')
- pass
- # --
- newlines.append(r'''
- ENDFOREACH(amname ${%s})
- '''%(key))
- # --
- return
-
- def addBinTarget(self, key, newlines):
- # --
- newlines.append(r'''
- FOREACH(amname ${%s})
- '''%(key))
- # --
- newlines.append(r'''
- SET(test ON)
- ''')
- if key == "check_PROGRAMS":
- newlines.append(r'''
- IF(bin_PROGRAMS)
- STRING(REGEX MATCH ${amname} is_present ${bin_PROGRAMS})
- IF(is_present)
- SET(test OFF)
- ENDIF(is_present)
- ENDIF(bin_PROGRAMS)
- ''')
- pass
- newlines.append(r'''
- IF(test)
- ''')
- # --
- newlines.append(r'''
- SET(name "${amname}_exe")
- SET(srcs ${${amname}_SOURCES} ${dist_${amname}_SOURCES})
- SET(l ${nodist_${amname}_SOURCES})
- FOREACH(f ${l})
- SET(src ${CMAKE_CURRENT_BINARY_DIR}/${f})
- SET(srcs ${srcs} ${src})
- ENDFOREACH(f ${l})
- LIST(LENGTH srcs nb)
- IF(nb)
- ADD_EXECUTABLE(${name} ${srcs})
- ''')
- # --
- self.setCompilationFlags(key, newlines)
- # --
- self.setLibAdd(key, newlines)
- # --
- if self.module in ["jobmanager", "medfile", "netgen"]:
- newlines.append(r'''
- SET(DEST bin)
- ''')
- else:
- newlines.append(r'''
- SET(DEST bin/salome)
- ''')
- pass
- # --
- if key == "bin_PROGRAMS":
- newlines.append(r'''
- IF(WINDOWS)
- INSTALL(TARGETS ${name} DESTINATION ${DEST})
- INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${DEST}/${name}.exe DESTINATION ${DEST} RENAME ${amname}.exe)
- INSTALL(CODE "FILE(REMOVE ${CMAKE_INSTALL_PREFIX}/${DEST}/${name}.exe)")
- ELSE(WINDOWS)
- SET(PERMS)
- SET(PERMS ${PERMS} OWNER_READ OWNER_WRITE OWNER_EXECUTE)
- SET(PERMS ${PERMS} GROUP_READ GROUP_EXECUTE)
- SET(PERMS ${PERMS} WORLD_READ WORLD_EXECUTE)
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name} DESTINATION ${DEST} PERMISSIONS ${PERMS} RENAME ${amname})
- ENDIF(WINDOWS)
- ''')
- pass
- # --
- newlines.append(r'''
- ENDIF(nb)
- ''')
- # --
- newlines.append(r'''
- ENDIF(test)
- ''')
- newlines.append(r'''
- ENDFOREACH(amname ${%s})
- '''%(key))
- # --
- return
-
- def addInstallTarget(self, key, destination, newlines):
- newlines.append(r"FOREACH(f ${%s})"%(key))
- newlines.append(r'''
- SET(DEST %s)
- '''%(destination))
- newlines.append(r'''
- STRING(COMPARE EQUAL ${f} SALOMEconfig.h.in test_SALOMEconfig.h.in)
- IF(test_SALOMEconfig.h.in)
- INSTALL(FILES SALOMEconfig.ref.in DESTINATION ${DEST} RENAME SALOMEconfig.h.in)
- ELSE(test_SALOMEconfig.h.in)
- SET(dummy dummy-NOTFOUND)
- MARK_AS_ADVANCED(dummy)
- # FILE(REMOVE ${CMAKE_INSTALL_PREFIX}/${DEST}/${f})
- FIND_FILE(dummy ${f} PATHS ${CMAKE_CURRENT_SOURCE_DIR} NO_DEFAULT_PATH)
- IF(dummy)
- ''')
- if key in ['dist_salomescript_SCRIPTS',
- 'dist_appliskel_SCRIPTS',
- 'dist_appliskel_PYTHON']:
- newlines.append(r'''
- SET(PERMS)
- SET(PERMS ${PERMS} OWNER_READ OWNER_WRITE OWNER_EXECUTE)
- SET(PERMS ${PERMS} GROUP_READ GROUP_EXECUTE)
- SET(PERMS ${PERMS} WORLD_READ WORLD_EXECUTE)
- INSTALL(FILES ${f} DESTINATION ${DEST} PERMISSIONS ${PERMS})
- ''')
- else:
- newlines.append(r'''
- GET_FILENAME_COMPONENT(ext ${f} EXT)
- IF(ext STREQUAL .py)
- IF(DEST STREQUAL bin/salome)
- SET(PERMS)
- SET(PERMS ${PERMS} OWNER_READ OWNER_WRITE OWNER_EXECUTE)
- SET(PERMS ${PERMS} GROUP_READ GROUP_EXECUTE)
- SET(PERMS ${PERMS} WORLD_READ WORLD_EXECUTE)
- INSTALL(FILES ${f} DESTINATION ${DEST} PERMISSIONS ${PERMS})
- ELSE(DEST STREQUAL bin/salome)
- INSTALL(FILES ${f} DESTINATION ${DEST})
- ENDIF(DEST STREQUAL bin/salome)
- ELSE(ext STREQUAL .py)
- INSTALL(FILES ${f} DESTINATION ${DEST})
- ENDIF(ext STREQUAL .py)
- ''')
- pass
- newlines.append(r'''
- ELSE(dummy)
- GET_FILENAME_COMPONENT(ext ${f} EXT)
- IF(ext STREQUAL .qm)
- STRING(REGEX REPLACE .qm .ts input ${f})
- ''')
- if self.module in ["kernel", "gui", "yacs"]:
- newlines.append(r'''
- SET(input ${CMAKE_CURRENT_SOURCE_DIR}/resources/${input})
- ''')
- else:
- newlines.append(r'''
- SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input})
- ''')
- pass
- newlines.append(r'''
- SET(output ${CMAKE_CURRENT_BINARY_DIR}/${f})
- # ADD_CUSTOM_COMMAND(
- # OUTPUT ${output}
- # COMMAND ${QT_LRELEASE_EXECUTABLE} ${input} -qm ${output}
- # MAIN_DEPENDENCY ${input}
- # )
- EXECUTE_PROCESS(COMMAND ${QT_LRELEASE_EXECUTABLE} ${input} -qm ${output})
- ENDIF(ext STREQUAL .qm)
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${f} DESTINATION ${DEST})
- ENDIF(dummy)
- ENDIF(test_SALOMEconfig.h.in)
- ''')
- newlines.append(r'''
- GET_FILENAME_COMPONENT(ext ${f} EXT)
- IF(ext STREQUAL .py)
- INSTALL(CODE "SET(PYTHON_FILE ${f})")
- INSTALL(CODE "SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})")
- INSTALL(CODE "SET(DEST ${DEST})")
- INSTALL(CODE "SET(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})")
- ''')
- if self.module == "kernel":
- newlines.append('''
- IF(f STREQUAL SALOME_ContainerPy.py)
- ELSE(f STREQUAL SALOME_ContainerPy.py)
- IF(f STREQUAL am2cmake.py)
- ELSE(f STREQUAL am2cmake.py)
- INSTALL(SCRIPT ${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/install_and_compile_python_file.cmake)
- ENDIF(f STREQUAL am2cmake.py)
- ENDIF(f STREQUAL SALOME_ContainerPy.py)
- ''')
- else:
- newlines.append('''
- STRING(REPLACE "\\\\" "/" KERNEL_ROOT_DIR ${KERNEL_ROOT_DIR})
- INSTALL(SCRIPT ${KERNEL_ROOT_DIR}/salome_adm/cmake_files/deprecated/install_and_compile_python_file.cmake)
- ''')
- pass
- newlines.append(r'''
- ENDIF(ext STREQUAL .py)
- ''')
- newlines.append(r"ENDFOREACH(f ${%s})"%(key))
- return
-
- def writeListsFile(self):
- f = open(self.listsFile, "w")
- f.write(self.content)
- f.close()
- return
-
- def writeEnvScript(self, upmod, buildmod=True):
- import os, sys
- p_version = sys.version[:3]
- python_path = "PYTHONPATH"
- root_dir = "%s_ROOT_DIR" % upmod
- if sys.platform == "win32":
- script_line = '@SET %(var)s=%(val)s;%%%(var)s%%\n'
- var_line = '%%%s%%'
- lib_path = "PATH"
- omni = "x86_win32"
- omni_py = "python"
- pass
- else:
- script_line = 'export %(var)s=%(val)s:\$%(var)s\n'
- var_line = '\${%s}'
- lib_path = "LD_LIBRARY_PATH"
- omni = ""
- omni_py = "/".join( ["python%s"%p_version , "site-packages"] )
- pass
- #
- script = ""
- #
- if buildmod:
- script += script_line % { 'var':python_path, 'val':"/".join( ["${CMAKE_INSTALL_PREFIX}", "lib", "python%s"%p_version, "site-packages", "salome"] ) }
- script += script_line % { 'var':python_path, 'val':"/".join( ["${CMAKE_INSTALL_PREFIX}", "bin", "salome"] ) }
- script += script_line % { 'var':lib_path, 'val':"/".join( ["${CMAKE_INSTALL_PREFIX}", "lib", "salome"] ) }
- pass
- else:
- script += script_line % { 'var':python_path, 'val':"/".join( [var_line % root_dir, "lib", "python%s"%p_version, "site-packages", "salome"] ) }
- script += script_line % { 'var':python_path, 'val':"/".join( [var_line % root_dir, "bin", "salome"] ) }
- script += script_line % { 'var':lib_path, 'val':"/".join( [var_line % root_dir, "lib", "salome"] ) }
- pass
- #
- if upmod == "KERNEL" :
- script += "\n"
- if omni:
- script += script_line % { 'var':python_path, 'val':"/".join( ["${OMNIORB_ROOT_USER}", "lib", omni] ) }
- script += script_line % { 'var':lib_path, 'val':"/".join( ["${OMNIORB_ROOT_USER}", "lib", omni] ) }
- pass
- else:
- script += script_line % { 'var':python_path, 'val':"/".join( ["${OMNIORB_ROOT_USER}", "lib"] ) }
- script += script_line % { 'var':lib_path, 'val':"/".join( ["${OMNIORB_ROOT_USER}", "lib"] ) }
- pass
- script += script_line % { 'var':python_path, 'val':"/".join( ["${OMNIORB_ROOT_USER}", "lib", omni_py] ) }
- pass
- #
- if upmod == "GEOM" :
- script = self.writeEnvScript("KERNEL", False) + "\n" + script
- script = self.writeEnvScript("GUI", False) + "\n" + script
- pass
- #
- if upmod == "SMESH" :
- script = self.writeEnvScript("GEOM", False) + "\n" + script
- pass
-
- return script
- pass
-
-def convertAmFile(the_root, root, dirs, files, f, module):
- cmake = CMakeFile(the_root, root, dirs, files, f, module)
- cmake.writeListsFile()
- return
-
-def usage(exit_status):
- from sys import exit
- from sys import argv
- print "Usage: %s --module"%(argv[0])
- exit(exit_status)
- return
-
-if __name__ == "__main__":
- #
- from sys import argv
- if len(argv) != 2:
- usage(1)
- pass
- #
- module = argv[1]
- if module.find('--') != 0:
- usage(1)
- pass
- module = module[2:]
- if len(module) == 0:
- usage(1)
- pass
- #
- from os import getcwd
- the_root = getcwd()
- #
- nok = 0
- #
- from os import getenv
- from os import walk
- for root, dirs, files in walk(the_root):
- # --
- # E.A. : Remove 'CVS' in dirs
- # E.A. : It allows to not recurse in CVS dirs
- # E.A. : See os module python documentation
- # --
- try:
- dirs.remove('CVS')
- except ValueError:
- pass
- # --
- if "Makefile.am.cmake" in files:
- if "Makefile.am" in files:
- files.remove("Makefile.am")
- pass
- pass
- # --
- for f in files:
- if f in ["Makefile.am", "Makefile.am.cmake"]:
- convert = True # convert files by default
- forced = getenv("AM2CMAKE_FORCE_GENERATION", "0")=="1" or \
- getenv("AM2CMAKE_FORCE_%s_GENERATION"%module.upper(), "0")=="1"
- if not forced:
- # detect if conversion should be done
- if "CMakeLists.txt" in files:
- from os.path import join
- ff = open(join(root, "CMakeLists.txt"))
- content = ff.read()
- ff.close()
- if content.find("generated by am2cmake") == -1:
- convert = False
- pass
- pass
- pass
- if convert:
- convertAmFile(the_root, root, dirs, files, f, module)
- nok += 1
- pass
- pass
- pass
- #
- from sys import stdout
- if nok:
- if nok == 1:
- msg = "%s file has been converted to cmake"%(nok)
- else:
- msg = "%s files have been converted to cmake"%(nok)
- pass
- stdout.write(msg)
- stdout.write("\n")
- stdout.flush()
- pass
- pass
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-SET(FULLDIR ${CMAKE_INSTALL_PREFIX}/${DEST})
-MESSAGE(STATUS "py compiling ${FULLDIR}/${PYTHON_FILE}")
-SET(CMD "import py_compile ; py_compile.compile('${FULLDIR}/${PYTHON_FILE}')")
-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "${CMD}")
-SET(CMD "import py_compile ; py_compile.compile('${FULLDIR}/${PYTHON_FILE}')")
-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -O -c "${CMD}")
+++ /dev/null
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-SET(FULLDIR ${CMAKE_INSTALL_PREFIX}/${DIR})
-FILE(MAKE_DIRECTORY ${FULLDIR})
-MESSAGE(STATUS "Compiling ${IDL_FILE} into ${FULLDIR}")
-EXECUTE_PROCESS(COMMAND ${OMNIORB_IDL_PYTHON} ${IDLPYFLAGS} -C${FULLDIR} ${IDL_FILE})
+++ /dev/null
-#!/usr/bin/env python
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-#################################################################################
-#
-# File: prepare_generating_doc.py
-# Author: Anastasiya NIKOLAEVA, Open CASCADE S.A.S
-#
-#################################################################################
-#
-# Pre-process Python module for documentation generation by doxygen.
-# The script removes the staff that should not appear in the resulting
-# documentation.
-#
-# Current the script does:
-# 1. remove Python documentation in triple double quotes (like """some_comments""")
-#
-# Usage: prepare_generating_doc.py [-o <output_file>] <input_file>
-#
-# If <output_file> is not specified, it is generated in the current directory.
-#
-#################################################################################
-
-import os, sys, re
-
-def main(input_file, output_file = None):
-
- # open input file
- try:
- infile = open(input_file, 'rb')
- except:
- sys.exit("File %s is not found" % input_file)
- pass
-
- if not output_file: output_file = os.path.basename(input_file)
-
- # open output file
- try:
- outfile = open(output_file, 'wb')
- except:
- sys.exit("File %s cannot be opened for write" % output_file)
- pass
-
- # parse input file
-
- isCom = False
- isShift = False
-
- for line in infile.readlines():
- # 1. remove comments like """some_comments"""
- n = line.find('"""')
- n1 = line[(n+2):].find('"""')
- if (n > -1) and (n1 > -1):
- continue
- if isCom:
- if n > -1:
- isCom = False
- pass
- continue
- else:
- if n > -1:
- isCom = True
- continue
- pass
-
- # write resulting line
- outfile.write(line)
-
- pass # end of for
-
- # close input and output files
- infile.close()
- outfile.close()
-
- pass
-
-if __name__ == "__main__":
- import optparse
- parser = optparse.OptionParser(usage="%prog [options] input_file")
- h = "Output file (if not specified, generated in the current directory)"
- parser.add_option("-o", "--output", dest="output",
- action="store", default=None, metavar="file",
- help=h)
- (options, args) = parser.parse_args()
-
- if len( args ) < 1: sys.exit("Input file is not specified")
- main( args[0], options.output )
- pass
--- /dev/null
+#!/usr/bin/env python
+# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#################################################################################
+#
+# File: prepare_generating_doc.py
+# Author: Anastasiya NIKOLAEVA, Open CASCADE S.A.S
+#
+#################################################################################
+#
+# Pre-process Python module for documentation generation by doxygen.
+# The script removes the staff that should not appear in the resulting
+# documentation.
+#
+# Current the script does:
+# 1. remove Python documentation in triple double quotes (like """some_comments""")
+#
+# Usage: prepare_generating_doc.py [-o <output_file>] <input_file>
+#
+# If <output_file> is not specified, it is generated in the current directory.
+#
+#################################################################################
+
+import os, sys, re
+
+def main(input_file, output_file = None):
+
+ # open input file
+ try:
+ infile = open(input_file, 'rb')
+ except:
+ sys.exit("File %s is not found" % input_file)
+ pass
+
+ if not output_file: output_file = os.path.basename(input_file)
+
+ # open output file
+ try:
+ outfile = open(output_file, 'wb')
+ except:
+ sys.exit("File %s cannot be opened for write" % output_file)
+ pass
+
+ # parse input file
+
+ isCom = False
+ isShift = False
+
+ for line in infile.readlines():
+ # 1. remove comments like """some_comments"""
+ n = line.find('"""')
+ n1 = line[(n+2):].find('"""')
+ if (n > -1) and (n1 > -1):
+ continue
+ if isCom:
+ if n > -1:
+ isCom = False
+ pass
+ continue
+ else:
+ if n > -1:
+ isCom = True
+ continue
+ pass
+
+ # write resulting line
+ outfile.write(line)
+
+ pass # end of for
+
+ # close input and output files
+ infile.close()
+ outfile.close()
+
+ pass
+
+if __name__ == "__main__":
+ import optparse
+ parser = optparse.OptionParser(usage="%prog [options] input_file")
+ h = "Output file (if not specified, generated in the current directory)"
+ parser.add_option("-o", "--output", dest="output",
+ action="store", default=None, metavar="file",
+ help=h)
+ (options, args) = parser.parse_args()
+
+ if len( args ) < 1: sys.exit("Input file is not specified")
+ main( args[0], options.output )
+ pass
SET(${PROJECT_NAME_UC}_VERSION
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
+
+# Common CMake macros
+SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
+IF(EXISTS ${CONFIGURATION_ROOT_DIR})
+ LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
+ INCLUDE(SalomeMacros)
+ELSE()
+ MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
+ENDIF()
+
# Find KERNEL
# ===========
SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL")
IF(EXISTS ${KERNEL_ROOT_DIR})
LIST(APPEND CMAKE_MODULE_PATH "${KERNEL_ROOT_DIR}/salome_adm/cmake_files")
- INCLUDE(SalomeMacros)
FIND_PACKAGE(SalomeKERNEL REQUIRED)
KERNEL_WITH_CORBA() # check whether KERNEL builded with CORBA
ELSE(EXISTS ${KERNEL_ROOT_DIR})