<div dir="ltr"><div>The following CMake script:</div><div><br></div><div>    cmake_minimum_required(VERSION 3.4)</div><div>    </div><div>    add_library( mylib INTERFACE )</div><div>    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>    CMake Error at CMakeLists.txt:4 (set_property):</div><div>      INTERFACE_LIBRARY targets may only have whitelisted properties.  The</div><div>      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>