diff options
| author | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2017-09-24 23:06:45 -0400 |
|---|---|---|
| committer | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2017-09-25 14:36:01 -0400 |
| commit | f9e463bce2607c5136acc79ecd495f8b62b8e5ad (patch) | |
| tree | 7581d62804f8d484bf21e87be5bb7d73ee19abdd /SConstruct | |
| parent | 0a6446ff361f1674649e1625eb5868478d998091 (diff) | |
| download | redot-engine-f9e463bce2607c5136acc79ecd495f8b62b8e5ad.tar.gz | |
Use EnumVariable for choice-based build options.
Diffstat (limited to 'SConstruct')
| -rw-r--r-- | SConstruct | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/SConstruct b/SConstruct index 964222c7a0..3e6231cdc2 100644 --- a/SConstruct +++ b/SConstruct @@ -132,10 +132,10 @@ opts = Variables(customs, ARGUMENTS) # Target build options opts.Add('arch', "Platform-dependent architecture (arm/arm64/x86/x64/mips/etc)", '') -opts.Add('bits', "Target platform bits (default/32/64/fat)", 'default') +opts.Add(EnumVariable('bits', "Target platform bits", 'default', ('default', '32', '64', 'fat'))) opts.Add('p', "Platform (alias for 'platform')", '') -opts.Add('platform', "Target platform: any in " + str(platform_list), '') -opts.Add('target', "Compilation target (debug/release_debug/release)", 'debug') +opts.Add('platform', "Target platform (%s)" % ('|'.join(platform_list), ), '') +opts.Add(EnumVariable('target', "Compilation target", 'debug', ('debug', 'release_debug', 'release'))) opts.Add('tools', "Build the tools a.k.a. the Godot editor (yes/no)", 'yes') # Components @@ -152,7 +152,7 @@ opts.Add('extra_suffix', "Custom extra suffix added to the base filename of all opts.Add('unix_global_settings_path', "UNIX-specific path to system-wide settings. Currently only used for templates", '') opts.Add('verbose', "Enable verbose output for the compilation (yes/no)", 'no') opts.Add('vsproj', "Generate Visual Studio Project. (yes/no)", 'no') -opts.Add('warnings', "Set the level of warnings emitted during compilation (extra/all/moderate/no)", 'no') +opts.Add(EnumVariable('warnings', "Set the level of warnings emitted during compilation", 'no', ('extra', 'all', 'moderate', 'no'))) opts.Add('progress', "Show a progress indicator during build (yes/no)", 'yes') opts.Add('dev', "If yes, alias for verbose=yes warnings=all (yes/no)", 'no') @@ -186,7 +186,7 @@ opts.Add("LINKFLAGS", "Custom flags for the linker") for k in platform_opts.keys(): opt_list = platform_opts[k] for o in opt_list: - opts.Add(o[0], o[1], o[2]) + opts.Add(o) for x in module_list: opts.Add('module_' + x + '_enabled', "Enable module '" + x + "' (yes/no)", "yes") |
