Thank you Eric. The section in the main CMakeLists.txt is as follows:<br><br>set (FILES "")<br>message ("Adding subdirectory host...")<br>include (host/CMakeLists.txt)<br><br>message ("FILES = ${FILES}")<br>
foreach (FILE ${FILES})<br> set (hostFiles ${hostFiles} host/${FILE})<br>endforeach (FILE)<br><br>message ("hostFiles = ${hostFiles}")<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 ("Entering host's CMakeLists")<br><br># Add the sources to the host sources Sistem variable:<br><br>message ("Setting /host files, to include them in the build")<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"><<a href="mailto:eric.noulard@gmail.com">eric.noulard@gmail.com</a>></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 <<a href="mailto:enrique.izaguirre@gmail.com">enrique.izaguirre@gmail.com</a>>:<br>
<div><div></div><div class="h5">> Hello friends,<br>
><br>
> I have a problem when I try to compile several files, for some reason it<br>
> takes only the first of the list to build it.<br>
> It displays a few warnings and at the end the following error:<br>
><br>
> make[2]: *** [CMakeFiles/omap.dir/host/fastboot.c.o] Error 1<br>
> make[2]: Leaving directory `/home/x0148488/omapflash/cmake_build'<br>
> make[1]: *** [CMakeFiles/omap.dir/all] Error 2<br>
> make[1]: Leaving directory `/home/x0148488/omapflash/cmake_build'<br>
> make: *** [all] Error 2<br>
><br>
> Even before doing the add_executable ( ), I display first the variable that<br>
> contains the list of files to build, and it indeed has all the files to<br>
> compile; somehow it only compiles the first one and then leave. Running make<br>
> with the VERVOSE=1 I can see the command, and it has only the first file of<br>
> the list; so CMake is generating the command wrong.<br>
> 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'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>