<div dir="ltr"><div>Hi Drew,</div><div><br></div><div>a custom target can do literally anything, it's just a buildsystem wrapper for running arbitrary executables; or often not even that, and is just a collection of custom commands. There is nothing CMake automatically does with the 
properties

[INTERFACE_]INCLUDE_DIRECTORIES set on a custom command.</div><div><br></div><div>Note that if you need the properties set for some reason (i.e. if your custom command/target code uses them for something), you can still set them just fine using set_property() or set_target_properties(). However, I expect this to be a very rare thing to do, so I think it's OK target_include_directories() actually errors out on custom targets. IMO it's much more likely that a non-custom target was intended.</div><div><br></div><div>(Note that I am just an ordinary CMake user, so the above is in no way "official.")<br></div><div><br></div><div>Petr<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 7 July 2018 at 21:27, Drew Parsons <span dir="ltr"><<a href="mailto:dparsons@debian.org" target="_blank">dparsons@debian.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Commit 510fdcb18801076e2041eaae294137<wbr>5eecc93ec2 at<br>
<a href="https://gitlab.kitware.com/cmake/cmake/commit/510fdcb18801076e2041eaae2941375eecc93ec2" rel="noreferrer" target="_blank">https://gitlab.kitware.com/<wbr>cmake/cmake/commit/<wbr>510fdcb18801076e2041eaae294137<wbr>5eecc93ec2</a><br>
prevents custom targets from using target_include_directories().<br>
<br>
This makes no sense to me.  A custom target is still a target. It needs<br>
to be compiled, it uses -I flags.<br>
<br>
Can you explain the ban on applying target_include_directories() to<br>
custom targets?<br>
<br>
Drew<br>
<br>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake-developers" rel="noreferrer" target="_blank">https://cmake.org/mailman/<wbr>listinfo/cmake-developers</a><br>
</blockquote></div><br></div>