Haxe: Are there defines indicating the current compilation target? -
does haxe have defines indicating current compilation target, can used conditional compilation?
yes, every haxe target has it's own define.
#if js trace("js"); #elseif php trace("php"); #elseif cpp trace("cpp"); #elseif java trace("java"); #elseif python trace("python"); #elseif neko trace("neko"); #elseif sys trace("sys"); #elseif flash trace("flash"); #elseif cs trace("cs"); #elseif macro trace("macro"); #end you can find more build-in compilation flags here:
http://haxe.org/manual/lf-condition-compilation-flags.htmlmore info conditional compilation:
http://haxe.org/manual/lf-condition-compilation.html
Comments
Post a Comment