premake/website/docs/Project-API.md

14 KiB

Core APIs

API Brief
_ACTION The action that will be run
_ARGS Array of action args
_MAIN_SCRIPT
_MAIN_SCRIPT_DIR
_OPTIONS
_OS The currently targeted operating system
_PREMAKE_COMMAND
_PREMAKE_DIR
_PREMAKE_VERSION The version of the currently executing instance of Premake
_WORKING_DIR
architecture
atl Use Microsoft's Active Template Library
basedir
bindirs
buildaction
buildcommands
buildcustomizations
builddependencies
buildinputs
buildlog
buildmessage
buildoptions Additional build options (passed directly to compiler)
buildoutputs
buildrule
callingconvention Sets the function calling convention
cdialect
characterset Set the character encoding
cleancommands
cleanextensions
clr Use Microsoft's Common Language Runtime
compileas
compilebuildoutputs
configfile
configmap
configuration
configurations
copylocal
cppdialect
customtoolnamespace
debugargs
debugcommand
debugconnectcommands Debugger commands to execute on remote target connection
debugconstants
debugdir Working directory for debug session
debugenvs Env vars for debug session
debugextendedprotocol Use gdb 'extended' protocol; maintain a persistent connection
debugformat Format for embedded debug information
debugger
debuggertype
debuglevel
debugpathmap
debugport Port to use for remote debugging
debugremotehost Target for remote debugging
debugsearchpaths Search paths for source code while debugging
debugstartupcommands Debugger commands to execute on debugger startup
debugtoolargs
debugtoolcommand
defaultplatform
defaultplatform
defines
dependson
deploymentoptions
disablewarnings
display
display
docdir
docname
editandcontinue
editorintegration Enable or disable IDE integration
enablewarnings
endian
entrypoint Specify the program entry point function
exceptionhandling Enable or disable exception handling
external
externalrule
fatalwarnings
fileextension
filename
files
filter
flags
floatingpoint
floatingpointexceptions
forceincludes
forceusings
fpu
framework
functionlevellinking
gccprefix
group
headerdir
headername
icon
ignoredefaultlibraries Specify a list of default libraries to ignore
imageoptions
imagepath
implibdir
implibextension
implibname
implibprefix
implibsuffix
include
includedirs
includeexternal
inlining Tells the compiler when it should inline functions
intrinsics
kind
language
largeaddressaware
libdirs
linkbuildoutputs
linkgroups Turn on/off linkgroups for gcc/clang
linkoptions Additional linker options (passed directly to linker)
links
locale
location Specifies the directory for the generated workspace/project file
makesettings
namespace
nativewchar
nuget
nugetsource
objdir Output dir for object/intermediate files
optimize Optimization level
pchheader Precompiled header file
pchsource Precompiled header source file (which should build the PCH)
pic Position independent code
platforms
postbuildcommands
postbuildmessage
prebuildcommands
prebuildmessage
preferredtoolarchitecture
prelinkcommands
prelinkmessage
project
propertydefinition
rebuildcommands
resdefines
resincludedirs
resoptions
resourcegenerator
rtti Enable or disable runtime type information
rule
rules
runtime
sharedlibtype
startproject
strictaliasing
stringpooling
symbols Turn symbol generation on/off
symbolspath Allows you to specify the target location of the symbols
sysincludedirs
syslibdirs
system
tags
targetdir
targetextension
targetname
targetprefix
targetsuffix
toolset
toolsversion
undefines
usingdirs
uuid Set project GUID (for VS projects/workspaces)
vectorextensions Enable hardware vector extensions
versionconstants
versionlevel
vpaths
warnings
workspace

Builtin Extension APIs

The following API reference is for use with various built-in extensions.

D language APIs Brief
debugconstants Declare debug identifiers
debuglevel Declare debug level
docdir Output dir for ddoc generation
docname Filename for the ddoc output
headerdir Output dir for interface file generation
headername Filename for the interface (.di) file
versionconstants Declare version identifiers
versionlevel Declare version level
Xcode APIs Brief
xcodebuildsettings
xcodebuildresources