summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-08-10 17:02:59 (GMT)
committerBrad King <brad.king@kitware.com>2007-08-10 17:02:59 (GMT)
commitc6092b7e5e9a421d317969eb3230ccdb7acc0065 (patch)
treea7394296387195154730d9fb89324a1c5f52ce23
parent1fe4220669ba7b7497ac341074c1d56f8f156a02 (diff)
downloadCMake-c6092b7e5e9a421d317969eb3230ccdb7acc0065.zip
CMake-c6092b7e5e9a421d317969eb3230ccdb7acc0065.tar.gz
CMake-c6092b7e5e9a421d317969eb3230ccdb7acc0065.tar.bz2
BUG: Fixed passing of configuration names to GetRealDependency and ConstructScript. Added GetConfigName helper method to do this.
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx29
-rw-r--r--Source/cmLocalVisualStudio6Generator.h2
2 files changed, 20 insertions, 11 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 0a48d83..a6fec82 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -390,10 +390,7 @@ void cmLocalVisualStudio6Generator
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 @@ void cmLocalVisualStudio6Generator
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 @@ cmLocalVisualStudio6Generator
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 @@ cmLocalVisualStudio6Generator
++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 @@ void cmLocalVisualStudio6Generator
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;
+}
diff --git a/Source/cmLocalVisualStudio6Generator.h b/Source/cmLocalVisualStudio6Generator.h
index d97a8db..85dea08 100644
--- a/Source/cmLocalVisualStudio6Generator.h
+++ b/Source/cmLocalVisualStudio6Generator.h
@@ -101,6 +101,8 @@ private:
std::string& options);
std::string IncludeOptions;
std::vector<std::string> Configurations;
+
+ std::string GetConfigName(std::string const& configuration) const;
};
#endif