On Wednesday 04 Aug 2010 1:49:36 am Clinton Stimpson wrote:
> On Tuesday, August 03, 2010 02:07:31 pm Alexander Neundorf wrote:
> > On Saturday 31 July 2010, Clinton Stimpson wrote:
> > > If you put main.moc in add_executable() then you don't have to use the
> > > set_source_files_properties() to manually specify dependencies.
> > 
> > Yes, but main.moc is already #included in main.cpp so it cannout be added
> > to add_executable.
> 
> Why not?  add_executable() isn't going to compile a .moc file like it does
> a .cxx file.

Because then you would get a multiple definition error. Since the same file is 
compiled and linked twice effectively. Once when included from main.cpp and the 
other when passed as a separate file to the compiler/linker.
-- 
Cheers!
Kishore
_______________________________________________
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

Reply via email to