Makeprojects
Loading...
Searching...
No Matches
makeprojects.defaults Namespace Reference

Module that contains the code to generate defaults. More...

Functions

 settings_from_name (configuration)
 Given a configuration name, set default settings.
 project_presets (project)
 Set the default settings for a project.
 configuration_presets (configuration)
 Set the default settings for a configuration.
 get_project_name (build_rules_list, working_directory, verbose=False, project_name=None)
 Determine the project name.
 get_project_type (build_rules_list, verbose=False, project_type=None)
 Determine the project type.
 get_platform (build_rules_list, verbose=False, platform=None)
 Determine the platforms to generate projects for.
 guess_ide (platform)
 Guess the IDE for a specific platform.
 get_ide (build_rules_list, verbose=False, ide=None, platform=None)
 Determine the IDEs to generate projects for.
 default_configuration_list (platform, ide)
 Create the default configurations.
 get_configuration_list (build_rules_list, configurations, platform, ide)
 Determine the configurations to generate projects for.

Variables

dict _CONFIGURATION_DEFAULTS
 Default settings for each configuration type.

Detailed Description

Module that contains the code to generate defaults.

Function Documentation

◆ configuration_presets()

makeprojects.defaults.configuration_presets ( configuration)

Set the default settings for a configuration.

Scan a configuration for a platform and an ide and set up compiler macros and other settings that are default for the specific platform.

Parameters
configurationConfiguration record to update.

◆ default_configuration_list()

makeprojects.defaults.default_configuration_list ( platform,
ide )

Create the default configurations.

Parameters
platformplatform being built.
ideIDE being generated for.
Returns
List strings with names of configurations.

◆ get_configuration_list()

makeprojects.defaults.get_configuration_list ( build_rules_list,
configurations,
platform,
ide )

Determine the configurations to generate projects for.

Scan the build_rules.py file for the command "configuration_list" and if found, use that list of strings to create configurations.

Parameters
build_rules_listList to append a valid build_rules file instance.
configurationsList of configuration names
platformPlatform building.
ideIDETypes for the ide generating for.
Returns
List of configuration strings to generate projects for.

◆ get_ide()

makeprojects.defaults.get_ide ( build_rules_list,
verbose = False,
ide = None,
platform = None )

Determine the IDEs to generate projects for.

Scan the build_rules.py file for the variable PROJECT_IDE, and if found use that IDETypes or string to lookup with IDETypes.lookup().

Parameters
build_rules_listList to append a valid build_rules file instance.
verboseBoolean, True for verbose output
ideProposed ide type.
platformPlatform to build for, used for guess_ide
Returns
IDE to generate project for.

◆ get_platform()

makeprojects.defaults.get_platform ( build_rules_list,
verbose = False,
platform = None )

Determine the platforms to generate projects for.

Scan the build_rules.py file for the variable PROJECT_PLATFORM, and if found use that list of PlatformTypes or strings to lookup with PlatformTypes.lookup().

Parameters
build_rules_listList to append a valid build_rules file instance.
verboseBoolean, True for verbose output
platformProposed platform type.
Returns
Platform to generate project for.

◆ get_project_name()

makeprojects.defaults.get_project_name ( build_rules_list,
working_directory,
verbose = False,
project_name = None )

Determine the project name.

Scan the build_rules.py file for the variable PROJECT_NAME, and if found use that string for the project name. Otherwise, use the name of the working folder.

Parameters
build_rules_listList of build_rules to iterate over.
working_directoryFull path name of the build_rules.py to load.
verboseBoolean, True if name is to be printed
project_nameString, project name override
Returns
Name of the project.

◆ get_project_type()

makeprojects.defaults.get_project_type ( build_rules_list,
verbose = False,
project_type = None )

Determine the project type.

Scan the build_rules.py file for the variable PROJECT_TYPE, and if found use that string for the project type. Otherwise, assume it's a command line tool.

Parameters
build_rules_listList of build_rules to iterate over.
verboseBoolean, True for verbose output
project_typeProposed project type.
Returns
ProjectTypes enumeration.

◆ guess_ide()

makeprojects.defaults.guess_ide ( platform)

Guess the IDE for a specific platform.

In cases where the platform is known, but the IDE is not, return the most likely IDE to use for building the platform.

Parameters
platformPlatform to build for.
Returns
IDETypes of the recommended IDE, or None if not known.

◆ project_presets()

makeprojects.defaults.project_presets ( project)

Set the default settings for a project.

Scan a project for a platform and an ide and set up compiler macros and other settings that are default for the specific platform.

Parameters
projectProject record to update.

◆ settings_from_name()

makeprojects.defaults.settings_from_name ( configuration)

Given a configuration name, set default settings.

Default names are Debug, Internal, Release, Release_LTCG, Profile, Profile_FastCap and CodeAnalysis. If the setting name is one of these, or a variant, settings like debug, optimization, short_code, or profile are preset.

Parameters
configurationConfiguration to update
Returns
configuration