Skip to content
Manu Evans edited this page Mar 30, 2015 · 3 revisions

Home > [Scripting Reference](Scripting Reference) > configurations


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.

Applies To

Solutions only.

Parameters

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.

Return Value

The function returns the current list of configuration names for the active solution.

Examples

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()
Clone this wiki locally