Skip to content

workspace

starkos edited this page Apr 10, 2021 · 5 revisions

⚠️ We have a new website! Visit now for the most update to date documentation.
       This wiki is no longer being maintained.


Creates a new workspace.

workspace ("name")

Workspaces are the top-level objects in a Premake build script, and are synonymous with a Visual Studio solution. Each workspace contains one or more projects, which in turn contain the settings to generate a single binary target.

Parameters

name is a unique name for the workspace. If a workspace with the given name already exists, it is made active and returned.

If no name is given, the current workspace scope is returned, and also made active.

If "*" is used, the "root" configuration scope, which applies to all workspaces, is selected and nil is returned.

By default, the project name will be used as the file name of the generated project file; be careful with spaces and special characters. You can override this default with the filename call.

Availability

Premake 4.0 or later.

Examples

Create a new workspace named "MyWorkspace", with debug and release build configurations.

workspace "MyWorkspace"
   configurations { "Debug", "Release" }

See Also

Clone this wiki locally