-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathProjectTypes.cs
1633 lines (1378 loc) · 43.1 KB
/
ProjectTypes.cs
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Xml.Serialization;
/// <summary>
/// Custom class for mapping enumeration values to premake configuration tag.
/// </summary>
public class FunctionNameAttribute : Attribute
{
/// <summary>
/// function name itself.
/// </summary>
public String tag;
/// <summary>
/// function name attribute
/// </summary>
public FunctionNameAttribute(String s)
{
tag = s;
}
}
/// <summary>
/// Specifies whether or not to use precompiled headers
/// </summary>
public enum EPrecompiledHeaderUse
{
/// <summary>
/// Create precompiled headers
/// </summary>
Create,
/// <summary>
/// Use precompiled headers
/// </summary>
Use,
/// <summary>
/// Default value (not initialized)
/// </summary>
NotUsing,
/// <summary>
/// Not available in project file, but this is something we indicate that we haven't set value for precompiled headers.
/// </summary>
ProjectDefault
}
/// <summary>
/// Exception Handling Model
/// </summary>
public enum EExceptionHandling
{
/// <summary>
/// The exception-handling model that catches both asynchronous (structured) and synchronous (C++) exceptions. (/EHa)
/// </summary>
Async,
/// <summary>
/// Both C++ and C functions can throw exceptions (/EHs)
/// </summary>
SyncCThrow,
/// <summary>
/// C++ functions can throw exceptions, C functions don't throw exceptions (/EHsc)
/// </summary>
Sync,
/// <summary>
/// Functions assumed not to throw exceptions (/EH-)
/// </summary>
NoExceptionHandling,
/// <summary>
/// Functions assumed not to throw exceptions (-fexceptions)
/// </summary>
Enabled = SyncCThrow,
/// <summary>
/// Functions assumed not to throw exceptions (-fno-exceptions)
/// </summary>
Disabled = NoExceptionHandling,
/// <summary>
/// -funwind-tables
/// </summary>
UnwindTables,
/// <summary>
/// Default value, not saved in .vcxproj project file
/// </summary>
ProjectDefault
}
/// <summary>
/// Run-Time Error Checks
/// </summary>
public enum EBasicRuntimeChecks
{
/// <summary>
/// Stack Frames, /RTCs - Enables stack frame run-time error checking.
/// </summary>
StackFrameRuntimeCheck,
/// <summary>
/// Uninitialized Variables, /RTCu - Reports when a variable is used without having been initialized.
/// </summary>
UninitializedLocalUsageCheck,
/// <summary>
/// Both, /RTC1 - Equivalent of StackFrameRuntimeCheck + UninitializedLocalUsageCheck.
/// </summary>
EnableFastChecks,
/// <summary>
/// No Run-time checks.
/// </summary>
Default,
/// <summary>
/// Not present in .vcxproj, sets to project default value
/// </summary>
ProjectDefault
}
/// <summary>
/// Specifies the level of warning to be generated by the compiler.
/// </summary>
public enum EWarningLevel
{
/// <summary>
/// Level 0 disables all warnings.
/// </summary>
TurnOffAllWarnings,
/// <summary>
/// Level 1 displays severe warnings. Level 1 is the default setting.
/// </summary>
Level1,
/// <summary>
/// Level 2 displays all level 1 warnings and warnings that are less severe than level 1.
/// </summary>
Level2,
/// <summary>
/// Level 3 displays all level 2 warnings and all other warnings that are recommended for production purposes.
/// </summary>
Level3,
/// <summary>
/// Level 4 displays all level 3 warnings and informational warnings. We recommend that you use this option only to provide lint-like warnings.
/// However, for a new project, it may be best to use /W4 in all compilations; this will ensure the fewest possible hard-to-find code defects.
/// </summary>
Level4,
/// <summary>
/// Displays all /W4 warnings and any other warnings that are not included in /W4—for example, warnings that are off by default.
/// </summary>
EnableAllWarnings
}
/// <summary>
/// Defines what needs to be done with given item. Not all project types support all enumerations - for example
/// packaging projects / C# projects does not support CustomBuild.
///
/// Order of IncludeType must be the same as appear in .vcxproj (first comes first)
/// </summary>
public enum IncludeType
{
/// <summary>
/// C# references to .net assemblies
/// </summary>
Reference,
/// <summary>
/// Header file (.h)
/// </summary>
ClInclude,
/// <summary>
/// Source codes (.cpp) files
/// </summary>
ClCompile,
/// <summary>
/// .rc / resource files.
/// </summary>
ResourceCompile,
/// <summary>
/// Any custom file with custom build step
/// </summary>
CustomBuild,
/// <summary>
/// .def / .bat
/// </summary>
None,
/// <summary>
/// .ico files.
/// </summary>
Image,
/// <summary>
/// .txt files.
/// </summary>
Text,
// Following enumerations are used in android packaging project (.androidproj)
Content,
AntBuildXml,
AndroidManifest,
AntProjectPropertiesFile,
/// <summary>
/// For Android package project: Reference to another project, which needs to be included into package.
/// </summary>
ProjectReference,
/// <summary>
/// Intentionally not valid value, so can be replaced with correct one. (Visual studio does not supports one)
/// </summary>
Invalid,
/// <summary>
/// C# - source codes to compile
/// </summary>
Compile,
/// <summary>
/// Android / Gradle project, *.template files.
/// </summary>
GradleTemplate,
/// <summary>
/// .java - source codes to compile
/// </summary>
JavaCompile,
/// <summary>
/// Native Visualization file.
/// </summary>
Natvis
}
/// <summary>
/// Defines debug information format.
/// </summary>
public enum EDebugInformationFormat
{
/// <summary>
/// Applicable for windows projects only. /ZI compiler flag.
/// </summary>
EditAndContinue,
/// <summary>
/// Applicable for windows and android projects
/// </summary>
None,
/// <summary>
/// Applicable for windows projects only
/// </summary>
OldStyle,
/// <summary>
/// Applicable for windows projects only. /Zi compiler flag.
/// </summary>
ProgramDatabase,
/// <summary>
/// Applicable for android projects only.
/// </summary>
LineNumber,
/// <summary>
/// Applicable for android projects only.
/// </summary>
FullDebug,
/// <summary>
/// Just some value, just to indicate that enumeration value is invalid.
/// </summary>
Invalid
}
/// <summary>
/// C Language standard
/// </summary>
public enum ECLanguageStandard
{
ProjectDefault,
c89,
c99,
c11,
gnu99,
gnu11
}
/// <summary>
/// C++ Language standard
/// </summary>
public enum ECppLanguageStandard
{
ProjectDefault,
cpp98,
cpp11,
cpp1y,
gnupp98,
gnupp11,
gnupp1y
}
/// <summary>
/// Configuration class which configures project as well as individual file entries.
/// </summary>
[DebuggerDisplay("Configuration( confName:'{confName}' )")]
public class FileConfigurationInfo
{
/// <summary>
/// For debugging purposes - specifies configuration name (Debug|Win32) with which given configuration is accosiated with.
/// </summary>
public String confName;
//--------------------------------------------------------------------------------------------
// Following fields are located under following XML nodes
// ItemDefinitionGroup\
// ClCompile
// Link
// ItemGroup\
// ClCompile
//--------------------------------------------------------------------------------------------
/// <summary>
/// Precompile header - use or create.
/// </summary>
public EPrecompiledHeaderUse PrecompiledHeader = EPrecompiledHeaderUse.ProjectDefault;
/// <summary>
/// When set to true - disabled from build.
/// </summary>
public bool ExcludedFromBuild = false;
/// <summary>
/// Defines, ';' separated list.
/// </summary>
public String PreprocessorDefinitions = "";
/// <summary>
/// Additional #using Directories, ';' separated list.
/// </summary>
public String AdditionalUsingDirectories = "";
/// <summary>
/// Additional Include Directories, ';' separated list.
/// </summary>
public String AdditionalIncludeDirectories = "";
/// <summary>
/// List of warning to disable, ';' separated list.
/// </summary>
public String DisableSpecificWarnings = "";
/// <summary>
/// Exception Handling Model
/// </summary>
public EExceptionHandling ExceptionHandling = EExceptionHandling.ProjectDefault;
/// <summary>
/// Gets xml tag for .vcxproj
/// </summary>
public String getExceptionHandlingValue(EKeyword keyword)
{
bool isCLangGccCompiler = keyword == EKeyword.Android;
switch (ExceptionHandling)
{
default:
case EExceptionHandling.Enabled: // == SyncCThrow
return (isCLangGccCompiler) ? "Enabled" : "SyncCThrow";
case EExceptionHandling.Async:
return (isCLangGccCompiler) ? "Enabled": "Async";
case EExceptionHandling.Disabled: // == NoExceptionHandling
return (isCLangGccCompiler) ? "Disabled" : "false";
case EExceptionHandling.Sync:
return (isCLangGccCompiler) ? "Enabled" : "Sync";
case EExceptionHandling.UnwindTables:
return (isCLangGccCompiler) ? "UnwindTables" : "SyncCThrow";
}
}
/// <summary>
/// Run-Time Error Checks
/// </summary>
public EBasicRuntimeChecks BasicRuntimeChecks = EBasicRuntimeChecks.ProjectDefault;
/// <summary>
/// In windows projects only: Set to true if includes needs to be shown. Used for debug purposes, not loaded by script as configuration parameter.
/// </summary>
public bool ShowIncludes = false;
/// <summary>
/// obj / lib files, ';' separated list.
/// On windows platform can include also libraries, on android 'LibraryDependencies' specifies library files.
/// </summary>
public String AdditionalDependencies = "";
/// <summary>
/// Android specific: Additional libraries to link
/// </summary>
public String LibraryDependencies = "";
/// <summary>
/// Additional directory from where to search obj / lib files, ';' separated list.
/// </summary>
public String AdditionalLibraryDirectories = "";
/// <summary>
/// Output filename (.obj file)
/// </summary>
public String ObjectFileName;
public String XMLDocumentationFileName;
/// <summary>
/// Precompiled header file
/// </summary>
public String PrecompiledHeaderFile = "stdafx.h";
/// <summary>
/// Android specific.
/// </summary>
public ECompileAs CompileAs = ECompileAs.Default;
/// <summary>
/// Optimization level. (MaxSpeed is default value for each project configuration, for each file configuration - it's ProjectDefault)
/// </summary>
public EOptimization Optimization = EOptimization.MaxSpeed;
/// <summary>
/// Gets optimization level, set for specific project type.
/// </summary>
/// <param name="p">Project for which to query</param>
public EOptimization getOptimization( Project p )
{
if( p.Keyword == EKeyword.Android && Optimization == EOptimization.MinSpace )
return EOptimization.MinSize;
if( p.Keyword != EKeyword.Android && Optimization == EOptimization.MinSize )
return EOptimization.MinSpace;
return Optimization;
}
/// <summary>
/// Run-time library
/// </summary>
public ERuntimeLibrary RuntimeLibrary = ERuntimeLibrary.NotSet;
/// <summary>
/// Allows the compiler to package individual functions in the form of packaged functions (COMDATs).
/// </summary>
public bool FunctionLevelLinking = false;
/// <summary>
/// Enables minimal rebuild, which determines whether C++ source files that include changed C++ class definitions (stored in header (.h) files) need to be recompiled.
/// (/Gm option)
/// </summary>
public bool? MinimalRebuild = null;
/// <summary>
/// Replaces some function calls with intrinsic or otherwise special forms of the function that help your application run faster.
/// </summary>
public bool IntrinsicFunctions = false;
/// <summary>
/// Some sort of linker optimization flag: COMDAT folding
/// </summary>
public bool EnableCOMDATFolding = false;
/// <summary>
/// Eliminates functions and data that are never referenced
/// </summary>
public bool OptimizeReferences = false;
/// <summary>
/// Set to true to enable profiling (/PROFILE linker flag)
/// </summary>
public bool Profile = false;
/// <summary>
/// Format of debug information.
/// </summary>
public EDebugInformationFormat DebugInformationFormat = EDebugInformationFormat.Invalid;
/// <summary>
/// Gets visual studio default format for specific configuration.
/// </summary>
/// <param name="confName">configuration name (E.g. Debug|Win32) for which to query, null if use this configuration</param>
/// <returns>Default value</returns>
public EDebugInformationFormat getDebugInformationFormatDefault( String confName )
{
String platform;
if( confName != null )
platform = confName.Split('|')[1];
else
platform = this.confName.Split('|')[1];
if (platform.ToLower() == "win32" || platform == "x86")
return EDebugInformationFormat.EditAndContinue;
if (platform == "x64")
return EDebugInformationFormat.ProgramDatabase;
// Android projects does not have "default" configuration, so they needs to be specified anyway.
if (platform == "ARM" || platform == "ARM64")
return EDebugInformationFormat.Invalid;
if (SolutionProjectBuilder.isDeveloper())
{
// Default needs to be checked from Visual studio.
Debugger.Break();
}
return EDebugInformationFormat.ProgramDatabase;
}
/// <summary>
/// Build with Multiple Processes -
/// Windows: "/MP" - can be specified on file level, not sure why
/// Android: "UseMultiToolTask" - only on project level
/// </summary>
public bool MultiProcessorCompilation = false;
/// <summary>
/// Custom build step for includeType.CustomBuild specification. Can be null if not defined.
/// </summary>
public CustomBuildRule customBuildRule;
/// <summary>
/// Additional compiler options
/// </summary>
public String ClCompile_AdditionalOptions = "";
/// <summary>
/// Additional linker options
/// </summary>
public String Link_AdditionalOptions = "";
/// <summary>
/// Android: Enable run-time type information
/// </summary>
public bool RuntimeTypeInfo = false;
/// <summary>
/// Android: C Language Standard
/// </summary>
public ECLanguageStandard CLanguageStandard = ECLanguageStandard.ProjectDefault;
/// <summary>
/// Android: C++ Language Standard
/// </summary>
public ECppLanguageStandard CppLanguageStandard = ECppLanguageStandard.ProjectDefault;
/// <summary>
/// Threat warning as error.
/// </summary>
public bool TreatWarningAsError = false;
}
/// <summary>
/// Information about that particular file.
/// </summary>
[DebuggerDisplay("{relativePath} ({includeType})")]
public class FileInfo
{
/// <summary>
/// Include type, same as specified in .vcxproj / .androidproj.
/// </summary>
public IncludeType includeType;
/// <summary>
/// Relative path to file (from project path perspective)
/// </summary>
public String relativePath;
/// <summary>
/// When includeType == ProjectReference - specifies referenced project guid. Includes guid brackets - '{'/'}'
/// </summary>
public String Project;
/// <summary>
/// C# - location of .dll assembly
/// </summary>
public String HintPath;
/// <summary>
/// "Copy Local" = true|false. This option is by default true for local assemblies and false for system assemblies.
/// </summary>
public bool? Private;
/// <summary>
/// Copy Local Satellite Assemblies
/// </summary>
public bool CopyLocalSatelliteAssemblies = true;
/// <summary>
/// Reference Output Assembly
/// </summary>
public bool ReferenceOutputAssembly = true;
/// <summary>
/// Will be used to determine how to sort options, reflects to bool copy options above.
/// </summary>
/// <returns></returns>
public int GetSortTag()
{
int tag = 0;
if (ReferenceOutputAssembly)
tag += 1;
if (CopyLocalSatelliteAssemblies)
tag += 2;
if (Private.HasValue)
if( Private.Value )
tag += 8;
else
tag += 4;
return tag;
}
/// <summary>
/// Queries default value for specific field.
/// </summary>
/// <param name="field">Field name</param>
public bool GetDefaultValue(String field)
{
switch (field)
{
default:
//CopyLocalSatelliteAssemblies or ReferenceOutputAssembly
return true;
case "Private":
if (HintPath == null)
return false;
return true;
}
}
/// <summary>
/// Gets Private,CopyLocalSatelliteAssemblies,ReferenceOutputAssembly as call arguments, e.g. "true, false, false"
/// </summary>
public String GetCopyFlagsAsCallParameters()
{
String r = "";
if (!ReferenceOutputAssembly)
r = ",false";
if (r != "" || !CopyLocalSatelliteAssemblies)
r = "," + CopyLocalSatelliteAssemblies.ToString().ToLower() + r;
if (r != "")
{
if (Private.HasValue)
r = Private.Value.ToString().ToLower() + r;
else
r = (HintPath != null).ToString().ToLower();
}
else {
if (Private.HasValue)
r = Private.Value.ToString().ToLower();
}
return r;
}
/// <summary>
/// Per configuration specific file configuration. It's acceptable for this list to have 0 entries if no file specific configuration
/// is introduced.
/// </summary>
public List<FileConfigurationInfo> fileConfig = new List<FileConfigurationInfo>();
}
/// <summary>
/// Custom build tool properties.
/// </summary>
[DebuggerDisplay("Custom Build Tool '{Message}'")]
public class CustomBuildRule
{
/// <summary>
/// Visual studio: Command line
/// </summary>
[XmlElementAttribute( Order = 1 )]
public String Command = "";
/// <summary>
/// Visual studio: description. Use empty string to supress message printing.
/// </summary>
[XmlElementAttribute( Order = 2 )]
public String Message = "Performing Custom Build Tools";
/// <summary>
/// Visual studio: outputs
/// </summary>
[XmlElementAttribute( Order = 3 )]
public String Outputs = "";
/// <summary>
/// Visual studio: additional dependencies
/// </summary>
[XmlElementAttribute( Order = 4 )]
public String AdditionalInputs = "";
/// <summary>
/// Specify whether the inputs and outputs files with specific extension are passed to linker.
/// </summary>
[XmlElementAttribute( Order = 5 )]
public bool LinkObjects = true;
/// <summary>
/// Probably unused field. Added to satisfy code when loading project.
/// </summary>
[XmlElementAttribute( Order = 6 )]
public bool ExcludedFromBuild = false;
/// <summary>
/// Gets class instance as one xml string.
/// </summary>
public override string ToString()
{
XmlSerializer ser = new XmlSerializer(typeof(CustomBuildRule), typeof(CustomBuildRule).GetNestedTypes());
using (var ms = new MemoryStream())
{
ser.Serialize(ms, this);
return Encoding.UTF8.GetString(ms.ToArray());
}
}
/// <summary>
/// Decodes class from string
/// </summary>
/// <param name="inS">xml string to deserialize</param>
/// <returns>CustomBuildRule class instance</returns>
public static CustomBuildRule FromString(String inS)
{
XmlSerializer ser = new XmlSerializer(typeof(CustomBuildRule), typeof(CustomBuildRule).GetNestedTypes());
using (TextReader reader = new StringReader(inS))
{
return (CustomBuildRule)ser.Deserialize(reader);
}
}
}
/// <summary>
/// Project type
/// </summary>
public enum EConfigurationType
{
/// <summary>
/// .exe
/// </summary>
[FunctionName("Application")]
Application = 0,
/// <summary>
/// .dll
/// </summary>
[FunctionName("SharedLib")]
DynamicLibrary,
/// <summary>
/// .lib or .a
/// </summary>
[FunctionName("StaticLib")]
StaticLibrary,
/// <summary>
/// Android gradle project: Library (.aar/.jar)
/// </summary>
[FunctionName("Library")]
Library,
/// <summary>
/// Utility project
/// </summary>
[FunctionName("Utility")]
Utility,
/// <summary>
/// This value does not physically exists in serialized form in .vcxproj, used only for generation of C# script.
/// </summary>
[FunctionName("ConsoleApp")]
ConsoleApplication
};
/// <summary>
/// Character set - unicode MBCS.
/// </summary>
public enum ECharacterSet
{
/// <summary>
/// Character set is not specified
/// </summary>
[FunctionName("NotSet")]
NotSet = 0,
/// <summary>
/// Unicode
/// </summary>
[FunctionName("Unicode")]
Unicode = 0,
/// <summary>
/// Ansi
/// </summary>
[FunctionName("MBCS")]
MultiByte
}
/// <summary>
/// Clr support
/// </summary>
[Description("")] // Marker to switch Enum value / Description when parsing
public enum ECLRSupport
{
/// <summary>
/// Common Language Runtime Support is not enabled or use same value as parent project is configured.
/// </summary>
[Description("false")]
None = 0,
/// <summary>
/// Common Language Runtime Support (/clr)
/// </summary>
[Description("true")]
True,
/// <summary>
/// Pure MSIL Common Language Runtime Support (/clr:pure)
/// </summary>
[Description("Pure")]
Pure,
/// <summary>
/// Safe MSIL Common Language Runtime Support (/clr:safe)
/// </summary>
[Description("Safe")]
Safe
}
/// <summary>
/// Enables cross-module optimizations by delaying code generation to link-time; requires that linker option 'Link Time Code Generation' be turned on.
/// </summary>
[Description("")] // Marker to switch Enum value / Description when parsing
public enum EWholeProgramOptimization
{
/// <summary>
/// Visual studio default.
/// </summary>
[Description("false")]
NoWholeProgramOptimization = 0,
/// <summary>
/// Yes / /GL compiler option.
/// </summary>
[Description("true")]
UseLinkTimeCodeGeneration,
[Description("PGInstrument")]
ProfileGuidedOptimization_Instrument,
[Description("PGOptimize")]
ProfileGuidedOptimization_Optimize,
[Description("PGUpdate")]
ProfileGuidedOptimization_Update
}
/// <summary>
/// Binary image format / target
/// </summary>
public enum ESubSystem
{
/// <summary>
/// Not specified
/// </summary>
NotSet,
/// <summary>
/// Windows application
/// </summary>
Windows,
/// <summary>
/// Console application
/// </summary>
Console,
Native,
EFI_Application,
EFI_Boot_Service_Driver,
EFI_ROM,
EFI_Runtime,
POSIX
}
/// <summary>
/// How to optimize code ?
/// </summary>
public enum EOptimization
{
[FunctionName("custom")]
Custom,
/// <summary>
/// No optimizations
/// </summary>
[FunctionName("off")]
Disabled,
/// <summary>
/// Minimize Size, in Windows projects
/// </summary>
[FunctionName("size")]
MinSpace,
/// <summary>
/// Minimize Size, In Android projects
/// </summary>
[FunctionName( "size" )]
MinSize,
/// <summary>
/// Maximize Speed
/// </summary>
[FunctionName("speed")]
MaxSpeed,
/// <summary>
/// Full Optimization
/// </summary>
[FunctionName("on")]
Full,
/// <summary>
/// Not available in project file, but this is something we indicate that we haven't set value
/// </summary>
[FunctionName("default")]
ProjectDefault
}
/// <summary>
/// Run-time library
/// </summary>
public enum ERuntimeLibrary
{
/// <summary>
/// Just artificial value to tell that value was not initialized.
/// </summary>
NotSet,
/// <summary>
/// Multi-threaded (/MT)
/// </summary>
MultiThreaded,
/// <summary>
/// Multi-threaded Debug (/MTd)
/// </summary>
MultiThreadedDebug,
/// <summary>
/// Multi-threaded (/MT)
/// </summary>
MultiThreadedDLL,
/// <summary>
/// Multi-threaded Debug DLL (/MDd)
/// </summary>
MultiThreadedDebugDLL
}