<br><br><div class="gmail_quote">Le 7 avril 2012 20:17, Yaakov Davis <span dir="ltr"><<a href="mailto:yaakov.davis@gmail.com">yaakov.davis@gmail.com</a>></span> a écrit :<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><span>I want to programatically define a symbol, e.g. FOO, such that the code "#if defined(FOO)" will evaluate to true during pre-processing. </span><div>How do I that?<div><br></div></div>
<div>I tried addMacroDef("FOO"), and other methods, but to no avail.</div></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote><div> </div></div>Either:<br><br>#define FOO<br><br>in the code or<br><br>-DFOO<br><br>on the command line during the compilation (for gcc and clang at least)<br><br>-- Matthieu<br>