1 /**
2  This file is never actually used in production. It owes its existence
3  to allowing the UTs to build and flycheck to not complain.
4  */
5 
6 module reggae.config;
7 
8 import reggae.types;
9 import reggae.options;
10 import reggae.ctaa;
11 
12 version(minimal) {
13     enum isDubProject = false;
14 } else {
15     enum isDubProject = true;
16 }
17 
18 
19 version(DigitalMars)
20     enum dCompiler = "dmd";
21 else version(LDC)
22     enum dCompiler = "ldc2";
23 else version(GNU)
24     enum dCompiler = "gdc";
25 else
26     static assert(false, "Unknown D compiler");
27 
28 
29 immutable Options gDefaultOptions = Options(Backend.ninja,
30             "",
31             "",
32             "",
33             defaultCC,
34             defaultCXX,
35             dCompiler,
36             false,
37             false,
38             true, //perModule only for UTs, false in real world
39             isDubProject,
40             false,
41 );
42 
43 Options gOptions = gDefaultOptions.dup;
44 
45 Options options() @safe nothrow {
46     return gOptions;
47 }
48 
49 void setOptions(Options options) {
50     gOptions = options;
51 }
52 
53 void setDefaultOptions() {
54     gOptions = gDefaultOptions.dup;
55 }
56 
57 enum userVars = AssocList!(string, string)();
58 
59 version(minimal) {}
60 else {
61     import reggae.dub.info;
62     import reggae.ctaa;
63 
64     enum dubInfo = ["default": DubInfo() ];
65     enum configToDubInfo = AssocList!(string, DubInfo)();
66 }