<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 3 January 2016 at 10:18, Jakob van Bethlehem <span dir="ltr"><<a href="mailto:jsvanbethlehem@gmail.com" target="_blank">jsvanbethlehem@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hej,</div><div><br></div><div>Just re-read your question to make sure I understood, because I thought in the project I currently work in we had those targets, but not the problems. So I checked and realised we actually gotten rid of those INTERFACE libraries, because we encountered all kinds of trouble, amongst which one is the problem you refer to. Another problem for instance, is that INTERFACE link dependencies don’t get transferred like with normal libraries. Extremely annoying, so we decided the ‘academical’ use of an INTERFACE library wasn’t (nearly) worth the effort.</div><div><br></div><div>Not a resolution to your problem though ……</div><div><br></div></div></blockquote><div><br></div><div>I reached the same conclusion, but then I wonder what solution did you end up using for header-only libraries?</div><div>Before trying interfaces I had these static libraries with one cpp which was generated by a leak detection tool, therefore without</div><div>leak detection activated the libraries don't generate anything and can't be linked to.</div><div>Adding a custom cpp for static header-only libraries is a bit sad but looks like a simple way to do it.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div></div><div>Sincerely, Jakob</div><div><div class="h5"><div><br></div><br><div><blockquote type="cite"><div>On 02 Jan 2016, at 13:12, Klaim - Joël Lamotte <<a href="mailto:mjklaim@gmail.com" target="_blank">mjklaim@gmail.com</a>> wrote:</div><br><div><br><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">On 1 January 2016 at 11:00, Jakob van Bethlehem<span> </span><span dir="ltr"><<a href="mailto:jsvanbethlehem@gmail.com" target="_blank">jsvanbethlehem@gmail.com</a>></span><span> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hej Joël,</div><div><br></div><div>The command you’re looking for is ‘source_group’, see <a href="https://cmake.org/cmake/help/v3.0/command/source_group.html" target="_blank">https://cmake.org/cmake/help/v3.0/command/source_group.html</a></div><div><br></div></div></blockquote><div><br></div><div>I use this already but it works only with source files, not with targets. With targets you need to set the FOLDER property.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div></div><div>Sincerely,</div><div>Jakob</div><div><br></div><br><div><blockquote type="cite"><div><div><div>On 30 Dec 2015, at 20:52, Klaim - Joël Lamotte <<a href="mailto:mjklaim@gmail.com" target="_blank">mjklaim@gmail.com</a>> wrote:</div><br></div></div><div><div><div><div dir="ltr"><div>The following CMake script:</div><div><br></div><div>   <span> </span>cmake_minimum_required(VERSION 3.4)</div><div>    </div><div>   <span> </span>add_library( mylib INTERFACE )</div><div>   <span> </span>set_property( TARGET mylib PROPERTY FOLDER /some/dir )</div><div><br></div><div><br></div><div>Will trigger this error on configuration:</div><div><br></div><div>   <span> </span>CMake Error at CMakeLists.txt:4 (set_property):</div><div>     <span> </span>INTERFACE_LIBRARY targets may only have whitelisted properties.  The</div><div>     <span> </span>property "FOLDER" is not allowed.</div><div><br></div><div><br></div><div>This prevent any interface library to be organized in Visual Studio virtual folders.</div><div>Unfortunately it also mean that header-only targets can't be organized.</div><div><br></div><div>I have no idea how this should be solved. Should the property just be white-listed?</div><div>Or should a better have a another specific library mode for header-only targets?<br></div><div><br></div><div>Is there any workaround?</div><div><br></div><div>Joël Lamotte</div><div><br></div></div></div></div>--<span> </span><br><br>Powered by<span> </span><a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br><br>Please keep messages on-topic and check the CMake FAQ at:<span> </span><a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/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:<span> </span><a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>CMake Consulting:<span> </span><a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>CMake Training Courses:<span> </span><a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</a><br><br>Visit other Kitware open-source projects at<span> </span><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://public.kitware.com/mailman/listinfo/cmake" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a></div></blockquote></div><br></div><br>--<br><br>Powered by<span> </span><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:<span> </span><a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/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:<span> </span><a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>CMake Consulting:<span> </span><a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>CMake Training Courses:<span> </span><a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br><br>Visit other Kitware open-source projects at<span> </span><a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a></blockquote></div></div></blockquote></div><br></div></div></div><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/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/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/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/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/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br></blockquote></div><br></div></div>