-
Notifications
You must be signed in to change notification settings - Fork 20
configurations
Home > [Scripting Reference](Scripting Reference) > configurations
The configurations function specifies the set of build configurations, such as "Debug" and "Release", for a solution.
#!lua
configurations { "names" }
A configuration encapsulates a collection of build settings, allowing the developer to easily switch between them. "Debug" and "Release" are the most common configurations, the former providing debugging information, and the latter providing optimizations.
The list of configurations must be specified before any projects are defined, and once a project has been defined the configuration list may no longer be changed.
Updated information is available on the new Premake wiki.
Solutions only.
names is a list of configuration names. Spaces are allowed, but may make using certain Premake features, such as a command-line configuration selection, more difficult.
The function returns the current list of configuration names for the active solution.
Specify debug and release configurations for a solution.
#!lua
solution "MySolution"
configurations { "Debug", "Release" }
Add additional configurations for a dynamic link library version.
#!lua
configurations { "Debug", "Release", "DebugDLL", "ReleaseDLL" }
You can retrieve the current list of configurations by calling the function with no parameters.
#!lua
local cfgs = configurations()