Salome HOME
passage du template c++ a salome9 et c++11
authorcrouzet <nicolas.crouzet@cea.fr>
Tue, 18 Sep 2018 10:01:32 +0000 (12:01 +0200)
committercrouzet <nicolas.crouzet@cea.fr>
Tue, 18 Sep 2018 10:01:32 +0000 (12:01 +0200)
29 files changed:
commands/generate.py
data/local.pyconf
data/templates/CppSalome8/AUTHORS [new file with mode: 0644]
data/templates/CppSalome8/ChangeLog [new file with mode: 0644]
data/templates/CppSalome8/Makefile.am [new file with mode: 0644]
data/templates/CppSalome8/NEWS [new file with mode: 0644]
data/templates/CppSalome8/README [new file with mode: 0644]
data/templates/CppSalome8/adm/unix/config_files/EMPTY [new file with mode: 0644]
data/templates/CppSalome8/adm/unix/make_begin.am [new file with mode: 0644]
data/templates/CppSalome8/adm/unix/make_check.am [new file with mode: 0644]
data/templates/CppSalome8/adm/unix/make_end.am [new file with mode: 0644]
data/templates/CppSalome8/archive [new file with mode: 0755]
data/templates/CppSalome8/build_configure [new file with mode: 0755]
data/templates/CppSalome8/configure.in.base [new file with mode: 0644]
data/templates/CppSalome8/resources/Cpp_Template_.png [new file with mode: 0644]
data/templates/CppSalome8/rfind [new file with mode: 0755]
data/templates/CppSalome8/root_clean [new file with mode: 0755]
data/templates/CppSalome8/src/Cpp_Template_/Cpp_Template__CXX/Cpp_Template_.cxx [new file with mode: 0644]
data/templates/CppSalome8/src/Cpp_Template_/Cpp_Template__CXX/Cpp_Template_.hxx [new file with mode: 0644]
data/templates/CppSalome8/src/Cpp_Template_/Cpp_Template__CXX/Makefile.am [new file with mode: 0644]
data/templates/CppSalome8/src/Cpp_Template_/Cpp_Template__CXX/main.cxx [new file with mode: 0644]
data/templates/CppSalome8/src/Cpp_Template_/Cpp_Template__SWIG/Cpp_Template_.i [new file with mode: 0644]
data/templates/CppSalome8/src/Cpp_Template_/Cpp_Template__SWIG/Makefile.am [new file with mode: 0644]
data/templates/CppSalome8/src/Cpp_Template_/Cpp_Template__TEST/Cpp_Template__test.py [new file with mode: 0644]
data/templates/CppSalome8/src/Cpp_Template_/Cpp_Template__TEST/Makefile.am [new file with mode: 0644]
data/templates/CppSalome8/src/Cpp_Template_/Makefile.am [new file with mode: 0644]
data/templates/CppSalome8/src/Makefile.am [new file with mode: 0644]
data/templates/CppSalome8/template.info [new file with mode: 0644]
data/templates/Cpp_Template/configure.in.base

index f0d1175fb666385b64c0ac93eaa8a874a55a387b..d46a0c81927af3e0068869224adf036e6fc7cac7 100644 (file)
@@ -153,6 +153,7 @@ def generate_component(config, compo, product_info, context, header, logger):
         mg = module_generator.Module(compo, components=[salome_compo],
                                      prefix=generate_dir, gui=gui_files)
         g = sat_generator(mg, context)
+        print "CNC generate component!"
         g.generate()
 
         if use_autotools:
index 7755af0b81ad5dc0712286e6f49ca3eaa3d520e8..b6f2e32607a784395c42073cdd8cd4b257ed3cf8 100644 (file)
   {
     project_file_paths :
     [
+    "/volatile/crouzet/SAT/TEST/TUTORIAL_COUPLING/Workdir/YACS/TUTO_COUPLING_PROJECT/tutorial_coupling.pyconf",
+    "/volatile/crouzet/SAT/TEST/SAT_NURESIM/nuresim.pyconf",
+    "/volatile/crouzet/SAT/TEST/SAT_SALOME/salome.pyconf",
+    "/volatile/crouzet/SAT/TEST/SAT_CORPUS/corpus.pyconf",
+    "/data/tmpsalome/salome/SAT-PROJECTS/NUMODIS/numodis.pyconf",
+    "/home/salome/SPN_PRIVATE/SAT5/PPGP-PROJECT/ppgp.pyconf",
+    "/home/salome/SPN_PRIVATE/SAT5/OSCAR-PROJECT/oscar.pyconf",
+    "/home/uranietm/proJET/saTJOBS/saT5/uranie.pyconf",
     ]
   }
diff --git a/data/templates/CppSalome8/AUTHORS b/data/templates/CppSalome8/AUTHORS
new file mode 100644 (file)
index 0000000..8f4939d
--- /dev/null
@@ -0,0 +1 @@
+Nicolas Crouzet       (nicolas.crouzet@cea.fr)
diff --git a/data/templates/CppSalome8/ChangeLog b/data/templates/CppSalome8/ChangeLog
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/data/templates/CppSalome8/Makefile.am b/data/templates/CppSalome8/Makefile.am
new file mode 100644 (file)
index 0000000..46e5489
--- /dev/null
@@ -0,0 +1,5 @@
+
+SUBDIRS = src
+
+#install-exec-hook:
+#      cp -rf idl/* $(pythondir)/$(PACKAGE)
diff --git a/data/templates/CppSalome8/NEWS b/data/templates/CppSalome8/NEWS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/data/templates/CppSalome8/README b/data/templates/CppSalome8/README
new file mode 100644 (file)
index 0000000..c627afc
--- /dev/null
@@ -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=<absolute path of :sat:{Cpp_Template_}CPP_INSTALL>
+ make
+ make install
+
+
diff --git a/data/templates/CppSalome8/adm/unix/config_files/EMPTY b/data/templates/CppSalome8/adm/unix/config_files/EMPTY
new file mode 100644 (file)
index 0000000..6b41c3e
--- /dev/null
@@ -0,0 +1 @@
+This directory is required do not remove this file
diff --git a/data/templates/CppSalome8/adm/unix/make_begin.am b/data/templates/CppSalome8/adm/unix/make_begin.am
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/data/templates/CppSalome8/adm/unix/make_check.am b/data/templates/CppSalome8/adm/unix/make_check.am
new file mode 100644 (file)
index 0000000..b4c35a0
--- /dev/null
@@ -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/CppSalome8/adm/unix/make_end.am b/data/templates/CppSalome8/adm/unix/make_end.am
new file mode 100644 (file)
index 0000000..078a218
--- /dev/null
@@ -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/CppSalome8/archive b/data/templates/CppSalome8/archive
new file mode 100755 (executable)
index 0000000..be9d5d8
--- /dev/null
@@ -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/CppSalome8/build_configure b/data/templates/CppSalome8/build_configure
new file mode 100755 (executable)
index 0000000..366a504
--- /dev/null
@@ -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/CppSalome8/configure.in.base b/data/templates/CppSalome8/configure.in.base
new file mode 100644 (file)
index 0000000..9006ceb
--- /dev/null
@@ -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/CppSalome8/resources/Cpp_Template_.png b/data/templates/CppSalome8/resources/Cpp_Template_.png
new file mode 100644 (file)
index 0000000..674f8fc
Binary files /dev/null and b/data/templates/CppSalome8/resources/Cpp_Template_.png differ
diff --git a/data/templates/CppSalome8/rfind b/data/templates/CppSalome8/rfind
new file mode 100755 (executable)
index 0000000..0fbfa3d
--- /dev/null
@@ -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/CppSalome8/root_clean b/data/templates/CppSalome8/root_clean
new file mode 100755 (executable)
index 0000000..5cddf28
--- /dev/null
@@ -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/CppSalome8/src/Cpp_Template_/Cpp_Template__CXX/Cpp_Template_.cxx b/data/templates/CppSalome8/src/Cpp_Template_/Cpp_Template__CXX/Cpp_Template_.cxx
new file mode 100644 (file)
index 0000000..4bfe9b0
--- /dev/null
@@ -0,0 +1,19 @@
+#include ":sat:{Cpp_Template_}.hxx"
+// uncoment if the component uses MED
+//#include "MEDCouplingUMesh.hxx"
+//#include "MEDCouplingFieldDouble.hxx"
+#include <string>
+
+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/CppSalome8/src/Cpp_Template_/Cpp_Template__CXX/Cpp_Template_.hxx b/data/templates/CppSalome8/src/Cpp_Template_/Cpp_Template__CXX/Cpp_Template_.hxx
new file mode 100644 (file)
index 0000000..95d4c4b
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef _:sat:{Cpp_Template_}_HXX_
+#define _:sat:{Cpp_Template_}_HXX_
+
+// Uncomment if the component uses MEDCoupling
+// namespace MEDCoupling
+// {
+//   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/CppSalome8/src/Cpp_Template_/Cpp_Template__CXX/Makefile.am b/data/templates/CppSalome8/src/Cpp_Template_/Cpp_Template__CXX/Makefile.am
new file mode 100644 (file)
index 0000000..6b1270a
--- /dev/null
@@ -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/CppSalome8/src/Cpp_Template_/Cpp_Template__CXX/main.cxx b/data/templates/CppSalome8/src/Cpp_Template_/Cpp_Template__CXX/main.cxx
new file mode 100644 (file)
index 0000000..d56714b
--- /dev/null
@@ -0,0 +1,14 @@
+#include ":sat:{Cpp_Template_}.hxx"
+// uncoment if the component uses MED
+// #include "MEDCouplingUMesh.hxx"
+// #include "MEDCouplingFieldDouble.hxx"
+#include <stdlib.h>
+
+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/CppSalome8/src/Cpp_Template_/Cpp_Template__SWIG/Cpp_Template_.i b/data/templates/CppSalome8/src/Cpp_Template_/Cpp_Template__SWIG/Cpp_Template_.i
new file mode 100644 (file)
index 0000000..f83dfd1
--- /dev/null
@@ -0,0 +1,32 @@
+%module :sat:{Cpp_Template_}SWIG
+
+%{
+#include <stdlib.h>
+#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<int>;
+   %template(vectord) vector<double>;
+};
+
+
+%include ":sat:{Cpp_Template_}.hxx"
+
+
+
diff --git a/data/templates/CppSalome8/src/Cpp_Template_/Cpp_Template__SWIG/Makefile.am b/data/templates/CppSalome8/src/Cpp_Template_/Cpp_Template__SWIG/Makefile.am
new file mode 100644 (file)
index 0000000..8c75b5e
--- /dev/null
@@ -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/CppSalome8/src/Cpp_Template_/Cpp_Template__TEST/Cpp_Template__test.py b/data/templates/CppSalome8/src/Cpp_Template_/Cpp_Template__TEST/Cpp_Template__test.py
new file mode 100644 (file)
index 0000000..05414cb
--- /dev/null
@@ -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/CppSalome8/src/Cpp_Template_/Cpp_Template__TEST/Makefile.am b/data/templates/CppSalome8/src/Cpp_Template_/Cpp_Template__TEST/Makefile.am
new file mode 100644 (file)
index 0000000..ce76b47
--- /dev/null
@@ -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/CppSalome8/src/Cpp_Template_/Makefile.am b/data/templates/CppSalome8/src/Cpp_Template_/Makefile.am
new file mode 100644 (file)
index 0000000..7aa8acb
--- /dev/null
@@ -0,0 +1,3 @@
+SUBDIRS = :sat:{Cpp_Template_}_CXX :sat:{Cpp_Template_}_SWIG :sat:{Cpp_Template_}_TEST
+
+
diff --git a/data/templates/CppSalome8/src/Makefile.am b/data/templates/CppSalome8/src/Makefile.am
new file mode 100644 (file)
index 0000000..ad76b7a
--- /dev/null
@@ -0,0 +1,2 @@
+SUBDIRS = :sat:{Cpp_Template_}
+
diff --git a/data/templates/CppSalome8/template.info b/data/templates/CppSalome8/template.info
new file mode 100644 (file)
index 0000000..bb727b0
--- /dev/null
@@ -0,0 +1,78 @@
+#!/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", "dir", "archive", "get method for prepare", lambda l: l in ['cvs', 'git', 'archive', 'dir'])
+    ]
+
+# configuration to use this component with sat
+pyconf = """
+    default :
+    {
+        name : "%(NAME)sCPP"
+        component_name : "%(NAME)s"
+        get_source : '%(get_method)s'
+        build_source : 'autotools'
+        git_info:
+        {
+            repo : 'to be filled'
+            tag : 'to be filled'
+        }
+        archive_info:
+        {
+            archive_name : '%(target)s'
+        }
+        dir_info:
+        {
+            dir : '%(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 :
+        {
+            cpp : "yes"
+            generate : "yes"
+            has_salome_gui : "yes"
+            logo : $source_dir + "/resources/%(NAME)s.png"
+        }
+    }
+"""
index 9006ceba2439e8f2b48bf6b114555a88861d9873..c12d730f382b9f457bc069485876efd04e05f6d7 100644 (file)
@@ -4,6 +4,7 @@ AC_CONFIG_SRCDIR(src)
 AM_INIT_AUTOMAKE
 AC_ENABLE_DEBUG(no)
 AC_DISABLE_PRODUCTION
+CXXFLAGS="$CXXFLAGS -std=c++11"
 
 AC_PROG_LIBTOOL
 AC_PROG_CXX