Building from commandline, add -ubtargs"-MyArgument"
In Target.cs, read them like so, for example :
[CommandLine(Prefix = "-MyArgument")]
public bool MyArgument = false;
and then make it a definition like this:
ProjectDefinitions.Add(MyArgument ? "MYARG=1" : "MYARG=0");