Thank you Eric. The section in the main CMakeLists.txt is as follows:<br><br>set (FILES &quot;&quot;)<br>message (&quot;Adding subdirectory host...&quot;)<br>include (host/CMakeLists.txt)<br><br>message (&quot;FILES = ${FILES}&quot;)<br>
foreach (FILE ${FILES})<br>    set (hostFiles ${hostFiles} host/${FILE})<br>endforeach (FILE)<br><br>message (&quot;hostFiles = ${hostFiles}&quot;)<br><br>add_executable (omap ${comdrvFiles} ${hostFiles})<br><br><br>The hostFiles variable when displayed using the message ( ) shown above shows the following:<br>
<br>hostFiles = host/fastboot.c;host/bootimg.c;host/engine.c;host/board_configuration.c;host/bootimg.c;host/engine.c;host/om<br>ap_protocol.c;host/output.c;host/pheriphalboot.c;host/protocol.c;host/usb_linux.c;host/util_linux.c<br>
<br>Even so, only compiles host/fastboot.c, which disolays a few warnings and then shows the error described.<br><br>In the CMakeLIsts.txt file from host/ directory, I only set the FILE variable with the list of files contained in that directory:<br>
<br>set(CMAKE_INCLUDE_CURRENT_DIR ON)<br><br>message (&quot;Entering host&#39;s CMakeLists&quot;)<br><br># Add the sources to the host sources Sistem variable:<br><br>message (&quot;Setting /host files, to include them in the build&quot;)<br>
set(FILES  fastboot.c bootimg.c engine.c)<br>set(FILES ${FILES} board_configuration.c bootimg.c engine.c)<br>set(FILES ${FILES} omap_protocol.c output.c pheriphalboot.c protocol.c)<br>set(FILES ${FILES} usb_linux.c util_linux.c)<br>
<br><br>I am working on Windows platform, using Cygwin and doing a Cross-compilation to Linux. I have a Toolchain file that tested before and it is working right.<br>The cmake version is 2.8.3<br><br>Thanks a lot<br><br>Enrique<br>
<br><br><br><br><br><div class="gmail_quote">On Mon, Mar 14, 2011 at 2:20 PM, Eric Noulard <span dir="ltr">&lt;<a href="mailto:eric.noulard@gmail.com">eric.noulard@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
2011/3/14 Enrique Izaguirre &lt;<a href="mailto:enrique.izaguirre@gmail.com">enrique.izaguirre@gmail.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; Hello friends,<br>
&gt;<br>
&gt; I have a problem when I try to compile several files, for some reason it<br>
&gt; takes only the first of the list to build it.<br>
&gt; It displays a few warnings and at the end the following error:<br>
&gt;<br>
&gt; make[2]: *** [CMakeFiles/omap.dir/host/fastboot.c.o] Error 1<br>
&gt; make[2]: Leaving directory `/home/x0148488/omapflash/cmake_build&#39;<br>
&gt; make[1]: *** [CMakeFiles/omap.dir/all] Error 2<br>
&gt; make[1]: Leaving directory `/home/x0148488/omapflash/cmake_build&#39;<br>
&gt; make: *** [all] Error 2<br>
&gt;<br>
&gt; Even before doing the add_executable ( ), I display first the variable that<br>
&gt; contains the list of files to build, and it indeed has all the files to<br>
&gt; compile; somehow it only compiles the first one and then leave. Running make<br>
&gt; with the VERVOSE=1 I can see the command, and it has only the first file of<br>
&gt; the list; so CMake is generating the command wrong.<br>
&gt; Can you explain why only one file is compiled and not the entire list?<br>
<br>
</div></div>Looks like some sort of typo.<br>
Could you give us the  CMakeLists.txt extract with the offending commands?<br>
At least the source file list definition and the add_executable statement.<br>
<br>
and some more info:<br>
<br>
- platform/host/compiler<br>
- cmake version<br>
- native or cross-compiling<br>
<font color="#888888"><br>
<br>
<br>
<br>
--<br>
Erk<br>
Membre de l&#39;April - « promouvoir et défendre le logiciel libre » -<br>
<a href="http://www.april.org" target="_blank">http://www.april.org</a><br>
</font></blockquote></div><br>