如何跳过 cmake 文件 GLOB_RECURSE 中的符号链接?

how do I skip symlinks in cmake file GLOB_RECURSE?

我想找到所有匹配 glob 模式的文件,但跳过那些是符号链接的文件。什么样的参数允许我在 file(GLOB_RECURSE) 中执行此操作?

What kind of parameters allow me to do this in file(GLOB_RECURSE) ?

None,没有这个选项。你得自己写这样的代码。

how do I skip symlinks in cmake file GLOB_RECURSE?

运行 file(GLOB_RECURSE 然后迭代返回的路径列表并删除作为符号链接的路径。