On 12/04/2011 03:37 PM, Surya Kiran Gullapalli wrote:
> Hello all,
> 
> I'm building several executables which are located in a single
> directory. Each executable has different include path. I'm calling
> add_executable in a loop and If I call Include_Directories in the loop,
> the last built executable will have a long include path.
> 
> To avoid that, I'm setting COMPILE_FLAGS property on each of the target
> in the loop. But I'm facing a problem with cmake due to this. CMake is
> not identifying the dependencies in the include path. 
> 
> In short, If Include_Directories is replaced by Set_Property, cmake is
> not generating proper dependency information. Is this expected or is
> this a defect ?
> 
> Thanks,
> Surya
> 

Include-directories are a property of the current source directory, not
of the individual targets. The latter is a feature that is currently in
development, though. This is also why include-directories are not
propagated through dependencies. Such a propagation would also be
difficult to implement, as it would need to distinguish between "public"
and "private" include directories and it would be very difficult to
determine the correct ordering of these automatic include directories.

Michael
--

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