Add a Macro to Target.hpp and check for a std::threads implementation in Yerbacon.hpp.
This commit is contained in:
parent
905e7e7e82
commit
bf5ca80c4d
@ -6,6 +6,10 @@
|
|||||||
#define YBCON_VERSION "UNKNOWN"
|
#define YBCON_VERSION "UNKNOWN"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __STDC_NO_THREADS__
|
||||||
|
#error "A valid std::threads implementation is required"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -36,15 +36,16 @@ 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;
|
||||||
switch (selected) {
|
switch (selected) {
|
||||||
#ifdef LUA_HPP
|
#ifdef LUA_HPP
|
||||||
case LUA: target = make_shared<LuaTarget>(LuaTarget()); break;
|
case LUA: ADDTARGET(LuaTarget)
|
||||||
#endif
|
#endif
|
||||||
#ifdef JS_HPP
|
#ifdef JS_HPP
|
||||||
case JS: target = make_shared<JsTarget>(JsTarget()); break;
|
case JS: ADDTARGET(JsTarget)
|
||||||
#endif
|
#endif
|
||||||
#ifdef PY_HPP
|
#ifdef PY_HPP
|
||||||
case PY: target = make_shared<PyTarget>(PyTarget()); break;
|
case PY: ADDTARGET(PyTarget)
|
||||||
#endif
|
#endif
|
||||||
case NONE:
|
case NONE:
|
||||||
default: {
|
default: {
|
||||||
|
Loading…
Reference in New Issue
Block a user