<P>Hi,</P>
<P>I try to generate preprocessed files with gcc (gcc -E) and&nbsp;ADD_CUSTOM_COMMAND.</P>
<P>I use INCLUDE_DIRECTORIES&nbsp;in order to specify where the include files are&nbsp;but this has not effect and so gcc generates an error :</P>
<P><FONT color=#000080 size=2></FONT>&nbsp;</P>
<P><FONT color=#000080 size=2>ADD_CUSTOM_COMMAND</FONT><FONT size=2>(OUTPUT </FONT><FONT color=#7f0055 size=2>hello.pp.c</P></FONT><FONT size=2>
<P align=left>COMMAND </FONT><FONT color=#7f0055 size=2>${CMAKE_C_COMPILER}</FONT><FONT size=2>&nbsp;-E&nbsp;</FONT><FONT color=#7f0055 size=2>hello.c</FONT><FONT size=2>&nbsp;&gt;&nbsp;hello.pp.c</FONT><FONT size=2> </P>
<P align=left>MAIN_DEPENDENCY hello.pp.c</FONT><FONT size=2>) </FONT></P>
<P align=left><FONT size=2></FONT>&nbsp;</P>
<P align=left><FONT size=2>hello.c :</FONT></P>
<P align=left>&nbsp;</P><B><U><FONT color=#7f0055 size=2>
<P align=left>#include</B></FONT><FONT size=2> </FONT><FONT color=#2a00ff size=2>&lt;iostream.h&gt;</P></U></FONT><FONT size=2>
<P align=left></P></FONT><B><U><FONT color=#7f0055 size=2>
<P align=left>#include</B></FONT><FONT size=2> </FONT><FONT color=#2a00ff size=2>"hello.h"</P></U></FONT><FONT size=2>
<P align=left></P></FONT><B><FONT color=#7f0055 size=2>
<P align=left>void</B></FONT><FONT size=2> <B>main</B>()</P>
<P align=left>{</P>
<P align=left><U>std::</U>cout &lt;&lt; </FONT><FONT color=#2a00ff size=2>"Hello !</FONT><FONT size=2>&lt;&lt; std::endl;</P>
<P>}</P></FONT><FONT size=2>
<P>&nbsp;</P>
<P>...and I don't want to add include file&nbsp;in <FONT color=#000080>ADD_CUSTOM_COMMAND</FONT>...</P>
<P>&nbsp;</P>
<P>Any idea ?</P>
<P>Thanks for help.<FONT color=#000080 size=2></FONT></P>
<P align=left></FONT>Sébastien</P><br>

<br><hr><A href="http://r.voila.fr/r?ref=signature_mail_voila_musiline_6&url=http://musiline.voila.fr/resume/3599">Écoutez gratuitement Amy Winehouse sur Voila</A> et découvrez d'autres titres en affinité avec vos goûts musicaux !</DIV>