On 06/14/2012 05:04 PM, Alexander Neundorf wrote: > In KDEs FindQt4.cmake the macro > > qt4_generate_moc(inCppFile outMocFile) > > uses the OBJECT_DEPENDS property to enforce that the moc file > is generated before the cpp file is built.
The original purpose of OBJECT_DEPENDS was to solve a problem with generated headers *way* back in the original makefile generator. Since the modern generator ensures all custom commands have been evaluated to generate things before CMake scan dependencies its original purpose is no longer necessary. However, it is still useful to bring a custom command into a target without explicitly naming the custom command output as a target source. If the output of a custom command is the OBJECT_DEPENDS of some compiled source file that is in the target then both will be brought in. I think that may be the case for moc but I'm not sure of the top of my head. -Brad -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
