Macro: Get compiled target

27 views
Skip to first unread message

Jimmy Delas

unread,
May 16, 2014, 5:51:13 AM5/16/14
to haxe...@googlegroups.com
I'm not sure if this is possible since I found opposite opinions on this but I would like to get the compilation target within a macro.

I call this macro from other macros when I need it

macro private static function getCompilationTarget()
{
if (Context.defined("php"))
return macro "php";
else if (Context.defined("neko"))
return macro "neko";
return macro "?";
}


However, this code always return true for neko, no matter if it's php or neko.

The reason as explained here is because macro context is compiled in Neko.

However, Cauê recently said here it was possible to get the compile target with the method I used above.

Is it a nightly feature ? Or am I doing something wrong ?
Reply all
Reply to author
Forward
0 new messages