Skip to content

Variables

Medha Lódurr edited this page Sep 11, 2018 · 17 revisions

Using Vars

You can define and using varaible inside commands They are always inside bracket '{' '}'

Example:

-c src.cpp -o obj/{_sPlatform}/MyProject/

You can set a variable using: -{YourVar}="Value"

Form

Variables require prefix followed by any uppercase letter

Usual variables prefix:

Prefix Description Example
s String -{sName} = "Bob"
p Path -{pExe} = "C:/Project/"
n Number -{nTotal} = 5
b Boolean -{bIsBool} = true

Built-in Vars List

Variable beginning with '_' have internal use by Cwc and have default value. You can also redefine these variables.


_sOpt : (Debug/O2/O3/OS)

Optimisation Level


_pOutput: (Path)

Current output directory


_pProject: (Path)

Current working directory


_pModule: (Path)

Current module directory (Lib or Toolchain)


Clone this wiki locally