[CMake] Problem with add_executable ( )

Enrique Izaguirre enrique.izaguirre at gmail.com
Thu Feb 17 16:12:28 EST 2011


OK, I got it.
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?

Than you very much.

Best Regards

Enrique

On Thu, Feb 17, 2011 at 2:55 PM, Andreas Pakulat <apaku at gmx.de> wrote:

> On 17.02.11 14:28:21, Enrique Izaguirre wrote:
> > Thank you Andreas,
> >
> > Yes, it is empty, but I tried now creating FILES this way before the
> > foreach:
> >
> > set (FILES "")
> >
> > and still got the same result.
> >
> > Is this way OK to create an empty variable?
>
> You don't understand the problem, as long as FILES is empty, the
> foreach() loop will not run and hence your hostFiles variable will not
> be set. add_executable needs _at least_ 2 arguments, the name of the
> target and at least one source file. You only supply 1 argument, the
> target name, because your cmake variable is empty (or not set at all).
> You need to supply actual source files.
>
> Andreas
>
> --
> You own a dog, but you can only feed a cat.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110217/43e6616a/attachment-0001.htm>


More information about the CMake mailing list