[CMake] Compiling multiple files, only takes the first one

Eric Noulard eric.noulard at gmail.com
Mon Mar 14 16:20:09 EDT 2011


2011/3/14 Enrique Izaguirre <enrique.izaguirre at gmail.com>:
> Hello friends,
>
> I have a problem when I try to compile several files, for some reason it
> takes only the first of the list to build it.
> It displays a few warnings and at the end the following error:
>
> make[2]: *** [CMakeFiles/omap.dir/host/fastboot.c.o] Error 1
> make[2]: Leaving directory `/home/x0148488/omapflash/cmake_build'
> make[1]: *** [CMakeFiles/omap.dir/all] Error 2
> make[1]: Leaving directory `/home/x0148488/omapflash/cmake_build'
> make: *** [all] Error 2
>
> Even before doing the add_executable ( ), I display first the variable that
> contains the list of files to build, and it indeed has all the files to
> compile; somehow it only compiles the first one and then leave. Running make
> with the VERVOSE=1 I can see the command, and it has only the first file of
> the list; so CMake is generating the command wrong.
> Can you explain why only one file is compiled and not the entire list?

Looks like some sort of typo.
Could you give us the  CMakeLists.txt extract with the offending commands?
At least the source file list definition and the add_executable statement.

and some more info:

- platform/host/compiler
- cmake version
- native or cross-compiling




-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list