Re: [CMake] how to inherit includes from other directories

2011-09-11 Thread Victor Whiskey Yankee
On 09/08/11 00:00, Raymond Wan wrote: Hi Glenn, On Wed, Sep 7, 2011 at 20:36, Glenn Coombs glenn.coo...@gmail.com wrote: Could you not create a file in each subdirectory called something like header-deps.cmake ? This file would contain the include_directory() commands necessary for using

Re: [CMake] how to inherit includes from other directories

2011-09-07 Thread Glenn Coombs
Could you not create a file in each subdirectory called something like header-deps.cmake ? This file would contain the include_directory() commands necessary for using this module, plus include() commands of other modules that it depends on. So for your example: # utils/b/header-deps.cmake

Re: [CMake] how to inherit includes from other directories

2011-09-07 Thread Raymond Wan
Hi Glenn, On Wed, Sep 7, 2011 at 20:36, Glenn Coombs glenn.coo...@gmail.com wrote: Could you not create a file in each subdirectory called something like header-deps.cmake ?  This file would contain the include_directory() commands necessary for using this module, plus include() commands of

Re: [CMake] how to inherit includes from other directories

2011-09-06 Thread Victor Yankee
Raymond, I appreciate your detailed reply. But apparently include_directories do not propagate UP, only down into subdirectories. The project has many such subdirectories each with its own headers. I think my example was therefore misleading and too simple :( There may 3 or 4 levels. At the top

Re: [CMake] how to inherit includes from other directories

2011-09-06 Thread David Cole
CMake does not track dependencies of header-only libraries. It only tracks actual library dependencies given by target_link_libraries commands. You will have to come up with your own way to manage your projects interconnections. CMake provides the include_directories command so that you can say

Re: [CMake] how to inherit includes from other directories

2011-09-06 Thread Raymond Wan
Hi Victor, On Wed, Sep 7, 2011 at 05:39, Victor Yankee victor.whiskey.yan...@gmail.com wrote: There may 3 or 4 levels. At the top level, I would very much like to avoid needing to know all the dependencies at all the lower levels and exhaustively listing each one in an 

Re: [CMake] how to inherit includes from other directories

2011-09-06 Thread Andreas Mohr
Hi, On Tue, Sep 06, 2011 at 04:50:30PM -0400, cmake-requ...@cmake.org wrote: Date: Tue, 6 Sep 2011 16:50:28 -0400 From: David Cole david.c...@kitware.com CMake does not track dependencies of header-only libraries. It only tracks actual library dependencies given by target_link_libraries

Re: [CMake] how to inherit includes from other directories

2011-09-04 Thread Raymond Wan
Hi Victor, On Sat, Sep 3, 2011 at 02:27, Victor Yankee victor.whiskey.yan...@gmail.com wrote: build/ src/ utils a A.h unittest_a.cpp b B.h // needs a.h