| 27 | } |
| 28 | |
| 29 | void |
| 30 | ChangeNamespace::add_directory(fs::path const& p) |
| 31 | { |
| 32 | if (fs::path(m_cppms_src_path / p) == fs::path(m_cppms_src_path / "tools" / "change_namespace")) |
| 33 | { |
| 34 | return; |
| 35 | } |
| 36 | |
| 37 | // Parse files and directories |
| 38 | for (auto const& entry : fs::directory_iterator(m_cppms_src_path / p)) |
| 39 | { |
| 40 | std::string s = entry.path().string(); |
| 41 | s.erase(0, m_cppms_src_path.string().size() + 1); |
| 42 | |
| 43 | fs::path np = s; |
| 44 | if (!m_dependencies.count(np)) |
| 45 | { |
| 46 | m_dependencies[np] = p; // set up dependency tree |
| 47 | add_pending_path(np); |
| 48 | } |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | void |
| 53 | ChangeNamespace::add_file(fs::path const& p) |