Hello friends,<br><br>I have another problem with my build. I run Cmake and complete the building and production of a Makefile.<br>But when I run make I get the following result:<br><br>i686-unknown-linux-gnu-g++: cannot specify -o with -c or -S and multiple compilations<br>
make[2]: *** [CMakeFiles/myprj.dir/comdriver/src/StdAfx.cpp.o] Error 1<br>make[1]: *** [CMakeFiles/myprj.dir/all] Error 2<br>make: *** [all] Error 2<br><br><br>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:<br>
<br>comdrvFiles = comdriver/src/StdAfx.cpp;comdriver/src/ComDriver.cpp;comdriver/src/PortEnumerator.cpp;comdriver/src/serial<br>driver.cpp;comdriver/src/usbdriver.cpp<br><br>and then collect all the programs from another subdirectory in variable hostFiles:<br>
<br>hostFiles = host/fastboot.c;host/bootimg.c;host/engine.c<br><br><br>once that I have all the programs collected in those variables I do the following:<br><br>add_executable (myprj ${comdrvFiles} ${hostFiles})<br><br>to create an executable named myprj<br>
<br>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?<br>
<br>Thanks in advance<br><br>BR<br><br>Enrique<br><br><br>