diff options
author | Brad King <brad.king@kitware.com> | 2010-08-24 22:39:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-08-24 22:39:36 (GMT) |
commit | 325bdb2a92bbbbe18ae2cbffc000bd6e0dd0367a (patch) | |
tree | 3c38d59caa8603dca3752306eb44dd7b42c2857a /Source/cmGlobalVisualStudio6Generator.cxx | |
parent | 6bea84353c76d392a9da11557ab888fa18ea1955 (diff) | |
download | CMake-325bdb2a92bbbbe18ae2cbffc000bd6e0dd0367a.zip CMake-325bdb2a92bbbbe18ae2cbffc000bd6e0dd0367a.tar.gz CMake-325bdb2a92bbbbe18ae2cbffc000bd6e0dd0367a.tar.bz2 |
Factor out duplicate VS target dependency code
Compute VS target dependencies in cmGlobalVisualStudioGenerator when the
main global dependency analysis is done. Use these results in each of
the VS generators instead of duplicating the analysis.
Diffstat (limited to 'Source/cmGlobalVisualStudio6Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio6Generator.cxx | 42 |
1 files changed, 7 insertions, 35 deletions
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx index d053ca2..fa7afc5 100644 --- a/Source/cmGlobalVisualStudio6Generator.cxx +++ b/Source/cmGlobalVisualStudio6Generator.cxx @@ -274,42 +274,14 @@ void cmGlobalVisualStudio6Generator::WriteProject(std::ostream& fout, fout << "Package=<5>\n{{{\n}}}\n\n"; fout << "Package=<4>\n"; fout << "{{{\n"; - - // insert Begin Project Dependency Project_Dep_Name project stuff here - if (target.GetType() != cmTarget::STATIC_LIBRARY) - { - cmTarget::LinkLibraryVectorType::const_iterator j, jend; - j = target.GetLinkLibraries().begin(); - jend = target.GetLinkLibraries().end(); - for(;j!= jend; ++j) - { - if(j->first != dspname) - { - // is the library part of this DSW ? If so add dependency - if(this->FindTarget(0, j->first.c_str())) - { - fout << "Begin Project Dependency\n"; - fout << "Project_Dep_Name " - << GetVS6TargetName(j->first.c_str()) << "\n"; - fout << "End Project Dependency\n"; - } - } - } - } - - std::set<cmStdString>::const_iterator i, end; - // write utility dependencies. - i = target.GetUtilities().begin(); - end = target.GetUtilities().end(); - for(;i!= end; ++i) + VSDependSet const& depends = this->VSTargetDepends[&target]; + for(VSDependSet::const_iterator di = depends.begin(); + di != depends.end(); ++di) { - if(*i != dspname) - { - std::string depName = this->GetUtilityForTarget(target, i->c_str()); - fout << "Begin Project Dependency\n"; - fout << "Project_Dep_Name " << GetVS6TargetName(depName) << "\n"; - fout << "End Project Dependency\n"; - } + const char* name = di->c_str(); + fout << "Begin Project Dependency\n"; + fout << "Project_Dep_Name " << GetVS6TargetName(name) << "\n"; + fout << "End Project Dependency\n"; } fout << "}}}\n\n"; } |