diff options
Diffstat (limited to 'devtools/create_project')
| -rw-r--r-- | devtools/create_project/create_project.cpp | 6 | ||||
| -rw-r--r-- | devtools/create_project/create_project.h | 8 | ||||
| -rw-r--r-- | devtools/create_project/msbuild.cpp | 4 | 
3 files changed, 15 insertions, 3 deletions
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index 3ee5fc4f97..7ae2df35c8 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -39,7 +39,7 @@  #include <fstream>  #include <iostream> - +#include <sstream>  #include <stack>  #include <algorithm>  #include <iomanip> @@ -966,6 +966,10 @@ bool producesObjectFile(const std::string &fileName) {  		return false;  } +std::string toString(int num) { +    return static_cast<std::ostringstream*>(&(std::ostringstream() << num))->str(); +} +  /**   * Checks whether the give file in the specified directory is present in the given   * file list. diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h index d0f2db364c..5325bf6d1b 100644 --- a/devtools/create_project/create_project.h +++ b/devtools/create_project/create_project.h @@ -303,6 +303,14 @@ void splitFilename(const std::string &fileName, std::string &name, std::string &  bool producesObjectFile(const std::string &fileName);  /** +* Convert an integer to string +* +* @param num the integer to convert +* @return string representation of the number +*/ +std::string toString(int num); + +/**   * Structure representing a file tree. This contains two   * members: name and children. "name" holds the name of   * the node. "children" does contain all the node's children. diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index 7bab5c1078..0d68b2e9c9 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -116,8 +116,8 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri  	// Shared configuration  	project << "\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n"; -	std::string version = "v" + std::to_string(_version) + "0"; -	std::string llvm = "LLVM-vs" + std::to_string(getVisualStudioVersion()); +    std::string version = "v" + toString(_version) + "0"; +	std::string llvm = "LLVM-vs" + toString(getVisualStudioVersion());  	outputConfigurationType(setup, project, name, "Release|Win32", version);  	outputConfigurationType(setup, project, name, "Analysis|Win32", version);  | 
