OK, I got it.<br>The example I saw in the book is also without defining FILES. Then I have to set it to an initial value, that should be the path where the files are, right?<br><br>Than you very much.<br><br>Best Regards<br>
<br>Enrique<br><br><div class="gmail_quote">On Thu, Feb 17, 2011 at 2:55 PM, Andreas Pakulat <span dir="ltr">&lt;<a href="mailto:apaku@gmx.de">apaku@gmx.de</a>&gt;</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;">
<div class="im">On 17.02.11 14:28:21, Enrique Izaguirre wrote:<br>
&gt; Thank you Andreas,<br>
&gt;<br>
&gt; Yes, it is empty, but I tried now creating FILES this way before the<br>
&gt; foreach:<br>
&gt;<br>
&gt; set (FILES &quot;&quot;)<br>
&gt;<br>
&gt; and still got the same result.<br>
&gt;<br>
&gt; Is this way OK to create an empty variable?<br>
<br>
</div>You don&#39;t understand the problem, as long as FILES is empty, the<br>
foreach() loop will not run and hence your hostFiles variable will not<br>
be set. add_executable needs _at least_ 2 arguments, the name of the<br>
target and at least one source file. You only supply 1 argument, the<br>
target name, because your cmake variable is empty (or not set at all).<br>
You need to supply actual source files.<br>
<br>
Andreas<br>
<font color="#888888"><br>
--<br>
You own a dog, but you can only feed a cat.<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br>