Introduce Open Dynamics Engine examples

Changed the regular expressions that removes comments in convert_swig to
try and handle C style comments found in multiline #define statements.

Also added a TRICK_ICG_NOCOMMENT line to SIM_ode to stop ICG from
trying to process non-Trick comments in the ODE directory.

refs #172
This commit is contained in:
Alex Lin 2016-01-29 09:43:43 -06:00
parent 71dab9ed45
commit fa29891ded
2 changed files with 4 additions and 2 deletions

View File

@ -218,8 +218,9 @@ sub process_file() {
$raw_contents = <IN_FILE> ;
# remove all comments, they can cause all kinds of trouble
# leave the line continuation character if present in a c++ style comment.
$raw_contents =~ s/\/\*(?:.*?)\*\/|\/\/(?:.*?)(\\)?(\n)/$1\n/sg ;
# leave the line continuation character if present
$raw_contents =~ s/\/\*(?:.*?)\*\/(\s*\\\n)?/$1/sg ;
$raw_contents =~ s/\/\/(?:.*?)(\\)?(\n)/$1\n/sg ;
## The init_attr functions cause problems when we try and wrap them with SWIG.
## We can safely remove them from the header files.

View File

@ -2,6 +2,7 @@
ODE_HOME = /users/alin/ode-0.14
TRICK_ICG_EXCLUDE = ${ODE_HOME}/ode/src/array.h:${ODE_HOME}/ode/src/threading_base.h
TRICK_ICG_NOCOMMENT = ${ODE_HOME}
TRICK_SWIG_EXCLUDE = ${ODE_HOME}
TRICK_CFLAGS += -I${TRICK_HOME}/trick_models -I${ODE_HOME}/include -I${ODE_HOME}