Brad King wrote: > On 02/08/2013 01:25 PM, Stephen Kelly wrote: >> Brad King wrote: >> >>> It does make sense to publish INTERFACE_INCLUDE_DIRECTORIES and >>> INTERFACE_COMPILE_DEFINITIONS on object library targets, but we >>> do not need to chain to them automatically. >> >> I tried writing a unit test for this, but couldn't see why this would be >> useful. Consumers of an object library don't use headers from it, do >> they? Why then would include directories or compile definitions for them >> be useful? > > The motivating use case for object libraries is to have several > object libraries, typically each in its own subdirectory, that > have their own private implementation's include directories, > compile definitions, flags, etc. and then they get combined > into one library or executable at the end. That final target > may have its own sources which include headers for interfaces > from the individual object libraries. Those symbols will be > resolved simply by having the objects themselves linked in, > but otherwise it is not much different from a regular library. >
Ok, I've added a unit test for that now. Thanks, Steve. -- 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
