Hello,
this is a follow-up on How to use Conditional Evaluation using $if(){}{} (http://forums.codeblocks.org/index.php/topic,22022.msg149887.html#msg149887). I'm trying the same as the original poster. For testing purposes I currently use an abbreviation at "Settings" => "Editor..." => "Abbreviations".
With I get Debug or Release, depending on my Target.
But with $if($TARGET_NAME == "Debug"){MYDEBUG}{MYRELEASE}
I always get MYRELEASE.
I also tried: The result is always the same.
The original thread mentions a bug, but I'm not sure about the discussion in the referred ticket. Is the bug fixed in Release 17.12?
TIA, BackInTheSandbox
Yes the bug is the same and it is still open, no comments, so i will commit it. This patch is not perfect but it is an improvement of infinite, because at the moment the if does not work at all ;)
You probably can use squirrel scripting to do what you want...
[[if(ReplaceMacros(_T("$TARGET_NAME")).Matches(_T("Debug"))){print("MYDEBUG");} else {print("MYRELEASE");}]]