<P>Hi,</P>
<P>I try to generate preprocessed files with gcc (gcc -E) and ADD_CUSTOM_COMMAND.</P>
<P>I use INCLUDE_DIRECTORIES in order to specify where the include files are but this has not effect and so gcc generates an error :</P>
<P><FONT color=#000080 size=2></FONT> </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> -E </FONT><FONT color=#7f0055 size=2>hello.c</FONT><FONT size=2> > 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> </P>
<P align=left><FONT size=2>hello.c :</FONT></P>
<P align=left> </P><B><U><FONT color=#7f0055 size=2>
<P align=left>#include</B></FONT><FONT size=2> </FONT><FONT color=#2a00ff size=2><iostream.h></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 << </FONT><FONT color=#2a00ff size=2>"Hello !</FONT><FONT size=2><< std::endl;</P>
<P>}</P></FONT><FONT size=2>
<P> </P>
<P>...and I don't want to add include file in <FONT color=#000080>ADD_CUSTOM_COMMAND</FONT>...</P>
<P> </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>