[cmake-commits] king committed cmLocalVisualStudio6Generator.cxx
1.130 1.131 cmLocalVisualStudio6Generator.h 1.20 1.21
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Aug 10 13:03:01 EDT 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv8616
Modified Files:
cmLocalVisualStudio6Generator.cxx
cmLocalVisualStudio6Generator.h
Log Message:
BUG: Fixed passing of configuration names to GetRealDependency and ConstructScript. Added GetConfigName helper method to do this.
Index: cmLocalVisualStudio6Generator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- cmLocalVisualStudio6Generator.h 1 Aug 2007 19:25:40 -0000 1.20
+++ cmLocalVisualStudio6Generator.h 10 Aug 2007 17:02:59 -0000 1.21
@@ -101,6 +101,8 @@
std::string& options);
std::string IncludeOptions;
std::vector<std::string> Configurations;
+
+ std::string GetConfigName(std::string const& configuration) const;
};
#endif
Index: cmLocalVisualStudio6Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.cxx,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -d -r1.130 -r1.131
--- cmLocalVisualStudio6Generator.cxx 1 Aug 2007 19:25:40 -0000 1.130
+++ cmLocalVisualStudio6Generator.cxx 10 Aug 2007 17:02:59 -0000 1.131
@@ -390,10 +390,7 @@
i != this->Configurations.end(); ++i)
{
// Strip the subdirectory name out of the configuration name.
- std::string config = *i;
- std::string::size_type pos = config.find_last_of(" ");
- config = config.substr(pos+1, std::string::npos);
- config = config.substr(0, config.size()-1);
+ std::string config = this->GetConfigName(*i);
if(config.size() > config_len_max)
{
config_len_max = config.size();
@@ -500,10 +497,7 @@
if(!objectNameDir.empty())
{
// Strip the subdirectory name out of the configuration name.
- std::string config = *i;
- std::string::size_type pos = config.find_last_of(" ");
- config = config.substr(pos+1, std::string::npos);
- config = config.substr(0, config.size()-1);
+ std::string config = this->GetConfigName(*i);
// Setup an alternate object file directory.
fout << "\n# PROP Intermediate_Dir \""
@@ -588,11 +582,11 @@
std::vector<std::string>::iterator i;
for(i = this->Configurations.begin(); i != this->Configurations.end(); ++i)
{
-
+ std::string config = this->GetConfigName(*i);
std::string script =
this->ConstructScript(command.GetCommandLines(),
command.GetWorkingDirectory(),
- i->c_str(),
+ config.c_str(),
command.GetEscapeOldStyle(),
command.GetEscapeAllowMakeVars(),
"\\\n\t");
@@ -617,7 +611,8 @@
++d)
{
// Lookup the real name of the dependency in case it is a CMake target.
- std::string dep = this->GetRealDependency(d->c_str(), i->c_str());
+ std::string dep = this->GetRealDependency(d->c_str(),
+ config.c_str());
fout << "\\\n\t" <<
this->ConvertToOptionallyRelativeOutputPath(dep.c_str());
}
@@ -1585,3 +1580,15 @@
dir += this->GetGlobalGenerator()->GetCMakeCFGInitDirectory();
dirs.push_back(dir);
}
+
+std::string
+cmLocalVisualStudio6Generator
+::GetConfigName(std::string const& configuration) const
+{
+ // Strip the subdirectory name out of the configuration name.
+ std::string config = configuration;
+ std::string::size_type pos = config.find_last_of(" ");
+ config = config.substr(pos+1, std::string::npos);
+ config = config.substr(0, config.size()-1);
+ return config;
+}
More information about the Cmake-commits
mailing list