[CMake] make didn't compile
Enrique Izaguirre
enrique.izaguirre at gmail.com
Wed Mar 2 11:33:43 EST 2011
Hello friends,
I have another problem with my build. I run Cmake and complete the building
and production of a Makefile.
But when I run make I get the following result:
i686-unknown-linux-gnu-g++: cannot specify -o with -c or -S and multiple
compilations
make[2]: *** [CMakeFiles/myprj.dir/comdriver/src/StdAfx.cpp.o] Error 1
make[1]: *** [CMakeFiles/myprj.dir/all] Error 2
make: *** [all] Error 2
What I'm doing in the CMakeLists.txt is to get all the programs from one
subdirectory and put them in variable comdrvFiles, which has everything from
that subdirectory:
comdrvFiles =
comdriver/src/StdAfx.cpp;comdriver/src/ComDriver.cpp;comdriver/src/PortEnumerator.cpp;comdriver/src/serial
driver.cpp;comdriver/src/usbdriver.cpp
and then collect all the programs from another subdirectory in variable
hostFiles:
hostFiles = host/fastboot.c;host/bootimg.c;host/engine.c
once that I have all the programs collected in those variables I do the
following:
add_executable (myprj ${comdrvFiles} ${hostFiles})
to create an executable named myprj
I don't have any program in the main directory, only the main CMakeLists.txt
and in main directory is where I collect everything and try to produce an
executable. Is there something missing? How can I produce an executable?
Thanks in advance
BR
Enrique
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110302/82400550/attachment-0001.htm>
More information about the CMake
mailing list