diff options
author | Josh Blum | 2013-07-13 14:25:58 -0700 |
---|---|---|
committer | Josh Blum | 2013-07-13 14:25:58 -0700 |
commit | 9f1d8e892035a2e26cb2d06407722c0a7773e997 (patch) | |
tree | 55e91c92ace5e6d0719b5c2f9be3668a2ef708b5 /tmpl | |
parent | 15dc0eaa715f41c3ebc05ce7b455e129218148a9 (diff) | |
download | sandhi-9f1d8e892035a2e26cb2d06407722c0a7773e997.tar.gz sandhi-9f1d8e892035a2e26cb2d06407722c0a7773e997.tar.bz2 sandhi-9f1d8e892035a2e26cb2d06407722c0a7773e997.zip |
gras: minor tweaks to callable + gen script
Diffstat (limited to 'tmpl')
-rw-r--r-- | tmpl/callable.tmpl.hpp | 9 | ||||
-rw-r--r-- | tmpl/expand_template.py | 2 | ||||
-rwxr-xr-x | tmpl/regen_all.sh | 12 |
3 files changed, 16 insertions, 7 deletions
diff --git a/tmpl/callable.tmpl.hpp b/tmpl/callable.tmpl.hpp index 900bae4..f8d47b1 100644 --- a/tmpl/callable.tmpl.hpp +++ b/tmpl/callable.tmpl.hpp @@ -3,6 +3,11 @@ #ifndef INCLUDED_GRAS_CALLABLE_HPP #define INCLUDED_GRAS_CALLABLE_HPP +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning (disable:4251) // needs to have dll interface +#endif //_MSC_VER + #include <gras/gras.hpp> #include <PMC/PMC.hpp> #include <boost/shared_ptr.hpp> @@ -91,4 +96,8 @@ private: #include <gras/detail/callable.hpp> +#ifdef _MSC_VER +#pragma warning(pop) +#endif //_MSC_VER + #endif /*INCLUDED_GRAS_CALLABLE_HPP*/ diff --git a/tmpl/expand_template.py b/tmpl/expand_template.py index 3941fb2..1056e15 100644 --- a/tmpl/expand_template.py +++ b/tmpl/expand_template.py @@ -22,7 +22,7 @@ if __name__ == '__main__': in_path = sys.argv[1] out_path = sys.argv[2] tmpl = open(in_path, 'r').read() - for key in ['define', 'include', 'if', 'endif', 'else', 'ifdef', 'ifndef']: + for key in ['define', 'include', 'if', 'endif', 'else', 'ifdef', 'ifndef', 'pragma']: tmpl = tmpl.replace('#%s'%key, '\\#%s'%key) code = str(Template(tmpl, dict( MAX_ARGS=MAX_ARGS, expand=expand, diff --git a/tmpl/regen_all.sh b/tmpl/regen_all.sh index 53886c9..1627262 100755 --- a/tmpl/regen_all.sh +++ b/tmpl/regen_all.sh @@ -10,10 +10,10 @@ # And the build system does not depend on Cheetah templates. SCRIPT="`readlink -e $0`" -SCRIPTPATH="`dirname $SCRIPT`" -DEST=${SCRIPTPATH}/../include/gras +SRCDIR="`dirname $SCRIPT`" +DESTDIR=${SRCDIR}/../include/gras -python expand_template.py factory.tmpl.hpp ${DEST}/factory.hpp -python expand_template.py factory_detail.tmpl.hpp ${DEST}/detail/factory.hpp -python expand_template.py callable.tmpl.hpp ${DEST}/callable.hpp -python expand_template.py callable_detail.tmpl.hpp ${DEST}/detail/callable.hpp +python ${SRCDIR}/expand_template.py ${SRCDIR}/factory.tmpl.hpp ${DESTDIR}/factory.hpp +python ${SRCDIR}/expand_template.py ${SRCDIR}/factory_detail.tmpl.hpp ${DESTDIR}/detail/factory.hpp +python ${SRCDIR}/expand_template.py ${SRCDIR}/callable.tmpl.hpp ${DESTDIR}/callable.hpp +python ${SRCDIR}/expand_template.py ${SRCDIR}/callable_detail.tmpl.hpp ${DESTDIR}/detail/callable.hpp |