From: crouzet Date: Mon, 23 Jan 2017 11:23:47 +0000 (+0100) Subject: minor corrections of template command. add new CPP template for Salome7.8 X-Git-Tag: 5.0.0a1~38^2~10^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5df391f25d8d9943ad346bfa67712685310b217e;p=tools%2Fsat.git minor corrections of template command. add new CPP template for Salome7.8 --- diff --git a/commands/template.py b/commands/template.py index 142bdb6..604ce79 100644 --- a/commands/template.py +++ b/commands/template.py @@ -474,14 +474,15 @@ def run(args, runner, logger): logger.write("\n", 1) return 1 + # CNC inutile # Ask user confirmation if a module of the same name already exists - if options.name in runner.cfg.PRODUCTS and not runner.options.batch: - logger.write(src.printcolors.printcWarning( - _("A module named '%s' already exists." % options.name)), 1) - logger.write("\n", 1) - rep = input(_("Are you sure you want to continue? [Yes/No] ")) - if rep.upper() != _("YES"): - return 1 + #if options.name in runner.cfg.PRODUCTS and not runner.options.batch: + # logger.write(src.printcolors.printcWarning( + # _("A module named '%s' already exists." % options.name)), 1) + # logger.write("\n", 1) + # rep = input(_("Are you sure you want to continue? [Yes/No] ")) + # if rep.upper() != _("YES"): + # return 1 if options.target is None: msg = _("Error: the --%s argument is required\n") % "target" @@ -496,15 +497,16 @@ def run(args, runner, logger): logger.write("\n", 1) return 1 - if options.template == "Application": - if "_APPLI" not in options.name and not runner.options.batch: - msg = _("An Application module named '..._APPLI' " - "is usually recommended.") - logger.write(src.printcolors.printcWarning(msg), 1) - logger.write("\n", 1) - rep = input(_("Are you sure you want to continue? [Yes/No] ")) - if rep.upper() != _("YES"): - return 1 + # CNC inutile + #if options.template == "Application": + # if "_APPLI" not in options.name and not runner.options.batch: + # msg = _("An Application module named '..._APPLI' " + # "is usually recommended.") + # logger.write(src.printcolors.printcWarning(msg), 1) + # logger.write("\n", 1) + # rep = input(_("Are you sure you want to continue? [Yes/No] ")) + # if rep.upper() != _("YES"): + # return 1 logger.write(_('Create sources from template\n'), 1) src.printcolors.print_value(logger, 'destination', target_dir, 2) diff --git a/data/templates/CppSalome78/AUTHORS b/data/templates/CppSalome78/AUTHORS new file mode 100644 index 0000000..8f4939d --- /dev/null +++ b/data/templates/CppSalome78/AUTHORS @@ -0,0 +1 @@ +Nicolas Crouzet (nicolas.crouzet@cea.fr) diff --git a/data/templates/CppSalome78/ChangeLog b/data/templates/CppSalome78/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/data/templates/CppSalome78/Makefile.am b/data/templates/CppSalome78/Makefile.am new file mode 100644 index 0000000..46e5489 --- /dev/null +++ b/data/templates/CppSalome78/Makefile.am @@ -0,0 +1,5 @@ + +SUBDIRS = src + +#install-exec-hook: +# cp -rf idl/* $(pythondir)/$(PACKAGE) diff --git a/data/templates/CppSalome78/NEWS b/data/templates/CppSalome78/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/data/templates/CppSalome78/README b/data/templates/CppSalome78/README new file mode 100644 index 0000000..c627afc --- /dev/null +++ b/data/templates/CppSalome78/README @@ -0,0 +1,16 @@ +This directory contains the tree directories to compile a C++ components linked with MED library. + + +Component is based on automake. + +To INSTALL it : source salome environement file (for MED), then + + mkdir ../:sat:{Cpp_Template_}CPP_BUILD + mkdir ../:sat:{Cpp_Template_}CPP_INSTALL + ./build_configure + cd ../:sat:{Cpp_Template_}CPP_BUILD + ../:sat:{Cpp_Template_}CPP_SRC/configure --prefix= + make + make install + + diff --git a/data/templates/CppSalome78/adm/unix/config_files/EMPTY b/data/templates/CppSalome78/adm/unix/config_files/EMPTY new file mode 100644 index 0000000..6b41c3e --- /dev/null +++ b/data/templates/CppSalome78/adm/unix/config_files/EMPTY @@ -0,0 +1 @@ +This directory is required do not remove this file diff --git a/data/templates/CppSalome78/adm/unix/make_begin.am b/data/templates/CppSalome78/adm/unix/make_begin.am new file mode 100644 index 0000000..e69de29 diff --git a/data/templates/CppSalome78/adm/unix/make_check.am b/data/templates/CppSalome78/adm/unix/make_check.am new file mode 100644 index 0000000..b4c35a0 --- /dev/null +++ b/data/templates/CppSalome78/adm/unix/make_check.am @@ -0,0 +1,15 @@ + +python_cmd = env \ + SELF_ROOT_DIR=$(prefix) \ + REP_TESTS=$(prefix)/tests \ + REP_MAIL=$(prefix)/tests/maillages \ + PATH=$(bindir)/$(PACKAGE):$(PATH) \ + PYTHONPATH=$(bindir)/$(PACKAGE):$(libdir)/$(PACKAGE):$(pythondir)/$(PACKAGE):$(PYTHONPATH) \ + python + +check-local: + for f in X $(scripts_SCRIPTS) ; do \ + if test $f != X ; then \ + ( cd $(scriptsdir) && $(python_cmd) $f ) || exit 1 ; \ + fi ; \ + done diff --git a/data/templates/CppSalome78/adm/unix/make_end.am b/data/templates/CppSalome78/adm/unix/make_end.am new file mode 100644 index 0000000..078a218 --- /dev/null +++ b/data/templates/CppSalome78/adm/unix/make_end.am @@ -0,0 +1,23 @@ +SUFFIXES = + +# -------------------------------------------- +# *.i --> *_wrap.cxx +# -------------------------------------------- + +SUFFIXES += .i _wrap.cxx + +.i_wrap.cxx : + $(SWIG) $(SWIG_FLAGS) $(SWIG_PYTHON_INCLUDES) -o $@ $< + + +#---------------------------------------------- +# Post-installation rules +#---------------------------------------------- + +install-exec-hook: install-swig + +install-swig: $(patsubst lib%.la, $(libdir)/_%.so, \ + $(filter lib%SWIG.la, $(lib_LTLIBRARIES))) + +$(libdir)/_%.so: $(libdir)/lib%.so + ln -s `basename $^` $@ diff --git a/data/templates/CppSalome78/archive b/data/templates/CppSalome78/archive new file mode 100755 index 0000000..be9d5d8 --- /dev/null +++ b/data/templates/CppSalome78/archive @@ -0,0 +1,34 @@ +#! /bin/bash + +# +DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"` +cd ${DIR} +DIR=`pwd` + +REP=`basename $DIR` + +if [ -z "$USER" ] +then + USER=`whoami 2> /dev/null` || true +fi + +mkdir -p /tmp/${USER} +\rm -rf /tmp/${USER}/${REP} + +cd ${DIR}/.. +cp -drf ${REP} /tmp/${USER}/${REP} + +cd /tmp/${USER}/${REP} +./root_clean +find . -name "CVS" -depth -exec \rm -rf {} \; +find . -type f -exec chmod u+rw {} \; + +cd /tmp/${USER} + +TAR_FILE=${REP}`date +_%d.%m.%Y_%H.%M`.tgz + +tar cvfz ${TAR_FILE} ${REP} + +cp ${TAR_FILE} ${DIR}/.. + +\rm -rf /tmp/${USER}/${REP} ${TAR_FILE} diff --git a/data/templates/CppSalome78/build_configure b/data/templates/CppSalome78/build_configure new file mode 100755 index 0000000..366a504 --- /dev/null +++ b/data/templates/CppSalome78/build_configure @@ -0,0 +1,50 @@ +#! /bin/bash + +run() { + local logfile=$ORIG_DIR/build_configure.log + printf "%-50s" "$1 ... " + eval $1 > $logfile 2>&1 + if test $? != 0 ; then + echo "[FAILED]" + echo "see file build_configure.log ..." + exit 1 + fi + echo "[ OK ]" +} + +# -- +ORIG_DIR=`pwd` + +######################################################################## +# Test if the KERNEL_ROOT_DIR and MEDCOUPLING_ROOT_DIR are set correctly + +if test ! -d "${KERNEL_ROOT_DIR}"; then + echo "failed : KERNEL_ROOT_DIR variable is not correct !" + exit +fi +if test ! -d "${MEDCOUPLING_ROOT_DIR}"; then + echo "failed : MEDCOUPLING_ROOT_DIR variable is not correct !" + exit +fi + +# -- +# -- goto build_configure dir +CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"` +cd ${CONF_DIR} +# -- +# -- list all Makefile.am in Makefile.am.list +./rfind . Makefile.am > Makefile.am.list +# -- +# -- configure.in construction +cp configure.in.base configure.in +chmod +w configure.in +echo "AC_OUTPUT([ \\" >> configure.in +sed -e 's,\.am, \\,' -e 's,\.\/,,' Makefile.am.list >> configure.in +echo "])" >> configure.in + +# -- +run "libtoolize" +run "aclocal -I adm/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files -I ${MEDCOUPLING_ROOT_DIR}/adm_local/unix/config_files" +run "autoconf" +run "automake --add-missing --copy" + diff --git a/data/templates/CppSalome78/configure.in.base b/data/templates/CppSalome78/configure.in.base new file mode 100644 index 0000000..9006ceb --- /dev/null +++ b/data/templates/CppSalome78/configure.in.base @@ -0,0 +1,23 @@ + +AC_INIT(salome, 0.1) +AC_CONFIG_SRCDIR(src) +AM_INIT_AUTOMAKE +AC_ENABLE_DEBUG(no) +AC_DISABLE_PRODUCTION + +AC_PROG_LIBTOOL +AC_PROG_CXX +AC_PROG_CXXCPP + +AC_LINKER_OPTIONS +CHECK_PYTHON +AM_PATH_PYTHON(2.2.1) +CHECK_SWIG + +CHECK_KERNEL +CHECK_MEDCOUPLING + +AC_ENABLE_STATIC(no) + +CXXFLAGS="${CXXFLAGS} -g" +AC_SUBST(CXXFLAGS) diff --git a/data/templates/CppSalome78/resources/Cpp_Template_.png b/data/templates/CppSalome78/resources/Cpp_Template_.png new file mode 100644 index 0000000..674f8fc Binary files /dev/null and b/data/templates/CppSalome78/resources/Cpp_Template_.png differ diff --git a/data/templates/CppSalome78/rfind b/data/templates/CppSalome78/rfind new file mode 100755 index 0000000..0fbfa3d --- /dev/null +++ b/data/templates/CppSalome78/rfind @@ -0,0 +1,46 @@ +#! /bin/bash + +# +# Usage : rfind dir suffix ... +# +# find all files *suffix in dir in a recursive way +# different of the usual command find ... +# + +if test $# != 2 ; then + echo "Usage : $0 dir suffix" + exit +fi + +local_find() { + # if the first argument is not a directory, returns + if test ! -d $1 ; then + # echo "$1 is not a directory" + return + fi + # dont look in the CVS directories + # dont look in the autom4te* directories + case "$1" in + */CVS) return ;; + */autom4te*) return ;; + *) ;; + esac + # for each regular file contained in the directory + # test if it's a *"$2" file + for i in $1/* + do + if test -f $i ; then + case `basename $i` in + *$2) echo " "$i ;; + *) ;; + esac + fi + done + # for each subdirectory of the first argument, proceeds recursively + for i in $1/* + do + local_find $i $2 + done +} + +local_find $1 $2 diff --git a/data/templates/CppSalome78/root_clean b/data/templates/CppSalome78/root_clean new file mode 100755 index 0000000..5cddf28 --- /dev/null +++ b/data/templates/CppSalome78/root_clean @@ -0,0 +1,32 @@ +#!/bin/bash + + +CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"` +cd ${CONF_DIR} + +TO_CLEAN= +TO_CLEAN=${TO_CLEAN}' aclocal.m4' +TO_CLEAN=${TO_CLEAN}' autom4te*' +TO_CLEAN=${TO_CLEAN}' configure' +TO_CLEAN=${TO_CLEAN}' configure.in' +TO_CLEAN=${TO_CLEAN}' install-sh missing mkinstalldirs' +TO_CLEAN=${TO_CLEAN}' py-compile' +TO_CLEAN=${TO_CLEAN}' build_configure.log' +TO_CLEAN=${TO_CLEAN}' depcomp' +TO_CLEAN=${TO_CLEAN}' config.guess config.sub ltmain.sh' +TO_CLEAN=${TO_CLEAN}' Makefile.am.list' +# TO_CLEAN=${TO_CLEAN}' COPYING INSTALL' + +rm -rf $TO_CLEAN > /dev/null + +l=`find . -name "Makefile.in"` + +if test X"$l" != X ; then + rm -f $l +fi + +l=`find . -name "*~"` + +if test X"$l" != X ; then + rm -f $l +fi diff --git a/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__CXX/Cpp_Template_.cxx b/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__CXX/Cpp_Template_.cxx new file mode 100644 index 0000000..4bfe9b0 --- /dev/null +++ b/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__CXX/Cpp_Template_.cxx @@ -0,0 +1,19 @@ +#include ":sat:{Cpp_Template_}.hxx" +// uncoment if the component uses MED +//#include "MEDCouplingUMesh.hxx" +//#include "MEDCouplingFieldDouble.hxx" +#include + +using namespace std; +//using namespace MED_EN; + +:sat:{Cpp_Template_}:::sat:{Cpp_Template_}() +{ +} + +// implement your methods +double :sat:{Cpp_Template_}::plus(double _x, double _y) +{ + return _x+_y; +} + diff --git a/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__CXX/Cpp_Template_.hxx b/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__CXX/Cpp_Template_.hxx new file mode 100644 index 0000000..12455c1 --- /dev/null +++ b/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__CXX/Cpp_Template_.hxx @@ -0,0 +1,21 @@ +#ifndef _:sat:{Cpp_Template_}_HXX_ +#define _:sat:{Cpp_Template_}_HXX_ + +// Uncomment if the component uses MEDCoupling +// namespace ParaMEDMEM +// { +// class MEDCouplingUMesh; +// class MEDCouplingFieldDouble; +// } + +class :sat:{Cpp_Template_} +{ +// public methods +public: + :sat:{Cpp_Template_}(); + // fill your methods + double plus(double x, double y); +private: +}; + +#endif diff --git a/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__CXX/Makefile.am b/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__CXX/Makefile.am new file mode 100644 index 0000000..6b1270a --- /dev/null +++ b/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__CXX/Makefile.am @@ -0,0 +1,32 @@ +# +# Common begin part +# + +include $(top_srcdir)/adm/unix/make_begin.am + +# +# Developper part +# + +lib_LTLIBRARIES = lib:sat:{Cpp_Template_}CXX.la +lib:sat:{Cpp_Template_}CXX_la_SOURCES = :sat:{Cpp_Template_}.cxx +lib:sat:{Cpp_Template_}CXX_la_LIBADD = $(MEDCOUPLING_LDFLAGS) $(MED3_LIBS) $(HDF5_LIBS) -lmedcoupling -linterpkernel + +# exported headers +library_includedir=$(includedir) +library_include_HEADERS = :sat:{Cpp_Template_}.hxx + +INCLUDES = $(MEDCOUPLING_CXXFLAGS) $(MED3_INCLUDES) $(HDF5_INCLUDES) $(KERNEL_CXXFLAGS) + +bin_PROGRAMS = :sat:{Cpp_Template_}_test +:sat:{Cpp_Template_}_test_SOURCES = main.cxx +:sat:{Cpp_Template_}_test_LDADD = lib:sat:{Cpp_Template_}CXX.la $(MEDCOUPLING_LDFLAGS) -lmedcoupling -linterpkernel + + +# +# Common end part +# + +include $(top_srcdir)/adm/unix/make_end.am + + diff --git a/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__CXX/main.cxx b/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__CXX/main.cxx new file mode 100644 index 0000000..d56714b --- /dev/null +++ b/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__CXX/main.cxx @@ -0,0 +1,14 @@ +#include ":sat:{Cpp_Template_}.hxx" +// uncoment if the component uses MED +// #include "MEDCouplingUMesh.hxx" +// #include "MEDCouplingFieldDouble.hxx" +#include + +using namespace std; +int main(int argc, char ** argv) +{ + if (getenv("SALOME_trace") == NULL ) + setenv("SALOME_trace","local",0); + :sat:{Cpp_Template_} myCalc; + // test myCalc component ... +} diff --git a/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__SWIG/Cpp_Template_.i b/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__SWIG/Cpp_Template_.i new file mode 100644 index 0000000..f83dfd1 --- /dev/null +++ b/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__SWIG/Cpp_Template_.i @@ -0,0 +1,32 @@ +%module :sat:{Cpp_Template_}SWIG + +%{ +#include +#include ":sat:{Cpp_Template_}.hxx" +%} + +/* + Initialisation block due to the LocalTraceCollector mechanism + + */ + +/* %include "MEDCouplingCommon.i" */ + +%init %{ + if (getenv("SALOME_trace") == NULL ) + setenv("SALOME_trace","local",0); +%} + +%include "std_vector.i" +%include "std_string.i" + +namespace std { + %template(vectori) vector; + %template(vectord) vector; +}; + + +%include ":sat:{Cpp_Template_}.hxx" + + + diff --git a/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__SWIG/Makefile.am b/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__SWIG/Makefile.am new file mode 100644 index 0000000..8c75b5e --- /dev/null +++ b/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__SWIG/Makefile.am @@ -0,0 +1,32 @@ +# +# Common begin part +# + +include $(top_srcdir)/adm/unix/make_begin.am + +# +# Developper part +# + +lib_LTLIBRARIES = lib:sat:{Cpp_Template_}SWIG.la +nodist_lib:sat:{Cpp_Template_}SWIG_la_SOURCES = :sat:{Cpp_Template_}_wrap.cxx + +BUILT_SOURCES = :sat:{Cpp_Template_}_wrap.cxx + +SWIG_PYTHON_INCLUDES = $(MEDCOUPLING_CXXFLAGS) -I$(top_srcdir)/src/:sat:{Cpp_Template_}/:sat:{Cpp_Template_}_CXX + +INCLUDES = -I$(top_srcdir)/src/:sat:{Cpp_Template_}/:sat:{Cpp_Template_}_CXX $(PYTHON_INCLUDES) $(MEDCOUPLING_CXXFLAGS) $(MED3_INCLUDES) $(KERNEL_CXXFLAGS) + +lib:sat:{Cpp_Template_}SWIG_la_LIBADD = -L../:sat:{Cpp_Template_}_CXX -l:sat:{Cpp_Template_}CXX $(MEDCOUPLING_LDFLAGS) + + +bin_SCRIPTS = :sat:{Cpp_Template_}SWIG.py + +clean-local: + $(RM) :sat:{Cpp_Template_}SWIG.py :sat:{Cpp_Template_}_wrap.cxx + +# +# Common end part +# + +include $(top_srcdir)/adm/unix/make_end.am diff --git a/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__TEST/Cpp_Template__test.py b/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__TEST/Cpp_Template__test.py new file mode 100644 index 0000000..05414cb --- /dev/null +++ b/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__TEST/Cpp_Template__test.py @@ -0,0 +1,16 @@ +from os import getenv +if getenv("SALOMEPATH"): + import salome + import :sat:{Cpp_Template_}_ORB + my_:sat:{Cpp_Template_} = salome.lcc.FindOrLoadComponent("FactoryServer", ":sat:{Cpp_Template_}") + IN_SALOME_GUI = 1 +else: + import :sat:{Cpp_Template_}SWIG + my_:sat:{Cpp_Template_}=:sat:{Cpp_Template_}SWIG.:sat:{Cpp_Template_}() +pass +# +# +print "Test Program of :sat:{Cpp_Template_} component" + +# ... + diff --git a/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__TEST/Makefile.am b/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__TEST/Makefile.am new file mode 100644 index 0000000..ce76b47 --- /dev/null +++ b/data/templates/CppSalome78/src/Cpp_Template_/Cpp_Template__TEST/Makefile.am @@ -0,0 +1,7 @@ +# data_DATA = +# datadir = + +scripts_SCRIPTS = :sat:{Cpp_Template_}_test.py +scriptsdir = $(prefix)/bin + +include $(top_srcdir)/adm/unix/make_check.am diff --git a/data/templates/CppSalome78/src/Cpp_Template_/Makefile.am b/data/templates/CppSalome78/src/Cpp_Template_/Makefile.am new file mode 100644 index 0000000..7aa8acb --- /dev/null +++ b/data/templates/CppSalome78/src/Cpp_Template_/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = :sat:{Cpp_Template_}_CXX :sat:{Cpp_Template_}_SWIG :sat:{Cpp_Template_}_TEST + + diff --git a/data/templates/CppSalome78/src/Makefile.am b/data/templates/CppSalome78/src/Makefile.am new file mode 100644 index 0000000..ad76b7a --- /dev/null +++ b/data/templates/CppSalome78/src/Makefile.am @@ -0,0 +1,2 @@ +SUBDIRS = :sat:{Cpp_Template_} + diff --git a/data/templates/CppSalome78/template.info b/data/templates/CppSalome78/template.info new file mode 100644 index 0000000..3eb2828 --- /dev/null +++ b/data/templates/CppSalome78/template.info @@ -0,0 +1,74 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +# description of the template to be displayed with option --info +info = """ +Author: CEA +Description: This template can be used to create c++ component. +Remark: + * The name of the module must be suffixed with 'CPP'. + * This module will compiled with med 3. + * Once the module is compiled use the generate command to create the SALOME module. + * The generate command requires a version of YACSGEN greater or equal to 6.5.0. +""" + +# code to subsitute with component name +file_subst = "Cpp_Template_" + +# delimiter used in the template (default is ':sat:') +#delimiter = ":sat:" + +# filter of files to ignore for substitution +# if not defined all files will be parsed +ignore_filters = '*.png' + +# list of parameters +# a string = parameter name +# a tuple = (parameter name, default value, prompt, validation method) +parameters = [ + (file_subst, "%(NAME)s"), + ("get_method", "archive", "get method for prepare", lambda l: l in ['cvs', 'git', 'archive']) + ] + +# configuration to use this component with sat +pyconf = """ + default : + { + name : "%(NAME)sCPP" + component_name : "%(NAME)s" + get_sources : '%(get_method)s' + build_sources : 'autotools' + git_info: + { + repo : 'to be filled' + tag : 'to be filled' + } + archive_info: + { + archive_name : '%(target)s' + } + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + depend : [ + 'hdf5', + 'med', + 'qt', + 'Python', + 'omniORB', + 'omniORBpy', + 'boost' , + 'cppunit' , + 'KERNEL', + 'GUI', + 'MED' + ] + opt_depend : [] + properties : + { + is_cpp : "yes" + environment : "salome" + has_salome_gui : "yes" + logo : $source_dir + "/resources/%(NAME)s.png" + } + } +""" diff --git a/data/templates/Cpp_Template/template.info b/data/templates/Cpp_Template/template.info index a586f36..3eb2828 100644 --- a/data/templates/Cpp_Template/template.info +++ b/data/templates/Cpp_Template/template.info @@ -45,11 +45,10 @@ pyconf = """ } archive_info: { - archive_name : '%(target)s.tar.gz' + archive_name : '%(target)s' } - nb_proc : 1 - source_dir : $TOOLS.common.source_root + '/' + $name - build_dir : $TOOLS.common.build_root + '/' + $name + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name depend : [ 'hdf5', 'med', @@ -58,17 +57,18 @@ pyconf = """ 'omniORB', 'omniORBpy', 'boost' , + 'cppunit' , 'KERNEL', 'GUI', 'MED' ] opt_depend : [] - properties : - { - is_cpp : "yes" - environment : "salome" - has_salome_gui : "yes" - logo : $source_dir + "/resources/%(NAME)s.png" - } + properties : + { + is_cpp : "yes" + environment : "salome" + has_salome_gui : "yes" + logo : $source_dir + "/resources/%(NAME)s.png" + } } """