CREATE_PROJECT: Output Groups and File references in XCode provider

This commit is contained in:
Littleboy
2012-07-14 16:33:41 -04:00
parent 4cee0836c9
commit 67751f77c8
3 changed files with 46 additions and 24 deletions
+9 -17
View File
@@ -75,14 +75,6 @@ namespace {
*/
std::string unifyPath(const std::string &path);
/**
* Returns the last path component.
*
* @param path Path string.
* @return Last path component.
*/
std::string getLastPathComponent(const std::string &path);
/**
* Display the help text for the program.
*
@@ -606,14 +598,6 @@ std::string unifyPath(const std::string &path) {
return result;
}
std::string getLastPathComponent(const std::string &path) {
std::string::size_type pos = path.find_last_of('/');
if (pos == std::string::npos)
return path;
else
return path.substr(pos + 1);
}
void displayHelp(const char *exe) {
using std::cout;
@@ -1001,7 +985,7 @@ bool isInList(const std::string &dir, const std::string &fileName, const StringL
continue;
}
const std::string lastPathComponent = getLastPathComponent(*i);
const std::string lastPathComponent = ProjectProvider::getLastPathComponent(*i);
if (extensionName == "o") {
return false;
} else if (!producesObjectFile(fileName) && extensionName != "h") {
@@ -1304,6 +1288,14 @@ std::string ProjectProvider::createUUID() const {
#endif
}
std::string ProjectProvider::getLastPathComponent(const std::string &path) {
std::string::size_type pos = path.find_last_of('/');
if (pos == std::string::npos)
return path;
else
return path.substr(pos + 1);
}
void ProjectProvider::addFilesToProject(const std::string &dir, std::ofstream &projectFile,
const StringList &includeList, const StringList &excludeList,
const std::string &filePrefix) {