diff options
author | Ken Martin <ken.martin@kitware.com> | 2007-04-10 13:54:01 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2007-04-10 13:54:01 (GMT) |
commit | 8b0c61c322f939f2d718e71c5c796df9d58c6cc2 (patch) | |
tree | 97ac5ffb8706d20e87523b667ccf7769c08db381 /Source/cmGlobalVisualStudio7Generator.cxx | |
parent | 5415b65067ed2eabaa1bb64a50ced230074dab53 (diff) | |
download | CMake-8b0c61c322f939f2d718e71c5c796df9d58c6cc2.zip CMake-8b0c61c322f939f2d718e71c5c796df9d58c6cc2.tar.gz CMake-8b0c61c322f939f2d718e71c5c796df9d58c6cc2.tar.bz2 |
ENH: added internal target property for the name of the project file
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 1918674..cdee3bb 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -317,13 +317,9 @@ void cmGlobalVisualStudio7Generator // Get the list of create dsp files names from the cmVCProjWriter, more // than one dsp could have been created per input CMakeLists.txt file // for each target - std::vector<std::string> dspnames = - static_cast<cmLocalVisualStudio7Generator *>(generators[i]) - ->GetCreatedProjectNames(); cmTargets &tgts = generators[i]->GetMakefile()->GetTargets(); cmTargets::iterator l = tgts.begin(); - for(std::vector<std::string>::iterator si = dspnames.begin(); - l != tgts.end(); ++l) + for(; l != tgts.end(); ++l) { // special handling for the current makefile if(mf == generators[0]->GetMakefile()) @@ -442,9 +438,13 @@ void cmGlobalVisualStudio7Generator } if(!skip) { - this->WriteProject(fout, si->c_str(), dir.c_str(),l->second); + const char *dspname = + l->second.GetProperty("GENERATOR_FILE_NAME"); + if (dspname) + { + this->WriteProject(fout, dspname, dir.c_str(),l->second); + } } - ++si; } } } @@ -471,13 +471,10 @@ void cmGlobalVisualStudio7Generator // Get the list of create dsp files names from the cmVCProjWriter, more // than one dsp could have been created per input CMakeLists.txt file // for each target - std::vector<std::string> dspnames = - pg->GetCreatedProjectNames(); cmTargets &tgts = pg->GetMakefile()->GetTargets(); cmTargets::iterator l = tgts.begin(); std::string dir = mf->GetStartDirectory(); - for(std::vector<std::string>::iterator si = dspnames.begin(); - l != tgts.end() && si != dspnames.end(); ++l) + for(; l != tgts.end(); ++l) { if (strncmp(l->first.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0) { @@ -507,8 +504,13 @@ void cmGlobalVisualStudio7Generator else if ((l->second.GetType() != cmTarget::INSTALL_FILES) && (l->second.GetType() != cmTarget::INSTALL_PROGRAMS)) { - this->WriteProjectDepends(fout, si->c_str(), dir.c_str(), l->second); - ++si; + const char *dspname = + l->second.GetProperty("GENERATOR_FILE_NAME"); + if (dspname) + { + this->WriteProjectDepends(fout, dspname, + dir.c_str(), l->second); + } } } } @@ -523,13 +525,10 @@ void cmGlobalVisualStudio7Generator // Get the list of create dsp files names from the cmVCProjWriter, more // than one dsp could have been created per input CMakeLists.txt file // for each target - std::vector<std::string> dspnames = - pg->GetCreatedProjectNames(); cmTargets &tgts = pg->GetMakefile()->GetTargets(); cmTargets::iterator l = tgts.begin(); std::string dir = mf->GetStartDirectory(); - for(std::vector<std::string>::iterator si = dspnames.begin(); - l != tgts.end() && si != dspnames.end(); ++l) + for(; l != tgts.end(); ++l) { if(strncmp(l->first.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0) { @@ -545,9 +544,13 @@ void cmGlobalVisualStudio7Generator bool partOfDefaultBuild = this->IsPartOfDefaultBuild( root->GetMakefile()->GetProjectName(), &l->second); - this->WriteProjectConfigurations(fout, si->c_str(), - partOfDefaultBuild); - ++si; + const char *dspname = + l->second.GetProperty("GENERATOR_FILE_NAME"); + if (dspname) + { + this->WriteProjectConfigurations(fout, dspname, + partOfDefaultBuild); + } } } } |