[CMake] Fwd: GLOB_RECURSE
Michael Hennebry
michael.hennebry at rivieranexus.com
Thu Jul 26 09:46:57 EDT 2018
I finally found the ellipses.
On Wed, Jul 25, 2018 at 9:48 PM, J. Caleb Wherry <calebwherry at gmail.com> wrote:
> Latest CMake documentation can be found here:
> https://cmake.org/cmake/help/latest/command/file.html?highlight=glob_recurse#glob-recurse
That is what I was using, albeit badly.
> As for your issue, you are misunderstanding the purpose of RELATIVE. That
> means the paths you get path will be relative to that path, not that it
> searches from that path. So you are just searching for “*.cpp” and “*.c” in
> the CURRENT directory. That is why you are getting files in all the subdirs.
> As @frodak pointed out in his first example, you need to remove the RELATIVE
> and put the dir name you want like “./dir/*.cpp”.
Ah. The top level directories are not list separately.
> Once you do that, you should be good to go. All of the above is explained
> pretty clearly in the linked docs.
Yes, they are.
My "interpretation" was too heavily influenced by an example even
worse than mine.
Thanks.
More information about the CMake
mailing list