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