Variable Block
The variable
block defines a variable that can be provided using the commandline.
Example Usage
# define config variable - the default value is used if not provided via --variable
variable config {
description = "configuration to build"
default = "Debug"
}
Argument Reference
The following arguments are supported:
description
- (Optional) Description of the variable.default
- (Optional) Default value for the variable. It must evaluate to scalar if provided.
Variable override
Variables must be declared in WORKSPACE.
Terrabuild supports variable overriding using this order (first one wins):
- Environment variable: use
TB_VAR_xxx
to override a variable (withxxx
the variable name). - Command line argument: use
--variable
switch when building a target.
Last updated on