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"
|
||||
#endif
|
||||
|
||||
#ifdef __STDC_NO_THREADS__
|
||||
#error "A valid std::threads implementation is required"
|
||||
#endif
|
||||
|
||||
#include <exception>
|
||||
#include <string_view>
|
||||
#include <string>
|
||||
|
@ -36,15 +36,16 @@ shared_ptr<Target> Target::forName(string_view name) {
|
||||
}
|
||||
}
|
||||
shared_ptr<Target> target;
|
||||
#define ADDTARGET(X) target = make_shared<X>(X()); break;
|
||||
switch (selected) {
|
||||
#ifdef LUA_HPP
|
||||
case LUA: target = make_shared<LuaTarget>(LuaTarget()); break;
|
||||
case LUA: ADDTARGET(LuaTarget)
|
||||
#endif
|
||||
#ifdef JS_HPP
|
||||
case JS: target = make_shared<JsTarget>(JsTarget()); break;
|
||||
case JS: ADDTARGET(JsTarget)
|
||||
#endif
|
||||
#ifdef PY_HPP
|
||||
case PY: target = make_shared<PyTarget>(PyTarget()); break;
|
||||
case PY: ADDTARGET(PyTarget)
|
||||
#endif
|
||||
case NONE:
|
||||
default: {
|
||||
|
Loading…
Reference in New Issue
Block a user