title: In CLion, header only library: file "does not belong to any project target, code insight features might not work properly"
body: <p>I have a header-only library project set up with the cmake command:</p>
  
  <pre><code>add_library(my_library INTERFACE)
  </code></pre>
  
  <p>and I also added </p>
  
  <pre><code>target_sources(my_library INTERFACE ${MY_LIRBARY_HEADER_FILES})
  </code></pre>
  
  <p>but when I open a source file, I get the warning:</p>
  
  <blockquote>
    <p>This file does not belong to any project target, code insight features might not work properly</p>
  </blockquote>
  
  <p>and I lose a lot of the functionality on things like code completion.</p>
  
  <p>What is the proper way to set this up so CLion provides its usual functionality on a header-only library?</p>