diff options
author | Brad King <brad.king@kitware.com> | 2017-04-10 18:50:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-04-11 14:10:28 (GMT) |
commit | f4af14add40d851f7c8ef92aad2d549dcbbacf1f (patch) | |
tree | fe4002f1881a73bb8419d4fe5331e487afd762d4 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 10772c51b4b0eea35d78a2dd3aa45b92daab7ef2 (diff) | |
download | CMake-f4af14add40d851f7c8ef92aad2d549dcbbacf1f.zip CMake-f4af14add40d851f7c8ef92aad2d549dcbbacf1f.tar.gz CMake-f4af14add40d851f7c8ef92aad2d549dcbbacf1f.tar.bz2 |
VS: Simplify logic collecting object library files as sources
Object library files are already included by `GetExternalObjects`
and `GetConfigCommonSourceFiles` so we don't need to call
`UseObjectLibraries` to get them.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index a9ccc68..419989a 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1337,23 +1337,6 @@ void cmVisualStudio10TargetGenerator::WriteGroups() this->WriteString("</ItemGroup>\n", 1); } - // Add object library contents as external objects. - std::vector<std::string> objs; - this->GeneratorTarget->UseObjectLibraries(objs, ""); - if (!objs.empty()) { - this->WriteString("<ItemGroup>\n", 1); - for (std::vector<std::string>::const_iterator oi = objs.begin(); - oi != objs.end(); ++oi) { - std::string obj = *oi; - this->WriteString("<Object Include=\"", 2); - this->ConvertToWindowsSlash(obj); - (*this->BuildFileStream) << cmVS10EscapeXML(obj) << "\">\n"; - this->WriteString("<Filter>Object Libraries</Filter>\n", 3); - this->WriteString("</Object>\n", 2); - } - this->WriteString("</ItemGroup>\n", 1); - } - this->WriteString("<ItemGroup>\n", 1); for (std::set<cmSourceGroup*>::iterator g = groupsUsed.begin(); g != groupsUsed.end(); ++g) { @@ -1371,15 +1354,6 @@ void cmVisualStudio10TargetGenerator::WriteGroups() this->WriteString("</Filter>\n", 2); } } - if (!objs.empty()) { - this->WriteString("<Filter Include=\"Object Libraries\">\n", 2); - std::string guidName = "SG_Filter_Object Libraries"; - this->WriteString("<UniqueIdentifier>", 3); - std::string guid = this->GlobalGenerator->GetGUID(guidName.c_str()); - (*this->BuildFileStream) << "{" << guid << "}" - << "</UniqueIdentifier>\n"; - this->WriteString("</Filter>\n", 2); - } if (!resxObjs.empty() || !this->AddedFiles.empty()) { this->WriteString("<Filter Include=\"Resource Files\">\n", 2); @@ -1824,14 +1798,6 @@ void cmVisualStudio10TargetGenerator::WriteAllSources() std::vector<cmSourceFile const*> externalObjects; this->GeneratorTarget->GetExternalObjects(externalObjects, ""); - for (std::vector<cmSourceFile const*>::iterator si = externalObjects.begin(); - si != externalObjects.end();) { - if (!(*si)->GetObjectLibrary().empty()) { - si = externalObjects.erase(si); - } else { - ++si; - } - } if (this->LocalGenerator->GetVersion() > cmGlobalVisualStudioGenerator::VS10) { // For VS >= 11 we use LinkObjects to avoid linking custom command @@ -1857,17 +1823,6 @@ void cmVisualStudio10TargetGenerator::WriteAllSources() this->WriteExtraSource(*si); } - // Add object library contents as external objects. - std::vector<std::string> objs; - this->GeneratorTarget->UseObjectLibraries(objs, ""); - for (std::vector<std::string>::const_iterator oi = objs.begin(); - oi != objs.end(); ++oi) { - std::string obj = *oi; - this->WriteString("<Object Include=\"", 2); - this->ConvertToWindowsSlash(obj); - (*this->BuildFileStream) << cmVS10EscapeXML(obj) << "\" />\n"; - } - std::vector<cmSourceFile const*> defSources; this->GeneratorTarget->GetModuleDefinitionSources(defSources, ""); this->WriteSources("None", defSources); |