[cmake-developers] Issuing errors for faulty INTERFACE_INCLUDE_DIRECTORIES
Stephen Kelly
steveire at gmail.com
Tue Mar 26 15:38:05 EDT 2013
Brad King wrote:
> On 03/26/2013 02:53 PM, Robert Maynard wrote:
>> My concern with this feature is the use case of a directory not existing
>> at configure time, but which will exist at linking time. Primarily this
>> would occur when an imported library is the result of an
>> add_custom_command call which creates a new directory. While this might
>> be an edge case, I was wondering if we should have a way to skip the
>> verification on a target.
> Alternatively one could solve this case with no additional CMake feature
> by hiding the needed paths in $<1:...> generator expressions. That is not
> as explicit, but I would be okay with that as the recommended solution
> over an awkwardly named property.
We could make it more explicit by adding a generator expression which
behaves the same as $<1:...> (like BUILD_INTERFACE already). This is also
more exact about what to exclude the check for:
INTERFACE_INCLUDE_DIRECTORIES
"/foo/bar;$<DELAYED_CREATION:/created/later>;/other/dir"
Unrelated to this specific issue, I've added another commit to stage with
another check (for relative paths). Additionally I've added a commit to my
clone in the error-on-exported-missing-include-dir branch, which introduces
a policy. That commit doesn't really have to be in CMake 2.8.11. Currently
the test doesn't pass, and I'm not sure why. The cmake_policy() line in the
test doesn't seem to have an effect.
Thanks,
Steve.
More information about the cmake-developers
mailing list