title: CMake's GLOB_RECURSE seems to recurse more than what I asked it to
body: <p>In my project, I have a subdir named <code>foo</code>, and I want a list of all <code>.cpp</code> files under <code>foo</code>, and its subdirectories. So - it's GLOB_RECURSE for me. Now, looking at the <a href="https://cmake.org/cmake/help/latest/command/file.html#glob-recurse" rel="nofollow noreferrer">CMake documentation</a>, I see the syntax is:</p>
  <pre><code>file(GLOB_RECURSE &lt;variable&gt; [FOLLOW_SYMLINKS]
       [LIST_DIRECTORIES true|false] [RELATIVE &lt;path&gt;] [CONFIGURE_DEPENDS]
       [&lt;globbing-expressions&gt;...])
  </code></pre>
  <p>and in my case:</p>
  <pre><code>file(GLOB_RECURSE my_list &quot;foo/&quot; &quot;*.cpp&quot;)
  </code></pre>
  <p>Unfortunately, what I'm getting is the paths of all <code>.cpp</code> files in my <em>project</em> - not just in <code>foo/</code>. Why is that?</p>