[cmake-developers] Issuing errors for faulty INTERFACE_INCLUDE_DIRECTORIES (Was: CMake usage requirements in KDE Frameworks)

Stephen Kelly steveire at gmail.com
Fri Mar 22 09:39:20 EDT 2013


Brad King wrote:

> On 03/22/2013 07:14 AM, Stephen Kelly wrote:
>> Would it be reasonable to issue an error at install(EXPORT)-time if the
>> INTERFACE_INCLUDE_DIRECTORIES of a target contains paths in the source
>> dir or binary dir, if the install prefix is not inside one of those
>> itself?
> 
> Yes, though it won't be able to work for all cases because some paths
> may have generator expressions which won't be evaluated until the
> consumer loads them.

Yes, exactly.

> 
>> Also, in cmTarget::GetIncludeDirectories, if a path in a
>> INTERFACE_INCLUDE_DIRECTORIES entry of an IMPORTED dependent does not
>> exist, that could be made an error too. This would sort of be showing the
>> error in the wrong place though (to the person using the package, rather
>> than the one creating it).
> 
> We already have similar errors in the exported "targets" files for
> things like missing library files.  The wording says something about
> possible missing or broken packages.

Right, I'll see if I can do something similar over the next few days.

Thanks,

Steve.






More information about the cmake-developers mailing list