1
2
3
4
5
6 #include <cmajor/cmmid/BackEnd.hpp>
7 #include <cmajor/cmmid/LlvmBackEnd.hpp>
8 #ifdef _WIN32
9 #include <cmajor/cmmid/CmsxBackEnd.hpp>
10 #endif
11 #include <cmajor/cmmid/CmcppBackEnd.hpp>
12
13 namespace cmajor { namespace mid {
14
15 LLvmBackEnd llvmBackEnd;
16 #ifdef _WIN32
17
18 #endif
19 CmcppBackEnd cmcppBackEnd;
20
21 BackEnd* backEnd = &llvmBackEnd;
22
23 BackEnd::~BackEnd()
24 {
25 }
26
27 void SetBackEnd(BackEndKind backEndKind)
28 {
29 switch (backEndKind)
30 {
31 case BackEndKind::llvmBackEnd: backEnd = &llvmBackEnd; break;
32 #ifdef _WIN32
33
34 #endif
35 case BackEndKind::cmcppBackEnd: backEnd = &cmcppBackEnd; break;
36 }
37 }
38
39 BackEndKind GetBackEnd()
40 {
41 return backEnd->GetBackEndKind();
42 }
43
44 } }