From d86c0a44f8452261e7d1e330edf2449642b056fd Mon Sep 17 00:00:00 2001 From: Littleboy Date: Wed, 11 Jul 2012 01:08:22 -0400 Subject: CREATE_PROJECT: Add support for Visual Studio 2012 project creation --- devtools/create_project/create_project.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'devtools/create_project/create_project.cpp') diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index df220f0934..c96b83414a 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -221,7 +221,7 @@ int main(int argc, char *argv[]) { msvcVersion = atoi(argv[++i]); - if (msvcVersion != 8 && msvcVersion != 9 && msvcVersion != 10) { + if (msvcVersion != 8 && msvcVersion != 9 && msvcVersion != 10 && msvcVersion != 11) { std::cerr << "ERROR: Unsupported version: \"" << msvcVersion << "\" passed to \"--msvc-version\"!\n"; return -1; } @@ -643,6 +643,7 @@ void displayHelp(const char *exe) { " 8 stands for \"Visual Studio 2005\"\n" " 9 stands for \"Visual Studio 2008\"\n" " 10 stands for \"Visual Studio 2010\"\n" + " 11 stands for \"Visual Studio 2012\"\n" " The default is \"9\", thus \"Visual Studio 2008\"\n" " --build-events Run custom build events as part of the build\n" " (default: false)\n" -- cgit v1.2.3 From 67751f77c8abae0f6326cb0daec67cd6dd272c7d Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sat, 14 Jul 2012 16:33:41 -0400 Subject: CREATE_PROJECT: Output Groups and File references in XCode provider --- devtools/create_project/create_project.cpp | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) (limited to 'devtools/create_project/create_project.cpp') diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index c96b83414a..8499fec400 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -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) { -- cgit v1.2.3