David,<div><br></div><div>There is a directory-level property for preprocessor definitions too, right? So how do the target properties for preprocessor definitions handle those? I think they are additive aren't they?</div>
<div><br></div><div>I would expect the include directories to be additive too.<br clear="all"><div><br></div><div>---------</div>Robert Dailey<br>
<br><br><div class="gmail_quote">On Fri, Nov 4, 2011 at 9:04 AM, David Cole <span dir="ltr"><<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Wed, Nov 2, 2011 at 8:30 PM, Stephen Kelly <<a href="mailto:steveire@gmail.com">steveire@gmail.com</a>> wrote:<br>
</div><div><div class="h5">> David Cole wrote:<br>
><br>
>> On Tue, Nov 1, 2011 at 4:33 PM, Robert Dailey<br>
>> <<a href="mailto:rcdailey@gmail.com">rcdailey@gmail.com</a>> wrote:<br>
>>> On Tue, Nov 1, 2011 at 3:32 PM, David Cole<br>
>>> <<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>> wrote:<br>
>>>><br>
>>>> Not yet<br>
>>><br>
>>> Meaning there are plans in the works to add such functionality in the<br>
>>> near future?<br>
>>> For now I guess I could actually hard code VS environment variables in my<br>
>>> include directory strings, such as $(Configuration).<br>
>><br>
>> There is a feature planned to add per-target include directories (as a<br>
>> target property). As part of that work, we will probably naturally<br>
>> also add per-configuration values of that new target property. It is<br>
>> not yet added as a feature request in the bug tracker, but there are<br>
>> related ones that I may "borrow" for the purpose. Stay tuned for more<br>
>> info, but it is not coming in the next week or two. Hopefully, in time<br>
>> for 2.8.7, but it depends on timing at this point.... so no promises.<br>
><br>
> Hi David,<br>
><br>
> I'm interested in this feature. I'd like to get it into CMake 2.8.7.<br>
><br>
> It came up in the recent thread about how Qt5Config.cmake should work:<br>
><br>
> <a href="http://thread.gmane.org/gmane.comp.lib.qt.project.devel/79/focus=226" target="_blank">http://thread.gmane.org/gmane.comp.lib.qt.project.devel/79/focus=226</a><br>
><br>
> You mentioned that there are some side-line relevant bugs in the CMake<br>
> tracker for this. Could you point me to them? Could you also indicate the<br>
> approximate location in the code to look to for starting to work on this<br>
> (cmTarget.cxx?).<br>
><br>
<br>
</div></div>See these bugs (and probably others, too, but these looked like the<br>
most relevant ones when I searched for "include_directories"...)<br>
<br>
<a href="http://public.kitware.com/Bug/view.php?id=1968" target="_blank">http://public.kitware.com/Bug/view.php?id=1968</a><br>
<a href="http://public.kitware.com/Bug/view.php?id=6269" target="_blank">http://public.kitware.com/Bug/view.php?id=6269</a><br>
<a href="http://public.kitware.com/Bug/view.php?id=6493" target="_blank">http://public.kitware.com/Bug/view.php?id=6493</a><br>
<a href="http://public.kitware.com/Bug/view.php?id=8189" target="_blank">http://public.kitware.com/Bug/view.php?id=8189</a><br>
<br>
I think the main thing we want is a new target property named<br>
"INCLUDE_DIRECTORIES" - There's already a directory property with that<br>
name; the include_directories command is implemented in terms of that<br>
directory property. Along with that, we will also want<br>
per-configuration variants of the property, similar to the many<br>
existing target properties that have per-config variants.<br>
<br>
If you look at the code, you'll see that use of the existing<br>
INCLUDE_DIRECTORIES property triggers a call to<br>
cmMakefile::SetIncludeDirectories, which just saves it in a data<br>
member for later use. You can grep the code for GetIncludeDirectories<br>
for callers, or for just IncludeDirectories to see the direct usage in<br>
cmMakefile.cxx itself.<br>
<br>
The interesting bits here are going to be in deciding how to make<br>
these per-target include_directories behave. Should they be additive?<br>
Or should they override the directory-level includes entirely?<br>
<br>
There is quite some discussion to be had here and some decisions to<br>
make. (Which is why I hesitate to promise that this will definitely be<br>
ready by 2.8.7...)<br>
<br>
<br>
:-)<br>
<span class="HOEnZb"><font color="#888888">David<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
> Thanks,<br>
><br>
> Steve.<br>
><br>
><br>
> --<br>
><br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
><br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br></div>