Hello friends,<br><br>I have a problem when running cmake command, the add_executable ( ) is giving me an error which I cannot see what is the problem. I have in my main CMakeLists.txt files the following section:<br>======================================<br>
include (host/CMakeLists.txt)<br><br>foreach (FILE ${FILES})<br>    set (hostFiles ${hostFiles} host/${FILE})<br>endforeach (FILE)<br><br>add_executable (mainprog ${hostFiles})<br>======================================<br>
<br><br>After running the cmake command I got the following error:<br><br>Adding subdirectory host...<br>Entering host&#39;s CMakeLists<br>CMake Error at CMakeLists.txt:82 (add_executable):<br>  add_executable called with incorrect number of arguments<br>
<br>My understanding is that add_executable can take from 2 arguments, is this correct?<br><br>As shown above, I have in host/  subdirectory a CMakeLists.txt file with the following:<br><br>set(CMAKE_INCLUDE_CURRENT_DIR ON)<br>
message (&quot;Entering host&#39;s CMakeLists&quot;)<br><br><br>and that&#39;s it.<br><br>What could be the problem?<br><br>Thanks<br><br>Best Regards<br><br>Enrique<br>