Don't break in the ADDTARGET macro of Target.hpp, and define class names of Py.hpp, Lua.hpp and Js.hpp to use them in Target.hpp.
This commit is contained in:
parent
ac195d413b
commit
4512909b23
|
@ -36,16 +36,19 @@ shared_ptr<Target> Target::forName(string_view name) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
shared_ptr<Target> target;
|
shared_ptr<Target> target;
|
||||||
#define ADDTARGET(X) target = make_shared<X>(X()); break;
|
#define ADDTARGET(X) target = make_shared<X>(X());
|
||||||
switch (selected) {
|
switch (selected) {
|
||||||
|
case LUA:
|
||||||
#ifdef LUA_HPP
|
#ifdef LUA_HPP
|
||||||
case LUA: ADDTARGET(LuaTarget)
|
ADDTARGET(LUA_HPP); break;
|
||||||
#endif
|
#endif
|
||||||
|
case JS:
|
||||||
#ifdef JS_HPP
|
#ifdef JS_HPP
|
||||||
case JS: ADDTARGET(JsTarget)
|
ADDTARGET(JS_HPP); break;
|
||||||
#endif
|
#endif
|
||||||
|
case PY:
|
||||||
#ifdef PY_HPP
|
#ifdef PY_HPP
|
||||||
case PY: ADDTARGET(PyTarget)
|
ADDTARGET(PY_HPP); break;
|
||||||
#endif
|
#endif
|
||||||
case NONE:
|
case NONE:
|
||||||
default: {
|
default: {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef JS_HPP
|
#ifndef JS_HPP
|
||||||
#define JS_HPP
|
#define JS_HPP JsTarget
|
||||||
|
|
||||||
struct JsTarget: Target {};
|
struct JsTarget: Target {};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef LUA_HPP
|
#ifndef LUA_HPP
|
||||||
#define LUA_HPP
|
#define LUA_HPP LuaTarget
|
||||||
|
|
||||||
struct LuaTarget: Target {};
|
struct LuaTarget: Target {};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef PY_HPP
|
#ifndef PY_HPP
|
||||||
#define PY_HPP
|
#define PY_HPP PyTarget
|
||||||
|
|
||||||
struct PyTarget: Target {};
|
struct PyTarget: Target {};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue