[CMake] OBJECT_DEPENDS and target-level dependency.
Óscar Fuentes
ofv at wanadoo.es
Sun Aug 16 15:18:31 EDT 2009
Tyler Roscoe <tyler at cryptio.net> writes:
>> >> The source files of a library depend on generated files from another
>> >> library on its parent directory. Let's call them libParent and libChild.
>> >>
>> >> For the source files on libChild I do
>> >>
>> >> SET_SOURCE_FILES_PROPERTIES(some_source.cpp
>> >> PROPERTIES OBJECT_DEPENDS libParent)
>> >>
>> >> This way I try to delay the compilation of some_source.cpp until
>> >> libParent is finished.
>> >
>> > Can you just use add_dependencies (libChild libParent)?
>>
>> Then this means that the source files of libChild will not be compiled
>> until libParent is fully built, right?
>
> Yes. Is there some reason you don't want this to happen?
No, that's right, although the best thing would be to create a
dependency on the generated files of libParent instead of on libParent
itself, but as the project is quite large, it doesn't impact parallel
builds too much.
Thanks again.
--
Óscar
More information about the CMake
mailing list