| 870 | } |
| 871 | |
| 872 | bool addUniqueDependency(Rcpp::CharacterVector include, |
| 873 | std::vector<FileInfo>* pDependencies) { |
| 874 | |
| 875 | // return false if we already have this include |
| 876 | std::string path = Rcpp::as<std::string>(include); |
| 877 | for (size_t i = 0; i<pDependencies->size(); ++i) { |
| 878 | if (pDependencies->at(i).path() == path) |
| 879 | return false; |
| 880 | } |
| 881 | |
| 882 | // add it and return true |
| 883 | pDependencies->push_back(FileInfo(path)); |
| 884 | return true; |
| 885 | } |
| 886 | |
| 887 | void parseSourceDependencies(const std::string& sourceFile, |
| 888 | std::vector<FileInfo>* pDependencies) { |