diff options
-rw-r--r-- | include/gras/callable.hpp | 9 | ||||
-rw-r--r-- | tmpl/callable.tmpl.hpp | 9 | ||||
-rw-r--r-- | tmpl/expand_template.py | 2 | ||||
-rwxr-xr-x | tmpl/regen_all.sh | 12 |
4 files changed, 25 insertions, 7 deletions
diff --git a/include/gras/callable.hpp b/include/gras/callable.hpp index b5003c1..fa07689 100644 --- a/include/gras/callable.hpp +++ b/include/gras/callable.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> @@ -207,4 +212,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/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 |