From f929cf5f80a4a2b9564b24a0ef1f4f3882d66746 Mon Sep 17 00:00:00 2001 From: Duncan Ogilvie Date: Fri, 5 Mar 2021 14:07:19 +0100 Subject: [PATCH] Recursively iterate directories --- src/gen.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gen.cpp b/src/gen.cpp index 7edf7fd..0ade495 100644 --- a/src/gen.cpp +++ b/src/gen.cpp @@ -42,7 +42,11 @@ static std::vector expand_cmake_path(const fs::path &p) { std::vector temp; if (p.filename().stem().string() == "*") { auto ext = p.extension(); - for (const auto &f : fs::directory_iterator(p.parent_path())) { + for (const auto &f : fs::recursive_directory_iterator( + p.parent_path(), fs::directory_options::follow_directory_symlink)) { + if (f.is_directory()) { + continue; + } if (f.path().extension() == ext) { temp.push_back(f.path().string()); }