diff options
author | Brad King <brad.king@kitware.com> | 2009-10-06 17:30:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-10-06 17:30:00 (GMT) |
commit | 9000b5a4ded0d805ea1cd7b82f9e87e9abcf6c31 (patch) | |
tree | aef1cee06fabc865ba60710c52edbcddd1e7463b /Source/cmGlobalVisualStudio6Generator.cxx | |
parent | d8efcfc787b08e52c28611347e4c60cddde00aa2 (diff) | |
download | CMake-9000b5a4ded0d805ea1cd7b82f9e87e9abcf6c31.zip CMake-9000b5a4ded0d805ea1cd7b82f9e87e9abcf6c31.tar.gz CMake-9000b5a4ded0d805ea1cd7b82f9e87e9abcf6c31.tar.bz2 |
Avoid non-root copies of root-only targets
In cmGlobalGenerator::GetTargetSets we collect targets from all local
generators in a tree or subtree corresponding to a project() command.
Some targets, such as ALL_BUILD, are duplicated in each subdirectory
with a project() command. For such targets we should keep only the copy
for the top-most (root) local generator.
Previously this filtering was done in each VS IDE generator, but it is
easier to do it in one place when the targets are first encountered.
This also fixes bad ALL_BUILD dependencies generated for VS 7.0 because
the cmGlobalVisualStudio7Generator::WriteTargetDepends method was not
filtering out duplicates. Now we avoid duplicates from the start.
Diffstat (limited to 'Source/cmGlobalVisualStudio6Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio6Generator.cxx | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx index 9a7c744..783db21 100644 --- a/Source/cmGlobalVisualStudio6Generator.cxx +++ b/Source/cmGlobalVisualStudio6Generator.cxx @@ -213,27 +213,10 @@ void cmGlobalVisualStudio6Generator } else { - bool skip = false; - // if it is a global target or the check build system target - // or the all_build target - // then only use the one that is for the root - if(target->GetType() == cmTarget::GLOBAL_TARGET - || !strcmp(target->GetName(), this->GetAllTargetName())) - { - if(target->GetMakefile() != root->GetMakefile()) - { - skip = true; - } - } - // if not skipping the project then write it into the - // solution - if(!skip) - { - std::string dspname = GetVS6TargetName(target->GetName()); - std::string dir = target->GetMakefile()->GetStartOutputDirectory(); - dir = root->Convert(dir.c_str(), cmLocalGenerator::START_OUTPUT); - this->WriteProject(fout, dspname.c_str(), dir.c_str(), *target); - } + std::string dspname = GetVS6TargetName(target->GetName()); + std::string dir = target->GetMakefile()->GetStartOutputDirectory(); + dir = root->Convert(dir.c_str(), cmLocalGenerator::START_OUTPUT); + this->WriteProject(fout, dspname.c_str(), dir.c_str(), *target); } } |