[CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

Sean Soria sean.soria at gmail.com
Wed Nov 26 15:49:19 EST 2008


Thanks for all your help Bill.  And thanks for clearing up my
perception of directories.  That's a big help.

On Wed, Nov 26, 2008 at 12:41 PM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
> Sean Soria wrote:
>>
>> Sorry, I got myself confused with COMPILE_DEFINITIONS.  It is
>> INCLUDE_DIRECTORIES that I wanted.  Why is this a directory property
>> if it can only be set for certain directories (those that contain
>> targets or whose subdirectories contain targets)?
>>
> The concept of a directory property in CMake is not one to one with the disk
> directories.   A directory in CMake is a directory that has a list of
> targets in it.  You can have a target that uses files from all sorts of
> different directories.   So, a directory property is not what you want.
>  What you really want is a source file property that allows setting include
> directories.  This is just not implemented yet.  For 99.9% of the cases it
> does not matter if you get a few extra -I paths. However, this would be a
> nice to have feature.
>
> http://public.kitware.com/Bug/view.php?id=1968&nbn=2
>
>
> -Bill
>


More information about the CMake mailing list