-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.cpp
More file actions
33 lines (29 loc) · 911 Bytes
/
test.cpp
File metadata and controls
33 lines (29 loc) · 911 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "mkn/kul/signal.hpp"
#include "mkn/kul/yaml.hpp"
#include <maiken.hpp>
std::string const yArgs = "with: numpy";
int main(int argc, char* argv[]) {
mkn::kul::Signal sig;
try {
YAML::Node node = mkn::kul::yaml::String(yArgs).root();
char* argv2[2] = {argv[0], (char*)"-O"};
auto app = (maiken::Application::CREATE(2, argv2))[0];
auto loader(maiken::ModuleLoader::LOAD(*app));
loader->module()->init(*app, node);
loader->module()->compile(*app, node);
loader->module()->link(*app, node);
loader->module()->pack(*app, node);
loader->unload();
for(auto const inc : app->includes()) KLOG(INF) << inc.first;
} catch (mkn::kul::Exception const& e) {
KLOG(ERR) << e.what();
return 2;
} catch (std::exception const& e) {
KERR << e.what();
return 3;
} catch (...) {
KERR << "UNKNOWN EXCEPTION TYPE CAUGHT";
return 5;
}
return 0;
}